From 6d9661135d60eb9afb59c1b61270eabcde6dbde4 Mon Sep 17 00:00:00 2001 From: Elise Shanholtz Date: Tue, 25 Feb 2020 12:55:58 -0800 Subject: [PATCH] fix: proper indentation (#534) --- lib/rest/Accounts.js | 14 +- lib/rest/Api.js | 164 +++--- lib/rest/Authy.js | 20 +- lib/rest/Autopilot.js | 14 +- lib/rest/Chat.js | 28 +- lib/rest/Conversations.js | 20 +- lib/rest/Fax.js | 14 +- lib/rest/FlexApi.js | 32 +- lib/rest/Insights.js | 14 +- lib/rest/IpMessaging.js | 28 +- lib/rest/Lookups.js | 14 +- lib/rest/Messaging.js | 14 +- lib/rest/Monitor.js | 20 +- lib/rest/Notify.js | 20 +- lib/rest/Numbers.js | 14 +- lib/rest/Preview.js | 172 +++--- lib/rest/Pricing.js | 34 +- lib/rest/Proxy.js | 14 +- lib/rest/Serverless.js | 14 +- lib/rest/Studio.js | 28 +- lib/rest/Sync.js | 14 +- lib/rest/Taskrouter.js | 14 +- lib/rest/Trunking.js | 14 +- lib/rest/Twilio.d.ts | 5 +- lib/rest/Twilio.js | 538 +++++++++--------- lib/rest/Verify.js | 14 +- lib/rest/Video.js | 44 +- lib/rest/Voice.js | 14 +- lib/rest/Wireless.js | 32 +- lib/rest/accounts/V1.js | 8 +- lib/rest/accounts/v1/credential.js | 24 +- lib/rest/accounts/v1/credential/aws.js | 12 +- lib/rest/accounts/v1/credential/publicKey.js | 12 +- lib/rest/api/V2010.js | 170 +++--- lib/rest/api/v2010/account.js | 258 ++++----- lib/rest/api/v2010/account/address.js | 30 +- lib/rest/api/v2010/account/application.js | 20 +- .../api/v2010/account/authorizedConnectApp.js | 20 +- .../api/v2010/account/availablePhoneNumber.js | 122 ++-- lib/rest/api/v2010/account/call.js | 72 +-- lib/rest/api/v2010/account/call/feedback.js | 20 +- .../api/v2010/account/call/feedbackSummary.js | 20 +- .../api/v2010/account/call/notification.js | 22 +- lib/rest/api/v2010/account/call/payment.js | 22 +- lib/rest/api/v2010/account/call/recording.js | 22 +- lib/rest/api/v2010/account/conference.js | 40 +- .../v2010/account/conference/participant.js | 22 +- .../api/v2010/account/conference/recording.js | 22 +- lib/rest/api/v2010/account/connectApp.js | 12 +- .../api/v2010/account/incomingPhoneNumber.js | 74 +-- .../incomingPhoneNumber/assignedAddOn.js | 42 +- .../assignedAddOn/assignedAddOnExtension.js | 24 +- lib/rest/api/v2010/account/key.js | 12 +- lib/rest/api/v2010/account/message.js | 32 +- lib/rest/api/v2010/account/message/media.js | 22 +- lib/rest/api/v2010/account/notification.js | 20 +- .../api/v2010/account/outgoingCallerId.js | 20 +- lib/rest/api/v2010/account/queue.js | 22 +- lib/rest/api/v2010/account/queue/member.js | 22 +- lib/rest/api/v2010/account/recording.js | 48 +- .../v2010/account/recording/addOnResult.js | 42 +- .../account/recording/addOnResult/payload.js | 24 +- .../v2010/account/recording/transcription.js | 22 +- lib/rest/api/v2010/account/shortCode.js | 12 +- lib/rest/api/v2010/account/signingKey.js | 12 +- lib/rest/api/v2010/account/sip.js | 36 +- .../api/v2010/account/sip/credentialList.js | 38 +- .../account/sip/credentialList/credential.js | 22 +- lib/rest/api/v2010/account/sip/domain.js | 58 +- .../api/v2010/account/sip/domain/authTypes.js | 40 +- .../sip/domain/authTypes/authCallsMapping.js | 40 +- .../authCallsCredentialListMapping.js | 22 +- .../authCallsIpAccessControlListMapping.js | 22 +- .../authTypes/authRegistrationsMapping.js | 20 +- .../authRegistrationsCredentialListMapping.js | 22 +- .../sip/domain/credentialListMapping.js | 22 +- .../sip/domain/ipAccessControlListMapping.js | 22 +- .../v2010/account/sip/ipAccessControlList.js | 30 +- .../sip/ipAccessControlList/ipAddress.js | 22 +- lib/rest/api/v2010/account/transcription.js | 20 +- lib/rest/api/v2010/account/usage.js | 24 +- lib/rest/api/v2010/account/usage/record.js | 96 ++-- lib/rest/api/v2010/account/usage/trigger.js | 12 +- lib/rest/authy/V1.js | 16 +- lib/rest/authy/v1/form.js | 12 +- lib/rest/authy/v1/service.js | 22 +- lib/rest/authy/v1/service/entity.js | 30 +- lib/rest/authy/v1/service/entity/factor.js | 42 +- .../v1/service/entity/factor/challenge.js | 24 +- lib/rest/autopilot/V1.js | 8 +- lib/rest/autopilot/v1/assistant.js | 102 ++-- lib/rest/autopilot/v1/assistant/defaults.js | 12 +- lib/rest/autopilot/v1/assistant/dialogue.js | 12 +- .../autopilot/v1/assistant/exportAssistant.js | 12 +- lib/rest/autopilot/v1/assistant/fieldType.js | 38 +- .../v1/assistant/fieldType/fieldValue.js | 22 +- lib/rest/autopilot/v1/assistant/modelBuild.js | 20 +- lib/rest/autopilot/v1/assistant/query.js | 12 +- lib/rest/autopilot/v1/assistant/styleSheet.js | 12 +- lib/rest/autopilot/v1/assistant/task.js | 68 +-- lib/rest/autopilot/v1/assistant/task/field.js | 22 +- .../autopilot/v1/assistant/task/sample.js | 22 +- .../v1/assistant/task/taskActions.js | 20 +- .../v1/assistant/task/taskStatistics.js | 20 +- lib/rest/autopilot/v1/assistant/webhook.js | 12 +- lib/rest/chat/V1.js | 16 +- lib/rest/chat/V2.js | 16 +- lib/rest/chat/v1/credential.js | 12 +- lib/rest/chat/v1/service.js | 42 +- lib/rest/chat/v1/service/channel.js | 42 +- lib/rest/chat/v1/service/channel/invite.js | 22 +- lib/rest/chat/v1/service/channel/member.js | 22 +- lib/rest/chat/v1/service/channel/message.js | 22 +- lib/rest/chat/v1/service/role.js | 12 +- lib/rest/chat/v1/service/user.js | 30 +- lib/rest/chat/v2/credential.js | 12 +- lib/rest/chat/v2/service.js | 52 +- lib/rest/chat/v2/service/binding.js | 12 +- lib/rest/chat/v2/service/channel.js | 52 +- lib/rest/chat/v2/service/channel/invite.js | 22 +- lib/rest/chat/v2/service/channel/member.js | 22 +- lib/rest/chat/v2/service/channel/message.js | 22 +- lib/rest/chat/v2/service/channel/webhook.js | 22 +- lib/rest/chat/v2/service/role.js | 12 +- lib/rest/chat/v2/service/user.js | 48 +- lib/rest/chat/v2/service/user/userBinding.js | 22 +- lib/rest/chat/v2/service/user/userChannel.js | 22 +- lib/rest/conversations/V1.js | 16 +- lib/rest/conversations/v1/conversation.js | 42 +- .../conversations/v1/conversation/message.js | 20 +- .../v1/conversation/participant.js | 20 +- .../conversations/v1/conversation/webhook.js | 20 +- lib/rest/conversations/v1/webhook.js | 12 +- lib/rest/fax/V1.js | 8 +- lib/rest/fax/v1/fax.js | 22 +- lib/rest/fax/v1/fax/faxMedia.js | 12 +- lib/rest/flexApi/V1.js | 32 +- lib/rest/flexApi/v1/channel.js | 12 +- lib/rest/flexApi/v1/configuration.js | 12 +- lib/rest/flexApi/v1/flexFlow.js | 12 +- lib/rest/flexApi/v1/webChannel.js | 12 +- lib/rest/insights/V1.js | 8 +- lib/rest/insights/v1/call.js | 42 +- lib/rest/insights/v1/call/summary.js | 12 +- lib/rest/ipMessaging/V1.js | 16 +- lib/rest/ipMessaging/V2.js | 16 +- lib/rest/ipMessaging/v1/credential.js | 12 +- lib/rest/ipMessaging/v1/service.js | 42 +- lib/rest/ipMessaging/v1/service/channel.js | 42 +- .../ipMessaging/v1/service/channel/invite.js | 22 +- .../ipMessaging/v1/service/channel/member.js | 22 +- .../ipMessaging/v1/service/channel/message.js | 22 +- lib/rest/ipMessaging/v1/service/role.js | 12 +- lib/rest/ipMessaging/v1/service/user.js | 30 +- lib/rest/ipMessaging/v2/credential.js | 12 +- lib/rest/ipMessaging/v2/service.js | 52 +- lib/rest/ipMessaging/v2/service/binding.js | 12 +- lib/rest/ipMessaging/v2/service/channel.js | 52 +- .../ipMessaging/v2/service/channel/invite.js | 22 +- .../ipMessaging/v2/service/channel/member.js | 22 +- .../ipMessaging/v2/service/channel/message.js | 22 +- .../ipMessaging/v2/service/channel/webhook.js | 22 +- lib/rest/ipMessaging/v2/service/role.js | 12 +- lib/rest/ipMessaging/v2/service/user.js | 48 +- .../v2/service/user/userBinding.js | 22 +- .../v2/service/user/userChannel.js | 22 +- lib/rest/lookups/V1.js | 8 +- lib/rest/lookups/v1/phoneNumber.js | 12 +- lib/rest/messaging/V1.js | 8 +- lib/rest/messaging/v1/service.js | 42 +- lib/rest/messaging/v1/service/alphaSender.js | 20 +- lib/rest/messaging/v1/service/phoneNumber.js | 20 +- lib/rest/messaging/v1/service/shortCode.js | 12 +- lib/rest/monitor/V1.js | 16 +- lib/rest/monitor/v1/alert.js | 12 +- lib/rest/monitor/v1/event.js | 12 +- lib/rest/notify/V1.js | 16 +- lib/rest/notify/v1/credential.js | 12 +- lib/rest/notify/v1/service.js | 32 +- lib/rest/notify/v1/service/binding.js | 12 +- lib/rest/numbers/V2.js | 8 +- lib/rest/numbers/v2/regulatoryCompliance.js | 72 +-- .../numbers/v2/regulatoryCompliance/bundle.js | 22 +- .../bundle/itemAssignment.js | 20 +- .../v2/regulatoryCompliance/endUser.js | 12 +- .../v2/regulatoryCompliance/endUserType.js | 12 +- .../v2/regulatoryCompliance/regulation.js | 12 +- .../supportingDocument.js | 12 +- .../supportingDocumentType.js | 12 +- lib/rest/preview/BulkExports.js | 16 +- lib/rest/preview/DeployedDevices.js | 8 +- lib/rest/preview/HostedNumbers.js | 16 +- lib/rest/preview/Marketplace.js | 16 +- lib/rest/preview/Sync.js | 8 +- lib/rest/preview/TrustedComms.js | 48 +- lib/rest/preview/Understand.js | 8 +- lib/rest/preview/Wireless.js | 24 +- lib/rest/preview/bulk_exports/export.js | 44 +- lib/rest/preview/bulk_exports/export/job.js | 12 +- .../bulk_exports/exportConfiguration.js | 12 +- lib/rest/preview/deployed_devices/fleet.js | 52 +- .../deployed_devices/fleet/certificate.js | 12 +- .../deployed_devices/fleet/deployment.js | 12 +- .../preview/deployed_devices/fleet/device.js | 12 +- .../preview/deployed_devices/fleet/key.js | 12 +- .../hosted_numbers/authorizationDocument.js | 28 +- .../hosted_numbers/hostedNumberOrder.js | 12 +- .../preview/marketplace/availableAddOn.js | 22 +- .../availableAddOn/availableAddOnExtension.js | 20 +- .../preview/marketplace/installedAddOn.js | 22 +- .../installedAddOn/installedAddOnExtension.js | 20 +- lib/rest/preview/sync/service.js | 42 +- lib/rest/preview/sync/service/document.js | 30 +- .../service/document/documentPermission.js | 22 +- lib/rest/preview/sync/service/syncList.js | 48 +- .../sync/service/syncList/syncListItem.js | 22 +- .../service/syncList/syncListPermission.js | 22 +- lib/rest/preview/sync/service/syncMap.js | 48 +- .../sync/service/syncMap/syncMapItem.js | 22 +- .../sync/service/syncMap/syncMapPermission.js | 22 +- lib/rest/preview/trusted_comms/business.js | 22 +- .../trusted_comms/business/insights.js | 12 +- .../business/insights/successRate.js | 12 +- lib/rest/preview/trusted_comms/cps.js | 12 +- lib/rest/preview/trusted_comms/currentCall.js | 12 +- lib/rest/preview/understand/assistant.js | 104 ++-- .../assistant/assistantFallbackActions.js | 12 +- .../assistant/assistantInitiationActions.js | 12 +- .../preview/understand/assistant/dialogue.js | 12 +- .../preview/understand/assistant/fieldType.js | 38 +- .../assistant/fieldType/fieldValue.js | 22 +- .../understand/assistant/modelBuild.js | 20 +- .../preview/understand/assistant/query.js | 12 +- .../understand/assistant/styleSheet.js | 12 +- lib/rest/preview/understand/assistant/task.js | 68 +-- .../understand/assistant/task/field.js | 22 +- .../understand/assistant/task/sample.js | 22 +- .../understand/assistant/task/taskActions.js | 20 +- .../assistant/task/taskStatistics.js | 20 +- lib/rest/preview/wireless/command.js | 12 +- lib/rest/preview/wireless/ratePlan.js | 12 +- lib/rest/preview/wireless/sim.js | 22 +- lib/rest/preview/wireless/sim/usage.js | 12 +- lib/rest/pricing/V1.js | 24 +- lib/rest/pricing/V2.js | 8 +- lib/rest/pricing/v1/messaging.js | 12 +- lib/rest/pricing/v1/messaging/country.js | 12 +- lib/rest/pricing/v1/phoneNumber.js | 12 +- lib/rest/pricing/v1/phoneNumber/country.js | 12 +- lib/rest/pricing/v1/voice.js | 24 +- lib/rest/pricing/v1/voice/country.js | 12 +- lib/rest/pricing/v1/voice/number.js | 12 +- lib/rest/pricing/v2/voice.js | 24 +- lib/rest/pricing/v2/voice/country.js | 12 +- lib/rest/pricing/v2/voice/number.js | 12 +- lib/rest/proxy/V1.js | 8 +- lib/rest/proxy/v1/service.js | 42 +- lib/rest/proxy/v1/service/phoneNumber.js | 20 +- lib/rest/proxy/v1/service/session.js | 48 +- .../proxy/v1/service/session/interaction.js | 22 +- .../proxy/v1/service/session/participant.js | 42 +- .../session/participant/messageInteraction.js | 24 +- lib/rest/proxy/v1/service/shortCode.js | 12 +- lib/rest/serverless/V1.js | 8 +- lib/rest/serverless/v1/service.js | 52 +- lib/rest/serverless/v1/service/asset.js | 30 +- .../v1/service/asset/assetVersion.js | 22 +- lib/rest/serverless/v1/service/build.js | 12 +- lib/rest/serverless/v1/service/environment.js | 58 +- .../v1/service/environment/deployment.js | 22 +- .../serverless/v1/service/environment/log.js | 22 +- .../v1/service/environment/variable.js | 22 +- lib/rest/serverless/v1/service/function.js | 30 +- .../v1/service/function/functionVersion.js | 22 +- lib/rest/studio/V1.js | 8 +- lib/rest/studio/V2.js | 16 +- lib/rest/studio/v1/flow.js | 32 +- lib/rest/studio/v1/flow/engagement.js | 40 +- .../v1/flow/engagement/engagementContext.js | 20 +- lib/rest/studio/v1/flow/engagement/step.js | 42 +- .../v1/flow/engagement/step/stepContext.js | 22 +- lib/rest/studio/v1/flow/execution.js | 40 +- .../v1/flow/execution/executionContext.js | 20 +- .../studio/v1/flow/execution/executionStep.js | 42 +- .../executionStep/executionStepContext.js | 22 +- lib/rest/studio/v2/flow.js | 42 +- lib/rest/studio/v2/flow/execution.js | 40 +- .../v2/flow/execution/executionContext.js | 20 +- .../studio/v2/flow/execution/executionStep.js | 42 +- .../executionStep/executionStepContext.js | 22 +- lib/rest/studio/v2/flow/flowRevision.js | 12 +- lib/rest/studio/v2/flow/testUser.js | 12 +- lib/rest/sync/V1.js | 8 +- lib/rest/sync/v1/service.js | 52 +- lib/rest/sync/v1/service/document.js | 30 +- .../v1/service/document/documentPermission.js | 22 +- lib/rest/sync/v1/service/syncList.js | 48 +- .../sync/v1/service/syncList/syncListItem.js | 22 +- .../v1/service/syncList/syncListPermission.js | 22 +- lib/rest/sync/v1/service/syncMap.js | 48 +- .../sync/v1/service/syncMap/syncMapItem.js | 22 +- .../v1/service/syncMap/syncMapPermission.js | 22 +- lib/rest/sync/v1/service/syncStream.js | 30 +- lib/rest/taskrouter/V1.js | 8 +- lib/rest/taskrouter/v1/workspace.js | 118 ++-- lib/rest/taskrouter/v1/workspace/activity.js | 12 +- lib/rest/taskrouter/v1/workspace/event.js | 12 +- lib/rest/taskrouter/v1/workspace/task.js | 30 +- .../v1/workspace/task/reservation.js | 22 +- .../taskrouter/v1/workspace/taskChannel.js | 20 +- lib/rest/taskrouter/v1/workspace/taskQueue.js | 86 +-- .../taskQueueCumulativeStatistics.js | 20 +- .../taskQueue/taskQueueRealTimeStatistics.js | 20 +- .../taskQueue/taskQueueStatistics.js | 20 +- lib/rest/taskrouter/v1/workspace/worker.js | 110 ++-- .../v1/workspace/worker/reservation.js | 22 +- .../v1/workspace/worker/workerChannel.js | 22 +- .../v1/workspace/worker/workerStatistics.js | 20 +- .../worker/workersCumulativeStatistics.js | 12 +- .../worker/workersRealTimeStatistics.js | 12 +- .../v1/workspace/worker/workersStatistics.js | 12 +- lib/rest/taskrouter/v1/workspace/workflow.js | 66 +-- .../workflow/workflowCumulativeStatistics.js | 20 +- .../workflow/workflowRealTimeStatistics.js | 20 +- .../workspace/workflow/workflowStatistics.js | 20 +- .../workspaceCumulativeStatistics.js | 18 +- .../workspace/workspaceRealTimeStatistics.js | 12 +- .../v1/workspace/workspaceStatistics.js | 12 +- lib/rest/trunking/V1.js | 8 +- lib/rest/trunking/v1/trunk.js | 62 +- lib/rest/trunking/v1/trunk/credentialList.js | 20 +- .../trunking/v1/trunk/ipAccessControlList.js | 20 +- lib/rest/trunking/v1/trunk/originationUrl.js | 20 +- lib/rest/trunking/v1/trunk/phoneNumber.js | 12 +- .../trunking/v1/trunk/terminatingSipDomain.js | 20 +- lib/rest/verify/V2.js | 8 +- lib/rest/verify/v2/service.js | 52 +- .../v2/service/messagingConfiguration.js | 20 +- lib/rest/verify/v2/service/rateLimit.js | 22 +- .../verify/v2/service/rateLimit/bucket.js | 22 +- lib/rest/verify/v2/service/verification.js | 20 +- lib/rest/video/V1.js | 48 +- lib/rest/video/v1/composition.js | 12 +- lib/rest/video/v1/compositionHook.js | 12 +- lib/rest/video/v1/compositionSettings.js | 12 +- lib/rest/video/v1/recording.js | 12 +- lib/rest/video/v1/recordingSettings.js | 12 +- lib/rest/video/v1/room.js | 32 +- lib/rest/video/v1/room/recording.js | 12 +- lib/rest/video/v1/room/roomParticipant.js | 66 +-- .../roomParticipantPublishedTrack.js | 22 +- .../roomParticipantSubscribedTrack.js | 22 +- lib/rest/voice/V1.js | 8 +- lib/rest/voice/v1/dialingPermissions.js | 36 +- .../voice/v1/dialingPermissions/country.js | 28 +- .../voice/v1/dialingPermissions/settings.js | 12 +- lib/rest/wireless/V1.js | 32 +- lib/rest/wireless/v1/command.js | 12 +- lib/rest/wireless/v1/ratePlan.js | 12 +- lib/rest/wireless/v1/sim.js | 32 +- .../api/v2010/account/call/payment.spec.js | 6 +- .../rest/api/v2010/account/message.spec.js | 2 +- .../roomParticipantSubscribeRule.spec.js | 2 +- .../v1/dialingPermissions/settings.spec.js | 2 +- 364 files changed, 5002 insertions(+), 4999 deletions(-) diff --git a/lib/rest/Accounts.js b/lib/rest/Accounts.js index c7097f2d19..607385c1a6 100644 --- a/lib/rest/Accounts.js +++ b/lib/rest/Accounts.js @@ -38,17 +38,17 @@ Accounts.prototype.constructor = Accounts; Object.defineProperty(Accounts.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Accounts.prototype, 'credentials', { - get: function() { - return this.v1.credentials; - } + get: function() { + return this.v1.credentials; + } }); module.exports = Accounts; diff --git a/lib/rest/Api.js b/lib/rest/Api.js index 8261bafebb..c079ed3a07 100644 --- a/lib/rest/Api.js +++ b/lib/rest/Api.js @@ -81,192 +81,192 @@ Api.prototype.constructor = Api; Object.defineProperty(Api.prototype, 'v2010', { - get: function() { - this._v2010 = this._v2010 || new V2010(this); - return this._v2010; - } + get: function() { + this._v2010 = this._v2010 || new V2010(this); + return this._v2010; + } }); Object.defineProperty(Api.prototype, 'account', { - get: function() { - return this.v2010.account; - } + get: function() { + return this.v2010.account; + } }); Object.defineProperty(Api.prototype, 'accounts', { - get: function() { - return this.v2010.accounts; - } + get: function() { + return this.v2010.accounts; + } }); Object.defineProperty(Api.prototype, 'addresses', { - get: function() { - return this.account.addresses; - } + get: function() { + return this.account.addresses; + } }); Object.defineProperty(Api.prototype, 'applications', { - get: function() { - return this.account.applications; - } + get: function() { + return this.account.applications; + } }); Object.defineProperty(Api.prototype, 'authorizedConnectApps', { - get: function() { - return this.account.authorizedConnectApps; - } + get: function() { + return this.account.authorizedConnectApps; + } }); Object.defineProperty(Api.prototype, 'availablePhoneNumbers', { - get: function() { - return this.account.availablePhoneNumbers; - } + get: function() { + return this.account.availablePhoneNumbers; + } }); Object.defineProperty(Api.prototype, 'balance', { - get: function() { - return this.account.balance; - } + get: function() { + return this.account.balance; + } }); Object.defineProperty(Api.prototype, 'calls', { - get: function() { - return this.account.calls; - } + get: function() { + return this.account.calls; + } }); Object.defineProperty(Api.prototype, 'conferences', { - get: function() { - return this.account.conferences; - } + get: function() { + return this.account.conferences; + } }); Object.defineProperty(Api.prototype, 'connectApps', { - get: function() { - return this.account.connectApps; - } + get: function() { + return this.account.connectApps; + } }); Object.defineProperty(Api.prototype, 'incomingPhoneNumbers', { - get: function() { - return this.account.incomingPhoneNumbers; - } + get: function() { + return this.account.incomingPhoneNumbers; + } }); Object.defineProperty(Api.prototype, 'keys', { - get: function() { - return this.account.keys; - } + get: function() { + return this.account.keys; + } }); Object.defineProperty(Api.prototype, 'messages', { - get: function() { - return this.account.messages; - } + get: function() { + return this.account.messages; + } }); Object.defineProperty(Api.prototype, 'newKeys', { - get: function() { - return this.account.newKeys; - } + get: function() { + return this.account.newKeys; + } }); Object.defineProperty(Api.prototype, 'newSigningKeys', { - get: function() { - return this.account.newSigningKeys; - } + get: function() { + return this.account.newSigningKeys; + } }); Object.defineProperty(Api.prototype, 'notifications', { - get: function() { - return this.account.notifications; - } + get: function() { + return this.account.notifications; + } }); Object.defineProperty(Api.prototype, 'outgoingCallerIds', { - get: function() { - return this.account.outgoingCallerIds; - } + get: function() { + return this.account.outgoingCallerIds; + } }); Object.defineProperty(Api.prototype, 'queues', { - get: function() { - return this.account.queues; - } + get: function() { + return this.account.queues; + } }); Object.defineProperty(Api.prototype, 'recordings', { - get: function() { - return this.account.recordings; - } + get: function() { + return this.account.recordings; + } }); Object.defineProperty(Api.prototype, 'signingKeys', { - get: function() { - return this.account.signingKeys; - } + get: function() { + return this.account.signingKeys; + } }); Object.defineProperty(Api.prototype, 'sip', { - get: function() { - return this.account.sip; - } + get: function() { + return this.account.sip; + } }); Object.defineProperty(Api.prototype, 'shortCodes', { - get: function() { - return this.account.shortCodes; - } + get: function() { + return this.account.shortCodes; + } }); Object.defineProperty(Api.prototype, 'tokens', { - get: function() { - return this.account.tokens; - } + get: function() { + return this.account.tokens; + } }); Object.defineProperty(Api.prototype, 'transcriptions', { - get: function() { - return this.account.transcriptions; - } + get: function() { + return this.account.transcriptions; + } }); Object.defineProperty(Api.prototype, 'usage', { - get: function() { - return this.account.usage; - } + get: function() { + return this.account.usage; + } }); Object.defineProperty(Api.prototype, 'validationRequests', { - get: function() { - return this.account.validationRequests; - } + get: function() { + return this.account.validationRequests; + } }); module.exports = Api; diff --git a/lib/rest/Authy.js b/lib/rest/Authy.js index 68e9e8159d..518e009dd9 100644 --- a/lib/rest/Authy.js +++ b/lib/rest/Authy.js @@ -39,24 +39,24 @@ Authy.prototype.constructor = Authy; Object.defineProperty(Authy.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Authy.prototype, 'forms', { - get: function() { - return this.v1.forms; - } + get: function() { + return this.v1.forms; + } }); Object.defineProperty(Authy.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Authy; diff --git a/lib/rest/Autopilot.js b/lib/rest/Autopilot.js index a90979b1c9..c4fe0bcb55 100644 --- a/lib/rest/Autopilot.js +++ b/lib/rest/Autopilot.js @@ -38,17 +38,17 @@ Autopilot.prototype.constructor = Autopilot; Object.defineProperty(Autopilot.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Autopilot.prototype, 'assistants', { - get: function() { - return this.v1.assistants; - } + get: function() { + return this.v1.assistants; + } }); module.exports = Autopilot; diff --git a/lib/rest/Chat.js b/lib/rest/Chat.js index b1f204f731..ebc90e7f27 100644 --- a/lib/rest/Chat.js +++ b/lib/rest/Chat.js @@ -42,32 +42,32 @@ Chat.prototype.constructor = Chat; Object.defineProperty(Chat.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Chat.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(Chat.prototype, 'credentials', { - get: function() { - return this.v2.credentials; - } + get: function() { + return this.v2.credentials; + } }); Object.defineProperty(Chat.prototype, 'services', { - get: function() { - return this.v2.services; - } + get: function() { + return this.v2.services; + } }); module.exports = Chat; diff --git a/lib/rest/Conversations.js b/lib/rest/Conversations.js index 7a154d6b9c..eec2a7adae 100644 --- a/lib/rest/Conversations.js +++ b/lib/rest/Conversations.js @@ -40,24 +40,24 @@ Conversations.prototype.constructor = Conversations; Object.defineProperty(Conversations.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Conversations.prototype, 'conversations', { - get: function() { - return this.v1.conversations; - } + get: function() { + return this.v1.conversations; + } }); Object.defineProperty(Conversations.prototype, 'webhooks', { - get: function() { - return this.v1.webhooks; - } + get: function() { + return this.v1.webhooks; + } }); module.exports = Conversations; diff --git a/lib/rest/Fax.js b/lib/rest/Fax.js index df1823fcb3..ceb500702f 100644 --- a/lib/rest/Fax.js +++ b/lib/rest/Fax.js @@ -38,17 +38,17 @@ Fax.prototype.constructor = Fax; Object.defineProperty(Fax.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Fax.prototype, 'faxes', { - get: function() { - return this.v1.faxes; - } + get: function() { + return this.v1.faxes; + } }); module.exports = Fax; diff --git a/lib/rest/FlexApi.js b/lib/rest/FlexApi.js index 2d52bc966d..47f951cc2c 100644 --- a/lib/rest/FlexApi.js +++ b/lib/rest/FlexApi.js @@ -42,38 +42,38 @@ FlexApi.prototype.constructor = FlexApi; Object.defineProperty(FlexApi.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(FlexApi.prototype, 'channel', { - get: function() { - return this.v1.channel; - } + get: function() { + return this.v1.channel; + } }); Object.defineProperty(FlexApi.prototype, 'configuration', { - get: function() { - return this.v1.configuration; - } + get: function() { + return this.v1.configuration; + } }); Object.defineProperty(FlexApi.prototype, 'flexFlow', { - get: function() { - return this.v1.flexFlow; - } + get: function() { + return this.v1.flexFlow; + } }); Object.defineProperty(FlexApi.prototype, 'webChannel', { - get: function() { - return this.v1.webChannel; - } + get: function() { + return this.v1.webChannel; + } }); module.exports = FlexApi; diff --git a/lib/rest/Insights.js b/lib/rest/Insights.js index f717487ed1..72d1cbf50d 100644 --- a/lib/rest/Insights.js +++ b/lib/rest/Insights.js @@ -38,17 +38,17 @@ Insights.prototype.constructor = Insights; Object.defineProperty(Insights.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Insights.prototype, 'calls', { - get: function() { - return this.v1.calls; - } + get: function() { + return this.v1.calls; + } }); module.exports = Insights; diff --git a/lib/rest/IpMessaging.js b/lib/rest/IpMessaging.js index 0e7ad60342..5fa15ea58e 100644 --- a/lib/rest/IpMessaging.js +++ b/lib/rest/IpMessaging.js @@ -43,32 +43,32 @@ IpMessaging.prototype.constructor = IpMessaging; Object.defineProperty(IpMessaging.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(IpMessaging.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(IpMessaging.prototype, 'credentials', { - get: function() { - return this.v2.credentials; - } + get: function() { + return this.v2.credentials; + } }); Object.defineProperty(IpMessaging.prototype, 'services', { - get: function() { - return this.v2.services; - } + get: function() { + return this.v2.services; + } }); module.exports = IpMessaging; diff --git a/lib/rest/Lookups.js b/lib/rest/Lookups.js index 844ad7b2fe..28b1fe2a60 100644 --- a/lib/rest/Lookups.js +++ b/lib/rest/Lookups.js @@ -39,17 +39,17 @@ Lookups.prototype.constructor = Lookups; Object.defineProperty(Lookups.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Lookups.prototype, 'phoneNumbers', { - get: function() { - return this.v1.phoneNumbers; - } + get: function() { + return this.v1.phoneNumbers; + } }); module.exports = Lookups; diff --git a/lib/rest/Messaging.js b/lib/rest/Messaging.js index 132ea0c1c8..72aa863e13 100644 --- a/lib/rest/Messaging.js +++ b/lib/rest/Messaging.js @@ -38,17 +38,17 @@ Messaging.prototype.constructor = Messaging; Object.defineProperty(Messaging.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Messaging.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Messaging; diff --git a/lib/rest/Monitor.js b/lib/rest/Monitor.js index a8e7b1af4e..7706ec77f0 100644 --- a/lib/rest/Monitor.js +++ b/lib/rest/Monitor.js @@ -39,24 +39,24 @@ Monitor.prototype.constructor = Monitor; Object.defineProperty(Monitor.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Monitor.prototype, 'alerts', { - get: function() { - return this.v1.alerts; - } + get: function() { + return this.v1.alerts; + } }); Object.defineProperty(Monitor.prototype, 'events', { - get: function() { - return this.v1.events; - } + get: function() { + return this.v1.events; + } }); module.exports = Monitor; diff --git a/lib/rest/Notify.js b/lib/rest/Notify.js index 1e7ee3995b..8ef650cc7b 100644 --- a/lib/rest/Notify.js +++ b/lib/rest/Notify.js @@ -39,24 +39,24 @@ Notify.prototype.constructor = Notify; Object.defineProperty(Notify.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Notify.prototype, 'credentials', { - get: function() { - return this.v1.credentials; - } + get: function() { + return this.v1.credentials; + } }); Object.defineProperty(Notify.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Notify; diff --git a/lib/rest/Numbers.js b/lib/rest/Numbers.js index 2d9dae3603..2e8d15c9d9 100644 --- a/lib/rest/Numbers.js +++ b/lib/rest/Numbers.js @@ -39,17 +39,17 @@ Numbers.prototype.constructor = Numbers; Object.defineProperty(Numbers.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(Numbers.prototype, 'regulatoryCompliance', { - get: function() { - return this.v2.regulatoryCompliance; - } + get: function() { + return this.v2.regulatoryCompliance; + } }); module.exports = Numbers; diff --git a/lib/rest/Preview.js b/lib/rest/Preview.js index 03e9da7bdb..f08e3231f7 100644 --- a/lib/rest/Preview.js +++ b/lib/rest/Preview.js @@ -89,192 +89,192 @@ Preview.prototype.constructor = Preview; Object.defineProperty(Preview.prototype, 'bulk_exports', { - get: function() { - this._bulk_exports = this._bulk_exports || new BulkExports(this); - return this._bulk_exports; - } + get: function() { + this._bulk_exports = this._bulk_exports || new BulkExports(this); + return this._bulk_exports; + } }); Object.defineProperty(Preview.prototype, 'deployed_devices', { - get: function() { - this._deployed_devices = this._deployed_devices || new DeployedDevices(this); - return this._deployed_devices; - } + get: function() { + this._deployed_devices = this._deployed_devices || new DeployedDevices(this); + return this._deployed_devices; + } }); Object.defineProperty(Preview.prototype, 'hosted_numbers', { - get: function() { - this._hosted_numbers = this._hosted_numbers || new HostedNumbers(this); - return this._hosted_numbers; - } + get: function() { + this._hosted_numbers = this._hosted_numbers || new HostedNumbers(this); + return this._hosted_numbers; + } }); Object.defineProperty(Preview.prototype, 'marketplace', { - get: function() { - this._marketplace = this._marketplace || new Marketplace(this); - return this._marketplace; - } + get: function() { + this._marketplace = this._marketplace || new Marketplace(this); + return this._marketplace; + } }); Object.defineProperty(Preview.prototype, 'sync', { - get: function() { - this._sync = this._sync || new Sync(this); - return this._sync; - } + get: function() { + this._sync = this._sync || new Sync(this); + return this._sync; + } }); Object.defineProperty(Preview.prototype, 'understand', { - get: function() { - this._understand = this._understand || new Understand(this); - return this._understand; - } + get: function() { + this._understand = this._understand || new Understand(this); + return this._understand; + } }); Object.defineProperty(Preview.prototype, 'wireless', { - get: function() { - this._wireless = this._wireless || new Wireless(this); - return this._wireless; - } + get: function() { + this._wireless = this._wireless || new Wireless(this); + return this._wireless; + } }); Object.defineProperty(Preview.prototype, 'trusted_comms', { - get: function() { - this._trusted_comms = this._trusted_comms || new TrustedComms(this); - return this._trusted_comms; - } + get: function() { + this._trusted_comms = this._trusted_comms || new TrustedComms(this); + return this._trusted_comms; + } }); Object.defineProperty(Preview.prototype, 'exports', { - get: function() { - return this.bulk_exports.exports; - } + get: function() { + return this.bulk_exports.exports; + } }); Object.defineProperty(Preview.prototype, 'exportConfiguration', { - get: function() { - return this.bulk_exports.exportConfiguration; - } + get: function() { + return this.bulk_exports.exportConfiguration; + } }); Object.defineProperty(Preview.prototype, 'fleets', { - get: function() { - return this.deployed_devices.fleets; - } + get: function() { + return this.deployed_devices.fleets; + } }); Object.defineProperty(Preview.prototype, 'authorizationDocuments', { - get: function() { - return this.hosted_numbers.authorizationDocuments; - } + get: function() { + return this.hosted_numbers.authorizationDocuments; + } }); Object.defineProperty(Preview.prototype, 'hostedNumberOrders', { - get: function() { - return this.hosted_numbers.hostedNumberOrders; - } + get: function() { + return this.hosted_numbers.hostedNumberOrders; + } }); Object.defineProperty(Preview.prototype, 'availableAddOns', { - get: function() { - return this.marketplace.availableAddOns; - } + get: function() { + return this.marketplace.availableAddOns; + } }); Object.defineProperty(Preview.prototype, 'installedAddOns', { - get: function() { - return this.marketplace.installedAddOns; - } + get: function() { + return this.marketplace.installedAddOns; + } }); Object.defineProperty(Preview.prototype, 'services', { - get: function() { - return this.sync.services; - } + get: function() { + return this.sync.services; + } }); Object.defineProperty(Preview.prototype, 'assistants', { - get: function() { - return this.understand.assistants; - } + get: function() { + return this.understand.assistants; + } }); Object.defineProperty(Preview.prototype, 'commands', { - get: function() { - return this.wireless.commands; - } + get: function() { + return this.wireless.commands; + } }); Object.defineProperty(Preview.prototype, 'ratePlans', { - get: function() { - return this.wireless.ratePlans; - } + get: function() { + return this.wireless.ratePlans; + } }); Object.defineProperty(Preview.prototype, 'sims', { - get: function() { - return this.wireless.sims; - } + get: function() { + return this.wireless.sims; + } }); Object.defineProperty(Preview.prototype, 'brandedCalls', { - get: function() { - return this.trusted_comms.brandedCalls; - } + get: function() { + return this.trusted_comms.brandedCalls; + } }); Object.defineProperty(Preview.prototype, 'businesses', { - get: function() { - return this.trusted_comms.businesses; - } + get: function() { + return this.trusted_comms.businesses; + } }); Object.defineProperty(Preview.prototype, 'cps', { - get: function() { - return this.trusted_comms.cps; - } + get: function() { + return this.trusted_comms.cps; + } }); Object.defineProperty(Preview.prototype, 'currentCalls', { - get: function() { - return this.trusted_comms.currentCalls; - } + get: function() { + return this.trusted_comms.currentCalls; + } }); Object.defineProperty(Preview.prototype, 'devices', { - get: function() { - return this.trusted_comms.devices; - } + get: function() { + return this.trusted_comms.devices; + } }); Object.defineProperty(Preview.prototype, 'phoneCalls', { - get: function() { - return this.trusted_comms.phoneCalls; - } + get: function() { + return this.trusted_comms.phoneCalls; + } }); module.exports = Preview; diff --git a/lib/rest/Pricing.js b/lib/rest/Pricing.js index 051dbdad49..aa2785159b 100644 --- a/lib/rest/Pricing.js +++ b/lib/rest/Pricing.js @@ -44,39 +44,39 @@ Pricing.prototype.constructor = Pricing; Object.defineProperty(Pricing.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Pricing.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(Pricing.prototype, 'messaging', { - get: function() { - return this.v1.messaging; - } + get: function() { + return this.v1.messaging; + } }); Object.defineProperty(Pricing.prototype, 'phoneNumbers', { - get: function() { - return this.v1.phoneNumbers; - } + get: function() { + return this.v1.phoneNumbers; + } }); Object.defineProperty(Pricing.prototype, 'voice', { - get: function() { - return this.v2.voice; - } + get: function() { + return this.v2.voice; + } }); module.exports = Pricing; diff --git a/lib/rest/Proxy.js b/lib/rest/Proxy.js index a1057a9cc9..e4cb791493 100644 --- a/lib/rest/Proxy.js +++ b/lib/rest/Proxy.js @@ -38,17 +38,17 @@ Proxy.prototype.constructor = Proxy; Object.defineProperty(Proxy.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Proxy.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Proxy; diff --git a/lib/rest/Serverless.js b/lib/rest/Serverless.js index 658b8d33bc..42b080beef 100644 --- a/lib/rest/Serverless.js +++ b/lib/rest/Serverless.js @@ -38,17 +38,17 @@ Serverless.prototype.constructor = Serverless; Object.defineProperty(Serverless.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Serverless.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Serverless; diff --git a/lib/rest/Studio.js b/lib/rest/Studio.js index 8efdd1a1e3..5c110ad6c8 100644 --- a/lib/rest/Studio.js +++ b/lib/rest/Studio.js @@ -42,32 +42,32 @@ Studio.prototype.constructor = Studio; Object.defineProperty(Studio.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Studio.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(Studio.prototype, 'flows', { - get: function() { - return this.v2.flows; - } + get: function() { + return this.v2.flows; + } }); Object.defineProperty(Studio.prototype, 'flowValid', { - get: function() { - return this.v2.flowValid; - } + get: function() { + return this.v2.flowValid; + } }); module.exports = Studio; diff --git a/lib/rest/Sync.js b/lib/rest/Sync.js index bc44e4ada6..a1947f0e50 100644 --- a/lib/rest/Sync.js +++ b/lib/rest/Sync.js @@ -38,17 +38,17 @@ Sync.prototype.constructor = Sync; Object.defineProperty(Sync.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Sync.prototype, 'services', { - get: function() { - return this.v1.services; - } + get: function() { + return this.v1.services; + } }); module.exports = Sync; diff --git a/lib/rest/Taskrouter.js b/lib/rest/Taskrouter.js index 83421b5147..5a8ef31439 100644 --- a/lib/rest/Taskrouter.js +++ b/lib/rest/Taskrouter.js @@ -38,17 +38,17 @@ Taskrouter.prototype.constructor = Taskrouter; Object.defineProperty(Taskrouter.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Taskrouter.prototype, 'workspaces', { - get: function() { - return this.v1.workspaces; - } + get: function() { + return this.v1.workspaces; + } }); module.exports = Taskrouter; diff --git a/lib/rest/Trunking.js b/lib/rest/Trunking.js index 8e00e2aea4..36a25ca880 100644 --- a/lib/rest/Trunking.js +++ b/lib/rest/Trunking.js @@ -38,17 +38,17 @@ Trunking.prototype.constructor = Trunking; Object.defineProperty(Trunking.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Trunking.prototype, 'trunks', { - get: function() { - return this.v1.trunks; - } + get: function() { + return this.v1.trunks; + } }); module.exports = Trunking; diff --git a/lib/rest/Twilio.d.ts b/lib/rest/Twilio.d.ts index 6c071b6468..f91c0993ca 100644 --- a/lib/rest/Twilio.d.ts +++ b/lib/rest/Twilio.d.ts @@ -60,6 +60,7 @@ declare class Twilio { conversations: Conversations; fax: Fax; flexApi: FlexApi; + httpClient?: RequestClient; incomingPhoneNumbers: (typeof Api.prototype.account.incomingPhoneNumbers); insights: Insights; ipMessaging: IpMessaging; @@ -143,15 +144,15 @@ declare namespace Twilio { * @property accountSid - The default accountSid. This is set to username if not provided * @property env - The environment object. Defaults to process.env * @property httpClient - The client used for http requests. Defaults to RequestClient + * @property lazyLoading - Enable lazy loading, loading time will decrease if enabled * @property region - Twilio region to use. Defaults to none - * @property lazyLoading - Enable lazy loading or not, loading time will decrease in enabled */ export interface TwilioClientOptions { accountSid?: string; env?: object; httpClient?: RequestClient; + lazyLoading?: boolean; region?: string; - lazyLoading?: boolean } } diff --git a/lib/rest/Twilio.js b/lib/rest/Twilio.js index 918a17f4f3..924c28fe77 100644 --- a/lib/rest/Twilio.js +++ b/lib/rest/Twilio.js @@ -14,6 +14,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var util = require('util'); /* jshint ignore:line */ var RestException = require('../base/RestException'); /* jshint ignore:line */ + /* jshint ignore:start */ /** * Twilio Client to interact with the Rest API @@ -101,7 +102,8 @@ var RestException = require('../base/RestException'); /* jshint ignore:line */ * The default accountSid. This is set to username if not provided * @param {object} [opts.env] - The environment object. Defaults to process.env * @param {string} [opts.region] - Twilio region to use. Defaults to none - * @param {boolean} [opts.lazyLoading] - Enable lazy loading or not, loading time will decrease in enabled + * @param {boolean} [opts.lazyLoading] - + * Enable lazy loading, loading time will decrease if enabled * * @returns {Twilio} A new instance of Twilio client */ @@ -161,33 +163,33 @@ function Twilio(username, password, opts) { this._wireless = undefined; if (!opts.lazyLoading) { - this._accounts = this.accounts; - this._api = this.api; - this._authy = this.authy; - this._autopilot = this.autopilot; - this._chat = this.chat; - this._conversations = this.conversations; - this._fax = this.fax; - this._flexApi = this.flexApi; - this._insights = this.insights; - this._ipMessaging = this.ipMessaging; - this._lookups = this.lookups; - this._messaging = this.messaging; - this._monitor = this.monitor; - this._notify = this.notify; - this._numbers = this.numbers; - this._preview = this.preview; - this._pricing = this.pricing; - this._proxy = this.proxy; - this._serverless = this.serverless; - this._studio = this.studio; - this._sync = this.sync; - this._taskrouter = this.taskrouter; - this._trunking = this.trunking; - this._verify = this.verify; - this._video = this.video; - this._voice = this.voice; - this._wireless = this.wireless; + this.accounts; + this.api; + this.authy; + this.autopilot; + this.chat; + this.conversations; + this.fax; + this.flexApi; + this.insights; + this.ipMessaging; + this.lookups; + this.messaging; + this.monitor; + this.notify; + this.numbers; + this.preview; + this.pricing; + this.proxy; + this.serverless; + this.studio; + this.sync; + this.taskrouter; + this.trunking; + this.verify; + this.video; + this.voice; + this.wireless; } } @@ -288,478 +290,478 @@ Twilio.prototype.validateSslCert = function validateSslCert() { Object.defineProperty(Twilio.prototype, 'httpClient', { - get: function() { - if (!this._httpClient) { - var RequestClient = require('../base/RequestClient'); /* jshint ignore:line */ - this._httpClient = new RequestClient(); + get: function() { + if (!this._httpClient) { + var RequestClient = require('../base/RequestClient'); /* jshint ignore:line */ + this._httpClient = new RequestClient(); + } + return this._httpClient; } - return this._httpClient; - } }); Object.defineProperty(Twilio.prototype, 'accounts', { - get: function() { - if (!this._accounts) { - var Accounts = require('./Accounts'); /* jshint ignore:line */ - this._accounts = new Accounts(this); + get: function() { + if (!this._accounts) { + var Accounts = require('./Accounts'); /* jshint ignore:line */ + this._accounts = new Accounts(this); + } + return this._accounts; } - return this._accounts; - } }); Object.defineProperty(Twilio.prototype, 'api', { - get: function() { - if (!this._api) { - var Api = require('./Api'); /* jshint ignore:line */ - this._api = new Api(this); + get: function() { + if (!this._api) { + var Api = require('./Api'); /* jshint ignore:line */ + this._api = new Api(this); + } + return this._api; } - return this._api; - } }); Object.defineProperty(Twilio.prototype, 'authy', { - get: function() { - if (!this._authy) { - var Authy = require('./Authy'); /* jshint ignore:line */ - this._authy = new Authy(this); + get: function() { + if (!this._authy) { + var Authy = require('./Authy'); /* jshint ignore:line */ + this._authy = new Authy(this); + } + return this._authy; } - return this._authy; - } }); Object.defineProperty(Twilio.prototype, 'autopilot', { - get: function() { - if (!this._autopilot) { - var Autopilot = require('./Autopilot'); /* jshint ignore:line */ - this._autopilot = new Autopilot(this); + get: function() { + if (!this._autopilot) { + var Autopilot = require('./Autopilot'); /* jshint ignore:line */ + this._autopilot = new Autopilot(this); + } + return this._autopilot; } - return this._autopilot; - } }); Object.defineProperty(Twilio.prototype, 'chat', { - get: function() { - if (!this._chat) { - var Chat = require('./Chat'); /* jshint ignore:line */ - this._chat = new Chat(this); + get: function() { + if (!this._chat) { + var Chat = require('./Chat'); /* jshint ignore:line */ + this._chat = new Chat(this); + } + return this._chat; } - return this._chat; - } }); Object.defineProperty(Twilio.prototype, 'conversations', { - get: function() { - if (!this._conversations) { - var Conversations = require('./Conversations'); /* jshint ignore:line */ - this._conversations = new Conversations(this); + get: function() { + if (!this._conversations) { + var Conversations = require('./Conversations'); /* jshint ignore:line */ + this._conversations = new Conversations(this); + } + return this._conversations; } - return this._conversations; - } }); Object.defineProperty(Twilio.prototype, 'fax', { - get: function() { - if (!this._fax) { - var Fax = require('./Fax'); /* jshint ignore:line */ - this._fax = new Fax(this); + get: function() { + if (!this._fax) { + var Fax = require('./Fax'); /* jshint ignore:line */ + this._fax = new Fax(this); + } + return this._fax; } - return this._fax; - } }); Object.defineProperty(Twilio.prototype, 'flexApi', { - get: function() { - if (!this._flexApi) { - var FlexApi = require('./FlexApi'); /* jshint ignore:line */ - this._flexApi = new FlexApi(this); + get: function() { + if (!this._flexApi) { + var FlexApi = require('./FlexApi'); /* jshint ignore:line */ + this._flexApi = new FlexApi(this); + } + return this._flexApi; } - return this._flexApi; - } }); Object.defineProperty(Twilio.prototype, 'insights', { - get: function() { - if (!this._insights) { - var Insights = require('./Insights'); /* jshint ignore:line */ - this._insights = new Insights(this); + get: function() { + if (!this._insights) { + var Insights = require('./Insights'); /* jshint ignore:line */ + this._insights = new Insights(this); + } + return this._insights; } - return this._insights; - } }); Object.defineProperty(Twilio.prototype, 'ipMessaging', { - get: function() { - if (!this._ipMessaging) { - var IpMessaging = require('./IpMessaging'); /* jshint ignore:line */ - this._ipMessaging = new IpMessaging(this); + get: function() { + if (!this._ipMessaging) { + var IpMessaging = require('./IpMessaging'); /* jshint ignore:line */ + this._ipMessaging = new IpMessaging(this); + } + return this._ipMessaging; } - return this._ipMessaging; - } }); Object.defineProperty(Twilio.prototype, 'lookups', { - get: function() { - if (!this._lookups) { - var Lookups = require('./Lookups'); /* jshint ignore:line */ - this._lookups = new Lookups(this); + get: function() { + if (!this._lookups) { + var Lookups = require('./Lookups'); /* jshint ignore:line */ + this._lookups = new Lookups(this); + } + return this._lookups; } - return this._lookups; - } }); Object.defineProperty(Twilio.prototype, 'messaging', { - get: function() { - if (!this._messaging) { - var Messaging = require('./Messaging'); /* jshint ignore:line */ - this._messaging = new Messaging(this); + get: function() { + if (!this._messaging) { + var Messaging = require('./Messaging'); /* jshint ignore:line */ + this._messaging = new Messaging(this); + } + return this._messaging; } - return this._messaging; - } }); Object.defineProperty(Twilio.prototype, 'monitor', { - get: function() { - if (!this._monitor) { - var Monitor = require('./Monitor'); /* jshint ignore:line */ - this._monitor = new Monitor(this); + get: function() { + if (!this._monitor) { + var Monitor = require('./Monitor'); /* jshint ignore:line */ + this._monitor = new Monitor(this); + } + return this._monitor; } - return this._monitor; - } }); Object.defineProperty(Twilio.prototype, 'notify', { - get: function() { - if (!this._notify) { - var Notify = require('./Notify'); /* jshint ignore:line */ - this._notify = new Notify(this); + get: function() { + if (!this._notify) { + var Notify = require('./Notify'); /* jshint ignore:line */ + this._notify = new Notify(this); + } + return this._notify; } - return this._notify; - } }); Object.defineProperty(Twilio.prototype, 'numbers', { - get: function() { - if (!this._numbers) { - var Numbers = require('./Numbers'); /* jshint ignore:line */ - this._numbers = new Numbers(this); + get: function() { + if (!this._numbers) { + var Numbers = require('./Numbers'); /* jshint ignore:line */ + this._numbers = new Numbers(this); + } + return this._numbers; } - return this._numbers; - } }); Object.defineProperty(Twilio.prototype, 'preview', { - get: function() { - if (!this._preview) { - var Preview = require('./Preview'); /* jshint ignore:line */ - this._preview = new Preview(this); + get: function() { + if (!this._preview) { + var Preview = require('./Preview'); /* jshint ignore:line */ + this._preview = new Preview(this); + } + return this._preview; } - return this._preview; - } }); Object.defineProperty(Twilio.prototype, 'pricing', { - get: function() { - if (!this._pricing) { - var Pricing = require('./Pricing'); /* jshint ignore:line */ - this._pricing = new Pricing(this); + get: function() { + if (!this._pricing) { + var Pricing = require('./Pricing'); /* jshint ignore:line */ + this._pricing = new Pricing(this); + } + return this._pricing; } - return this._pricing; - } }); Object.defineProperty(Twilio.prototype, 'proxy', { - get: function() { - if (!this._proxy) { - var Proxy = require('./Proxy'); /* jshint ignore:line */ - this._proxy = new Proxy(this); + get: function() { + if (!this._proxy) { + var Proxy = require('./Proxy'); /* jshint ignore:line */ + this._proxy = new Proxy(this); + } + return this._proxy; } - return this._proxy; - } }); Object.defineProperty(Twilio.prototype, 'serverless', { - get: function() { - if (!this._serverless) { - var Serverless = require('./Serverless'); /* jshint ignore:line */ - this._serverless = new Serverless(this); + get: function() { + if (!this._serverless) { + var Serverless = require('./Serverless'); /* jshint ignore:line */ + this._serverless = new Serverless(this); + } + return this._serverless; } - return this._serverless; - } }); Object.defineProperty(Twilio.prototype, 'studio', { - get: function() { - if (!this._studio) { - var Studio = require('./Studio'); /* jshint ignore:line */ - this._studio = new Studio(this); + get: function() { + if (!this._studio) { + var Studio = require('./Studio'); /* jshint ignore:line */ + this._studio = new Studio(this); + } + return this._studio; } - return this._studio; - } }); Object.defineProperty(Twilio.prototype, 'sync', { - get: function() { - if (!this._sync) { - var Sync = require('./Sync'); /* jshint ignore:line */ - this._sync = new Sync(this); + get: function() { + if (!this._sync) { + var Sync = require('./Sync'); /* jshint ignore:line */ + this._sync = new Sync(this); + } + return this._sync; } - return this._sync; - } }); Object.defineProperty(Twilio.prototype, 'taskrouter', { - get: function() { - if (!this._taskrouter) { - var Taskrouter = require('./Taskrouter'); /* jshint ignore:line */ - this._taskrouter = new Taskrouter(this); + get: function() { + if (!this._taskrouter) { + var Taskrouter = require('./Taskrouter'); /* jshint ignore:line */ + this._taskrouter = new Taskrouter(this); + } + return this._taskrouter; } - return this._taskrouter; - } }); Object.defineProperty(Twilio.prototype, 'trunking', { - get: function() { - if (!this._trunking) { - var Trunking = require('./Trunking'); /* jshint ignore:line */ - this._trunking = new Trunking(this); + get: function() { + if (!this._trunking) { + var Trunking = require('./Trunking'); /* jshint ignore:line */ + this._trunking = new Trunking(this); + } + return this._trunking; } - return this._trunking; - } }); Object.defineProperty(Twilio.prototype, 'verify', { - get: function() { - if (!this._verify) { - var Verify = require('./Verify'); /* jshint ignore:line */ - this._verify = new Verify(this); + get: function() { + if (!this._verify) { + var Verify = require('./Verify'); /* jshint ignore:line */ + this._verify = new Verify(this); + } + return this._verify; } - return this._verify; - } }); Object.defineProperty(Twilio.prototype, 'video', { - get: function() { - if (!this._video) { - var Video = require('./Video'); /* jshint ignore:line */ - this._video = new Video(this); + get: function() { + if (!this._video) { + var Video = require('./Video'); /* jshint ignore:line */ + this._video = new Video(this); + } + return this._video; } - return this._video; - } }); Object.defineProperty(Twilio.prototype, 'voice', { - get: function() { - if (!this._voice) { - var Voice = require('./Voice'); /* jshint ignore:line */ - this._voice = new Voice(this); + get: function() { + if (!this._voice) { + var Voice = require('./Voice'); /* jshint ignore:line */ + this._voice = new Voice(this); + } + return this._voice; } - return this._voice; - } }); Object.defineProperty(Twilio.prototype, 'wireless', { - get: function() { - if (!this._wireless) { - var Wireless = require('./Wireless'); /* jshint ignore:line */ - this._wireless = new Wireless(this); + get: function() { + if (!this._wireless) { + var Wireless = require('./Wireless'); /* jshint ignore:line */ + this._wireless = new Wireless(this); + } + return this._wireless; } - return this._wireless; - } }); Object.defineProperty(Twilio.prototype, 'addresses', { - get: function() { - return this.api.account.addresses; - } + get: function() { + return this.api.account.addresses; + } }); Object.defineProperty(Twilio.prototype, 'applications', { - get: function() { - return this.api.account.applications; - } + get: function() { + return this.api.account.applications; + } }); Object.defineProperty(Twilio.prototype, 'authorizedConnectApps', { - get: function() { - return this.api.account.authorizedConnectApps; - } + get: function() { + return this.api.account.authorizedConnectApps; + } }); Object.defineProperty(Twilio.prototype, 'availablePhoneNumbers', { - get: function() { - return this.api.account.availablePhoneNumbers; - } + get: function() { + return this.api.account.availablePhoneNumbers; + } }); Object.defineProperty(Twilio.prototype, 'balance', { - get: function() { - return this.api.account.balance; - } + get: function() { + return this.api.account.balance; + } }); Object.defineProperty(Twilio.prototype, 'calls', { - get: function() { - return this.api.account.calls; - } + get: function() { + return this.api.account.calls; + } }); Object.defineProperty(Twilio.prototype, 'conferences', { - get: function() { - return this.api.account.conferences; - } + get: function() { + return this.api.account.conferences; + } }); Object.defineProperty(Twilio.prototype, 'connectApps', { - get: function() { - return this.api.account.connectApps; - } + get: function() { + return this.api.account.connectApps; + } }); Object.defineProperty(Twilio.prototype, 'incomingPhoneNumbers', { - get: function() { - return this.api.account.incomingPhoneNumbers; - } + get: function() { + return this.api.account.incomingPhoneNumbers; + } }); Object.defineProperty(Twilio.prototype, 'keys', { - get: function() { - return this.api.account.keys; - } + get: function() { + return this.api.account.keys; + } }); Object.defineProperty(Twilio.prototype, 'messages', { - get: function() { - return this.api.account.messages; - } + get: function() { + return this.api.account.messages; + } }); Object.defineProperty(Twilio.prototype, 'newKeys', { - get: function() { - return this.api.account.newKeys; - } + get: function() { + return this.api.account.newKeys; + } }); Object.defineProperty(Twilio.prototype, 'newSigningKeys', { - get: function() { - return this.api.account.newSigningKeys; - } + get: function() { + return this.api.account.newSigningKeys; + } }); Object.defineProperty(Twilio.prototype, 'notifications', { - get: function() { - return this.api.account.notifications; - } + get: function() { + return this.api.account.notifications; + } }); Object.defineProperty(Twilio.prototype, 'outgoingCallerIds', { - get: function() { - return this.api.account.outgoingCallerIds; - } + get: function() { + return this.api.account.outgoingCallerIds; + } }); Object.defineProperty(Twilio.prototype, 'queues', { - get: function() { - return this.api.account.queues; - } + get: function() { + return this.api.account.queues; + } }); Object.defineProperty(Twilio.prototype, 'recordings', { - get: function() { - return this.api.account.recordings; - } + get: function() { + return this.api.account.recordings; + } }); Object.defineProperty(Twilio.prototype, 'signingKeys', { - get: function() { - return this.api.account.signingKeys; - } + get: function() { + return this.api.account.signingKeys; + } }); Object.defineProperty(Twilio.prototype, 'sip', { - get: function() { - return this.api.account.sip; - } + get: function() { + return this.api.account.sip; + } }); Object.defineProperty(Twilio.prototype, 'shortCodes', { - get: function() { - return this.api.account.shortCodes; - } + get: function() { + return this.api.account.shortCodes; + } }); Object.defineProperty(Twilio.prototype, 'tokens', { - get: function() { - return this.api.account.tokens; - } + get: function() { + return this.api.account.tokens; + } }); Object.defineProperty(Twilio.prototype, 'transcriptions', { - get: function() { - return this.api.account.transcriptions; - } + get: function() { + return this.api.account.transcriptions; + } }); Object.defineProperty(Twilio.prototype, 'usage', { - get: function() { - return this.api.account.usage; - } + get: function() { + return this.api.account.usage; + } }); Object.defineProperty(Twilio.prototype, 'validationRequests', { - get: function() { - return this.api.account.validationRequests; - } + get: function() { + return this.api.account.validationRequests; + } }); module.exports = Twilio; diff --git a/lib/rest/Verify.js b/lib/rest/Verify.js index 24dba8bd25..51a82cb6d2 100644 --- a/lib/rest/Verify.js +++ b/lib/rest/Verify.js @@ -38,17 +38,17 @@ Verify.prototype.constructor = Verify; Object.defineProperty(Verify.prototype, 'v2', { - get: function() { - this._v2 = this._v2 || new V2(this); - return this._v2; - } + get: function() { + this._v2 = this._v2 || new V2(this); + return this._v2; + } }); Object.defineProperty(Verify.prototype, 'services', { - get: function() { - return this.v2.services; - } + get: function() { + return this.v2.services; + } }); module.exports = Verify; diff --git a/lib/rest/Video.js b/lib/rest/Video.js index 48a04f9a17..2fb722d607 100644 --- a/lib/rest/Video.js +++ b/lib/rest/Video.js @@ -46,52 +46,52 @@ Video.prototype.constructor = Video; Object.defineProperty(Video.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Video.prototype, 'compositions', { - get: function() { - return this.v1.compositions; - } + get: function() { + return this.v1.compositions; + } }); Object.defineProperty(Video.prototype, 'compositionHooks', { - get: function() { - return this.v1.compositionHooks; - } + get: function() { + return this.v1.compositionHooks; + } }); Object.defineProperty(Video.prototype, 'compositionSettings', { - get: function() { - return this.v1.compositionSettings; - } + get: function() { + return this.v1.compositionSettings; + } }); Object.defineProperty(Video.prototype, 'recordings', { - get: function() { - return this.v1.recordings; - } + get: function() { + return this.v1.recordings; + } }); Object.defineProperty(Video.prototype, 'recordingSettings', { - get: function() { - return this.v1.recordingSettings; - } + get: function() { + return this.v1.recordingSettings; + } }); Object.defineProperty(Video.prototype, 'rooms', { - get: function() { - return this.v1.rooms; - } + get: function() { + return this.v1.rooms; + } }); module.exports = Video; diff --git a/lib/rest/Voice.js b/lib/rest/Voice.js index 36925f3fb4..9a9e84e672 100644 --- a/lib/rest/Voice.js +++ b/lib/rest/Voice.js @@ -39,17 +39,17 @@ Voice.prototype.constructor = Voice; Object.defineProperty(Voice.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Voice.prototype, 'dialingPermissions', { - get: function() { - return this.v1.dialingPermissions; - } + get: function() { + return this.v1.dialingPermissions; + } }); module.exports = Voice; diff --git a/lib/rest/Wireless.js b/lib/rest/Wireless.js index c0b43fe249..c27b2acc1a 100644 --- a/lib/rest/Wireless.js +++ b/lib/rest/Wireless.js @@ -42,38 +42,38 @@ Wireless.prototype.constructor = Wireless; Object.defineProperty(Wireless.prototype, 'v1', { - get: function() { - this._v1 = this._v1 || new V1(this); - return this._v1; - } + get: function() { + this._v1 = this._v1 || new V1(this); + return this._v1; + } }); Object.defineProperty(Wireless.prototype, 'usageRecords', { - get: function() { - return this.v1.usageRecords; - } + get: function() { + return this.v1.usageRecords; + } }); Object.defineProperty(Wireless.prototype, 'commands', { - get: function() { - return this.v1.commands; - } + get: function() { + return this.v1.commands; + } }); Object.defineProperty(Wireless.prototype, 'ratePlans', { - get: function() { - return this.v1.ratePlans; - } + get: function() { + return this.v1.ratePlans; + } }); Object.defineProperty(Wireless.prototype, 'sims', { - get: function() { - return this.v1.sims; - } + get: function() { + return this.v1.sims; + } }); module.exports = Wireless; diff --git a/lib/rest/accounts/V1.js b/lib/rest/accounts/V1.js index 24585147e7..bb62d21c24 100644 --- a/lib/rest/accounts/V1.js +++ b/lib/rest/accounts/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); module.exports = V1; diff --git a/lib/rest/accounts/v1/credential.js b/lib/rest/accounts/v1/credential.js index 0521480fc3..e69b23f6d0 100644 --- a/lib/rest/accounts/v1/credential.js +++ b/lib/rest/accounts/v1/credential.js @@ -50,24 +50,24 @@ CredentialList = function CredentialList(version) { Object.defineProperty(CredentialListInstance, 'publicKey', { - get: function publicKey() { - if (!this._publicKey) { - this._publicKey = new PublicKeyList(this._version); - } + get: function publicKey() { + if (!this._publicKey) { + this._publicKey = new PublicKeyList(this._version); + } - return this._publicKey; - } + return this._publicKey; + } }); Object.defineProperty(CredentialListInstance, 'aws', { - get: function aws() { - if (!this._aws) { - this._aws = new AwsList(this._version); - } + get: function aws() { + if (!this._aws) { + this._aws = new AwsList(this._version); + } - return this._aws; - } + return this._aws; + } }); /* jshint ignore:start */ diff --git a/lib/rest/accounts/v1/credential/aws.js b/lib/rest/accounts/v1/credential/aws.js index 9c8016cbd7..378e128ef3 100644 --- a/lib/rest/accounts/v1/credential/aws.js +++ b/lib/rest/accounts/v1/credential/aws.js @@ -486,13 +486,13 @@ AwsInstance = function AwsInstance(version, payload, sid) { Object.defineProperty(AwsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AwsContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AwsContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/accounts/v1/credential/publicKey.js b/lib/rest/accounts/v1/credential/publicKey.js index b0abc95cb6..25804dc26b 100644 --- a/lib/rest/accounts/v1/credential/publicKey.js +++ b/lib/rest/accounts/v1/credential/publicKey.js @@ -487,13 +487,13 @@ PublicKeyInstance = function PublicKeyInstance(version, payload, sid) { Object.defineProperty(PublicKeyInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PublicKeyContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new PublicKeyContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/V2010.js b/lib/rest/api/V2010.js index d85f9c2ad9..a49fd44dbf 100644 --- a/lib/rest/api/V2010.js +++ b/lib/rest/api/V2010.js @@ -82,193 +82,193 @@ V2010.prototype.constructor = V2010; Object.defineProperty(V2010.prototype, 'accounts', { - get: function() { - this._accounts = this._accounts || new AccountList(this); - return this._accounts; - } + get: function() { + this._accounts = this._accounts || new AccountList(this); + return this._accounts; + } }); Object.defineProperty(V2010.prototype, 'account', { - get: function() { - if (!this._account) { - this._account = new AccountContext(this, this._domain.twilio.accountSid); - } + get: function() { + if (!this._account) { + this._account = new AccountContext(this, this._domain.twilio.accountSid); + } - return this._account; - }, + return this._account; + }, - set: function(accountContext) { - this._account = accountContext; - } + set: function(accountContext) { + this._account = accountContext; + } }); Object.defineProperty(V2010.prototype, 'addresses', { - get: function() { - return this.account.addresses; - } + get: function() { + return this.account.addresses; + } }); Object.defineProperty(V2010.prototype, 'applications', { - get: function() { - return this.account.applications; - } + get: function() { + return this.account.applications; + } }); Object.defineProperty(V2010.prototype, 'authorizedConnectApps', { - get: function() { - return this.account.authorizedConnectApps; - } + get: function() { + return this.account.authorizedConnectApps; + } }); Object.defineProperty(V2010.prototype, 'availablePhoneNumbers', { - get: function() { - return this.account.availablePhoneNumbers; - } + get: function() { + return this.account.availablePhoneNumbers; + } }); Object.defineProperty(V2010.prototype, 'balance', { - get: function() { - return this.account.balance; - } + get: function() { + return this.account.balance; + } }); Object.defineProperty(V2010.prototype, 'calls', { - get: function() { - return this.account.calls; - } + get: function() { + return this.account.calls; + } }); Object.defineProperty(V2010.prototype, 'conferences', { - get: function() { - return this.account.conferences; - } + get: function() { + return this.account.conferences; + } }); Object.defineProperty(V2010.prototype, 'connectApps', { - get: function() { - return this.account.connectApps; - } + get: function() { + return this.account.connectApps; + } }); Object.defineProperty(V2010.prototype, 'incomingPhoneNumbers', { - get: function() { - return this.account.incomingPhoneNumbers; - } + get: function() { + return this.account.incomingPhoneNumbers; + } }); Object.defineProperty(V2010.prototype, 'keys', { - get: function() { - return this.account.keys; - } + get: function() { + return this.account.keys; + } }); Object.defineProperty(V2010.prototype, 'messages', { - get: function() { - return this.account.messages; - } + get: function() { + return this.account.messages; + } }); Object.defineProperty(V2010.prototype, 'newKeys', { - get: function() { - return this.account.newKeys; - } + get: function() { + return this.account.newKeys; + } }); Object.defineProperty(V2010.prototype, 'newSigningKeys', { - get: function() { - return this.account.newSigningKeys; - } + get: function() { + return this.account.newSigningKeys; + } }); Object.defineProperty(V2010.prototype, 'notifications', { - get: function() { - return this.account.notifications; - } + get: function() { + return this.account.notifications; + } }); Object.defineProperty(V2010.prototype, 'outgoingCallerIds', { - get: function() { - return this.account.outgoingCallerIds; - } + get: function() { + return this.account.outgoingCallerIds; + } }); Object.defineProperty(V2010.prototype, 'queues', { - get: function() { - return this.account.queues; - } + get: function() { + return this.account.queues; + } }); Object.defineProperty(V2010.prototype, 'recordings', { - get: function() { - return this.account.recordings; - } + get: function() { + return this.account.recordings; + } }); Object.defineProperty(V2010.prototype, 'signingKeys', { - get: function() { - return this.account.signingKeys; - } + get: function() { + return this.account.signingKeys; + } }); Object.defineProperty(V2010.prototype, 'sip', { - get: function() { - return this.account.sip; - } + get: function() { + return this.account.sip; + } }); Object.defineProperty(V2010.prototype, 'shortCodes', { - get: function() { - return this.account.shortCodes; - } + get: function() { + return this.account.shortCodes; + } }); Object.defineProperty(V2010.prototype, 'tokens', { - get: function() { - return this.account.tokens; - } + get: function() { + return this.account.tokens; + } }); Object.defineProperty(V2010.prototype, 'transcriptions', { - get: function() { - return this.account.transcriptions; - } + get: function() { + return this.account.transcriptions; + } }); Object.defineProperty(V2010.prototype, 'usage', { - get: function() { - return this.account.usage; - } + get: function() { + return this.account.usage; + } }); Object.defineProperty(V2010.prototype, 'validationRequests', { - get: function() { - return this.account.validationRequests; - } + get: function() { + return this.account.validationRequests; + } }); module.exports = V2010; diff --git a/lib/rest/api/v2010/account.js b/lib/rest/api/v2010/account.js index 99eb311bf2..e375096c41 100644 --- a/lib/rest/api/v2010/account.js +++ b/lib/rest/api/v2010/account.js @@ -522,13 +522,13 @@ AccountInstance = function AccountInstance(version, payload, sid) { Object.defineProperty(AccountInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AccountContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AccountContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -1096,245 +1096,245 @@ AccountContext.prototype.update = function update(opts, callback) { Object.defineProperty(AccountContext.prototype, 'addresses', { - get: function() { - if (!this._addresses) { - this._addresses = new AddressList(this._version, this._solution.sid); + get: function() { + if (!this._addresses) { + this._addresses = new AddressList(this._version, this._solution.sid); + } + return this._addresses; } - return this._addresses; - } }); Object.defineProperty(AccountContext.prototype, 'applications', { - get: function() { - if (!this._applications) { - this._applications = new ApplicationList(this._version, this._solution.sid); + get: function() { + if (!this._applications) { + this._applications = new ApplicationList(this._version, this._solution.sid); + } + return this._applications; } - return this._applications; - } }); Object.defineProperty(AccountContext.prototype, 'authorizedConnectApps', { - get: function() { - if (!this._authorizedConnectApps) { - this._authorizedConnectApps = new AuthorizedConnectAppList(this._version, this._solution.sid); + get: function() { + if (!this._authorizedConnectApps) { + this._authorizedConnectApps = new AuthorizedConnectAppList(this._version, this._solution.sid); + } + return this._authorizedConnectApps; } - return this._authorizedConnectApps; - } }); Object.defineProperty(AccountContext.prototype, 'availablePhoneNumbers', { - get: function() { - if (!this._availablePhoneNumbers) { - this._availablePhoneNumbers = new AvailablePhoneNumberCountryList( - this._version, - this._solution.sid - ); + get: function() { + if (!this._availablePhoneNumbers) { + this._availablePhoneNumbers = new AvailablePhoneNumberCountryList( + this._version, + this._solution.sid + ); + } + return this._availablePhoneNumbers; } - return this._availablePhoneNumbers; - } }); Object.defineProperty(AccountContext.prototype, 'balance', { - get: function() { - if (!this._balance) { - this._balance = new BalanceList(this._version, this._solution.sid); + get: function() { + if (!this._balance) { + this._balance = new BalanceList(this._version, this._solution.sid); + } + return this._balance; } - return this._balance; - } }); Object.defineProperty(AccountContext.prototype, 'calls', { - get: function() { - if (!this._calls) { - this._calls = new CallList(this._version, this._solution.sid); + get: function() { + if (!this._calls) { + this._calls = new CallList(this._version, this._solution.sid); + } + return this._calls; } - return this._calls; - } }); Object.defineProperty(AccountContext.prototype, 'conferences', { - get: function() { - if (!this._conferences) { - this._conferences = new ConferenceList(this._version, this._solution.sid); + get: function() { + if (!this._conferences) { + this._conferences = new ConferenceList(this._version, this._solution.sid); + } + return this._conferences; } - return this._conferences; - } }); Object.defineProperty(AccountContext.prototype, 'connectApps', { - get: function() { - if (!this._connectApps) { - this._connectApps = new ConnectAppList(this._version, this._solution.sid); + get: function() { + if (!this._connectApps) { + this._connectApps = new ConnectAppList(this._version, this._solution.sid); + } + return this._connectApps; } - return this._connectApps; - } }); Object.defineProperty(AccountContext.prototype, 'incomingPhoneNumbers', { - get: function() { - if (!this._incomingPhoneNumbers) { - this._incomingPhoneNumbers = new IncomingPhoneNumberList(this._version, this._solution.sid); + get: function() { + if (!this._incomingPhoneNumbers) { + this._incomingPhoneNumbers = new IncomingPhoneNumberList(this._version, this._solution.sid); + } + return this._incomingPhoneNumbers; } - return this._incomingPhoneNumbers; - } }); Object.defineProperty(AccountContext.prototype, 'keys', { - get: function() { - if (!this._keys) { - this._keys = new KeyList(this._version, this._solution.sid); + get: function() { + if (!this._keys) { + this._keys = new KeyList(this._version, this._solution.sid); + } + return this._keys; } - return this._keys; - } }); Object.defineProperty(AccountContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(AccountContext.prototype, 'newKeys', { - get: function() { - if (!this._newKeys) { - this._newKeys = new NewKeyList(this._version, this._solution.sid); + get: function() { + if (!this._newKeys) { + this._newKeys = new NewKeyList(this._version, this._solution.sid); + } + return this._newKeys; } - return this._newKeys; - } }); Object.defineProperty(AccountContext.prototype, 'newSigningKeys', { - get: function() { - if (!this._newSigningKeys) { - this._newSigningKeys = new NewSigningKeyList(this._version, this._solution.sid); + get: function() { + if (!this._newSigningKeys) { + this._newSigningKeys = new NewSigningKeyList(this._version, this._solution.sid); + } + return this._newSigningKeys; } - return this._newSigningKeys; - } }); Object.defineProperty(AccountContext.prototype, 'notifications', { - get: function() { - if (!this._notifications) { - this._notifications = new NotificationList(this._version, this._solution.sid); + get: function() { + if (!this._notifications) { + this._notifications = new NotificationList(this._version, this._solution.sid); + } + return this._notifications; } - return this._notifications; - } }); Object.defineProperty(AccountContext.prototype, 'outgoingCallerIds', { - get: function() { - if (!this._outgoingCallerIds) { - this._outgoingCallerIds = new OutgoingCallerIdList(this._version, this._solution.sid); + get: function() { + if (!this._outgoingCallerIds) { + this._outgoingCallerIds = new OutgoingCallerIdList(this._version, this._solution.sid); + } + return this._outgoingCallerIds; } - return this._outgoingCallerIds; - } }); Object.defineProperty(AccountContext.prototype, 'queues', { - get: function() { - if (!this._queues) { - this._queues = new QueueList(this._version, this._solution.sid); + get: function() { + if (!this._queues) { + this._queues = new QueueList(this._version, this._solution.sid); + } + return this._queues; } - return this._queues; - } }); Object.defineProperty(AccountContext.prototype, 'recordings', { - get: function() { - if (!this._recordings) { - this._recordings = new RecordingList(this._version, this._solution.sid); + get: function() { + if (!this._recordings) { + this._recordings = new RecordingList(this._version, this._solution.sid); + } + return this._recordings; } - return this._recordings; - } }); Object.defineProperty(AccountContext.prototype, 'signingKeys', { - get: function() { - if (!this._signingKeys) { - this._signingKeys = new SigningKeyList(this._version, this._solution.sid); + get: function() { + if (!this._signingKeys) { + this._signingKeys = new SigningKeyList(this._version, this._solution.sid); + } + return this._signingKeys; } - return this._signingKeys; - } }); Object.defineProperty(AccountContext.prototype, 'sip', { - get: function() { - if (!this._sip) { - this._sip = new SipList(this._version, this._solution.sid); + get: function() { + if (!this._sip) { + this._sip = new SipList(this._version, this._solution.sid); + } + return this._sip; } - return this._sip; - } }); Object.defineProperty(AccountContext.prototype, 'shortCodes', { - get: function() { - if (!this._shortCodes) { - this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + get: function() { + if (!this._shortCodes) { + this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + } + return this._shortCodes; } - return this._shortCodes; - } }); Object.defineProperty(AccountContext.prototype, 'tokens', { - get: function() { - if (!this._tokens) { - this._tokens = new TokenList(this._version, this._solution.sid); + get: function() { + if (!this._tokens) { + this._tokens = new TokenList(this._version, this._solution.sid); + } + return this._tokens; } - return this._tokens; - } }); Object.defineProperty(AccountContext.prototype, 'transcriptions', { - get: function() { - if (!this._transcriptions) { - this._transcriptions = new TranscriptionList(this._version, this._solution.sid); + get: function() { + if (!this._transcriptions) { + this._transcriptions = new TranscriptionList(this._version, this._solution.sid); + } + return this._transcriptions; } - return this._transcriptions; - } }); Object.defineProperty(AccountContext.prototype, 'usage', { - get: function() { - if (!this._usage) { - this._usage = new UsageList(this._version, this._solution.sid); + get: function() { + if (!this._usage) { + this._usage = new UsageList(this._version, this._solution.sid); + } + return this._usage; } - return this._usage; - } }); Object.defineProperty(AccountContext.prototype, 'validationRequests', { - get: function() { - if (!this._validationRequests) { - this._validationRequests = new ValidationRequestList(this._version, this._solution.sid); + get: function() { + if (!this._validationRequests) { + this._validationRequests = new ValidationRequestList(this._version, this._solution.sid); + } + return this._validationRequests; } - return this._validationRequests; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/address.js b/lib/rest/api/v2010/account/address.js index c1dff990a5..d230bdb6b1 100644 --- a/lib/rest/api/v2010/account/address.js +++ b/lib/rest/api/v2010/account/address.js @@ -568,13 +568,13 @@ AddressInstance = function AddressInstance(version, payload, accountSid, sid) { Object.defineProperty(AddressInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AddressContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AddressContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -836,16 +836,16 @@ AddressContext.prototype.update = function update(opts, callback) { Object.defineProperty(AddressContext.prototype, 'dependentPhoneNumbers', { - get: function() { - if (!this._dependentPhoneNumbers) { - this._dependentPhoneNumbers = new DependentPhoneNumberList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._dependentPhoneNumbers) { + this._dependentPhoneNumbers = new DependentPhoneNumberList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._dependentPhoneNumbers; } - return this._dependentPhoneNumbers; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/application.js b/lib/rest/api/v2010/account/application.js index afc19a2dd4..99cdd0a3a6 100644 --- a/lib/rest/api/v2010/account/application.js +++ b/lib/rest/api/v2010/account/application.js @@ -575,17 +575,17 @@ ApplicationInstance = function ApplicationInstance(version, payload, accountSid, Object.defineProperty(ApplicationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ApplicationContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ApplicationContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/authorizedConnectApp.js b/lib/rest/api/v2010/account/authorizedConnectApp.js index 9557f7ba27..9b4f5a0ea3 100644 --- a/lib/rest/api/v2010/account/authorizedConnectApp.js +++ b/lib/rest/api/v2010/account/authorizedConnectApp.js @@ -454,17 +454,17 @@ AuthorizedConnectAppInstance = function AuthorizedConnectAppInstance(version, Object.defineProperty(AuthorizedConnectAppInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AuthorizedConnectAppContext( - this._version, - this._solution.accountSid, - this._solution.connectAppSid - ); - } + get: function() { + if (!this._context) { + this._context = new AuthorizedConnectAppContext( + this._version, + this._solution.accountSid, + this._solution.connectAppSid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/availablePhoneNumber.js b/lib/rest/api/v2010/account/availablePhoneNumber.js index f520430794..361b4467e6 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumber.js +++ b/lib/rest/api/v2010/account/availablePhoneNumber.js @@ -461,17 +461,17 @@ AvailablePhoneNumberCountryInstance = function Object.defineProperty(AvailablePhoneNumberCountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AvailablePhoneNumberCountryContext( - this._version, - this._solution.accountSid, - this._solution.countryCode - ); - } + get: function() { + if (!this._context) { + this._context = new AvailablePhoneNumberCountryContext( + this._version, + this._solution.accountSid, + this._solution.countryCode + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -700,88 +700,88 @@ AvailablePhoneNumberCountryContext.prototype.fetch = function fetch(callback) { Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'local', { - get: function() { - if (!this._local) { - this._local = new LocalList(this._version, this._solution.accountSid, this._solution.countryCode); + get: function() { + if (!this._local) { + this._local = new LocalList(this._version, this._solution.accountSid, this._solution.countryCode); + } + return this._local; } - return this._local; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'tollFree', { - get: function() { - if (!this._tollFree) { - this._tollFree = new TollFreeList( - this._version, - this._solution.accountSid, - this._solution.countryCode - ); + get: function() { + if (!this._tollFree) { + this._tollFree = new TollFreeList( + this._version, + this._solution.accountSid, + this._solution.countryCode + ); + } + return this._tollFree; } - return this._tollFree; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'mobile', { - get: function() { - if (!this._mobile) { - this._mobile = new MobileList(this._version, this._solution.accountSid, this._solution.countryCode); + get: function() { + if (!this._mobile) { + this._mobile = new MobileList(this._version, this._solution.accountSid, this._solution.countryCode); + } + return this._mobile; } - return this._mobile; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'national', { - get: function() { - if (!this._national) { - this._national = new NationalList( - this._version, - this._solution.accountSid, - this._solution.countryCode - ); + get: function() { + if (!this._national) { + this._national = new NationalList( + this._version, + this._solution.accountSid, + this._solution.countryCode + ); + } + return this._national; } - return this._national; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'voip', { - get: function() { - if (!this._voip) { - this._voip = new VoipList(this._version, this._solution.accountSid, this._solution.countryCode); + get: function() { + if (!this._voip) { + this._voip = new VoipList(this._version, this._solution.accountSid, this._solution.countryCode); + } + return this._voip; } - return this._voip; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'sharedCost', { - get: function() { - if (!this._sharedCost) { - this._sharedCost = new SharedCostList( - this._version, - this._solution.accountSid, - this._solution.countryCode - ); + get: function() { + if (!this._sharedCost) { + this._sharedCost = new SharedCostList( + this._version, + this._solution.accountSid, + this._solution.countryCode + ); + } + return this._sharedCost; } - return this._sharedCost; - } }); Object.defineProperty(AvailablePhoneNumberCountryContext.prototype, 'machineToMachine', { - get: function() { - if (!this._machineToMachine) { - this._machineToMachine = new MachineToMachineList( - this._version, - this._solution.accountSid, - this._solution.countryCode - ); + get: function() { + if (!this._machineToMachine) { + this._machineToMachine = new MachineToMachineList( + this._version, + this._solution.accountSid, + this._solution.countryCode + ); + } + return this._machineToMachine; } - return this._machineToMachine; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call.js b/lib/rest/api/v2010/account/call.js index 84618a33d8..70989bd530 100644 --- a/lib/rest/api/v2010/account/call.js +++ b/lib/rest/api/v2010/account/call.js @@ -508,13 +508,13 @@ CallList = function CallList(version, accountSid) { Object.defineProperty(CallListInstance, 'feedbackSummaries', { - get: function feedbackSummaries() { - if (!this._feedbackSummaries) { - this._feedbackSummaries = new FeedbackSummaryList(this._version, this._solution.accountSid); - } + get: function feedbackSummaries() { + if (!this._feedbackSummaries) { + this._feedbackSummaries = new FeedbackSummaryList(this._version, this._solution.accountSid); + } - return this._feedbackSummaries; - } + return this._feedbackSummaries; + } }); /* jshint ignore:start */ @@ -703,13 +703,13 @@ CallInstance = function CallInstance(version, payload, accountSid, sid) { Object.defineProperty(CallInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CallContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CallContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -1022,46 +1022,46 @@ CallContext.prototype.update = function update(opts, callback) { Object.defineProperty(CallContext.prototype, 'recordings', { - get: function() { - if (!this._recordings) { - this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._recordings) { + this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._recordings; } - return this._recordings; - } }); Object.defineProperty(CallContext.prototype, 'notifications', { - get: function() { - if (!this._notifications) { - this._notifications = new NotificationList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._notifications) { + this._notifications = new NotificationList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._notifications; } - return this._notifications; - } }); Object.defineProperty(CallContext.prototype, 'feedback', { - get: function() { - if (!this._feedback) { - this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._feedback) { + this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._feedback; } - return this._feedback; - } }); Object.defineProperty(CallContext.prototype, 'payments', { - get: function() { - if (!this._payments) { - this._payments = new PaymentList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._payments) { + this._payments = new PaymentList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._payments; } - return this._payments; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call/feedback.js b/lib/rest/api/v2010/account/call/feedback.js index 1afdb41160..768124e594 100644 --- a/lib/rest/api/v2010/account/call/feedback.js +++ b/lib/rest/api/v2010/account/call/feedback.js @@ -197,17 +197,17 @@ FeedbackInstance = function FeedbackInstance(version, payload, accountSid, Object.defineProperty(FeedbackInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FeedbackContext( - this._version, - this._solution.accountSid, - this._solution.callSid - ); + get: function() { + if (!this._context) { + this._context = new FeedbackContext( + this._version, + this._solution.accountSid, + this._solution.callSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call/feedbackSummary.js b/lib/rest/api/v2010/account/call/feedbackSummary.js index e65e818610..aaafed648f 100644 --- a/lib/rest/api/v2010/account/call/feedbackSummary.js +++ b/lib/rest/api/v2010/account/call/feedbackSummary.js @@ -282,17 +282,17 @@ FeedbackSummaryInstance = function FeedbackSummaryInstance(version, payload, Object.defineProperty(FeedbackSummaryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FeedbackSummaryContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._context) { + this._context = new FeedbackSummaryContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call/notification.js b/lib/rest/api/v2010/account/call/notification.js index 2fa9adfc5f..35050cbddc 100644 --- a/lib/rest/api/v2010/account/call/notification.js +++ b/lib/rest/api/v2010/account/call/notification.js @@ -497,18 +497,18 @@ NotificationInstance = function NotificationInstance(version, payload, Object.defineProperty(NotificationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new NotificationContext( - this._version, - this._solution.accountSid, - this._solution.callSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new NotificationContext( + this._version, + this._solution.accountSid, + this._solution.callSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call/payment.js b/lib/rest/api/v2010/account/call/payment.js index 6f23c998e2..e556caf56c 100644 --- a/lib/rest/api/v2010/account/call/payment.js +++ b/lib/rest/api/v2010/account/call/payment.js @@ -315,18 +315,18 @@ PaymentInstance = function PaymentInstance(version, payload, accountSid, Object.defineProperty(PaymentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PaymentContext( - this._version, - this._solution.accountSid, - this._solution.callSid, - this._solution.sid - ); + get: function() { + if (!this._context) { + this._context = new PaymentContext( + this._version, + this._solution.accountSid, + this._solution.callSid, + this._solution.sid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/call/recording.js b/lib/rest/api/v2010/account/call/recording.js index b447bd36e6..c9bcadb8a2 100644 --- a/lib/rest/api/v2010/account/call/recording.js +++ b/lib/rest/api/v2010/account/call/recording.js @@ -555,18 +555,18 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid, Object.defineProperty(RecordingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RecordingContext( - this._version, - this._solution.accountSid, - this._solution.callSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new RecordingContext( + this._version, + this._solution.accountSid, + this._solution.callSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/conference.js b/lib/rest/api/v2010/account/conference.js index 7793e045c3..93adf5595c 100644 --- a/lib/rest/api/v2010/account/conference.js +++ b/lib/rest/api/v2010/account/conference.js @@ -507,13 +507,13 @@ ConferenceInstance = function ConferenceInstance(version, payload, accountSid, Object.defineProperty(ConferenceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ConferenceContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ConferenceContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -727,26 +727,26 @@ ConferenceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ConferenceContext.prototype, 'participants', { - get: function() { - if (!this._participants) { - this._participants = new ParticipantList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._participants) { + this._participants = new ParticipantList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._participants; } - return this._participants; - } }); Object.defineProperty(ConferenceContext.prototype, 'recordings', { - get: function() { - if (!this._recordings) { - this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._recordings) { + this._recordings = new RecordingList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._recordings; } - return this._recordings; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/conference/participant.js b/lib/rest/api/v2010/account/conference/participant.js index b003a89f97..3d23e13442 100644 --- a/lib/rest/api/v2010/account/conference/participant.js +++ b/lib/rest/api/v2010/account/conference/participant.js @@ -642,18 +642,18 @@ ParticipantInstance = function ParticipantInstance(version, payload, accountSid, Object.defineProperty(ParticipantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ParticipantContext( - this._version, - this._solution.accountSid, - this._solution.conferenceSid, - this._solution.callSid - ); - } + get: function() { + if (!this._context) { + this._context = new ParticipantContext( + this._version, + this._solution.accountSid, + this._solution.conferenceSid, + this._solution.callSid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/conference/recording.js b/lib/rest/api/v2010/account/conference/recording.js index 13079199ac..d81227975e 100644 --- a/lib/rest/api/v2010/account/conference/recording.js +++ b/lib/rest/api/v2010/account/conference/recording.js @@ -502,18 +502,18 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid, Object.defineProperty(RecordingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RecordingContext( - this._version, - this._solution.accountSid, - this._solution.conferenceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new RecordingContext( + this._version, + this._solution.accountSid, + this._solution.conferenceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/connectApp.js b/lib/rest/api/v2010/account/connectApp.js index 8e050afd36..392773623a 100644 --- a/lib/rest/api/v2010/account/connectApp.js +++ b/lib/rest/api/v2010/account/connectApp.js @@ -451,13 +451,13 @@ ConnectAppInstance = function ConnectAppInstance(version, payload, accountSid, Object.defineProperty(ConnectAppInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ConnectAppContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ConnectAppContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber.js b/lib/rest/api/v2010/account/incomingPhoneNumber.js index 1f40c42f2f..aeac7f9cb0 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber.js @@ -467,35 +467,35 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) Object.defineProperty(IncomingPhoneNumberListInstance, 'local', { - get: function local() { - if (!this._local) { - this._local = new LocalList(this._version, this._solution.accountSid); - } + get: function local() { + if (!this._local) { + this._local = new LocalList(this._version, this._solution.accountSid); + } - return this._local; - } + return this._local; + } }); Object.defineProperty(IncomingPhoneNumberListInstance, 'mobile', { - get: function mobile() { - if (!this._mobile) { - this._mobile = new MobileList(this._version, this._solution.accountSid); - } + get: function mobile() { + if (!this._mobile) { + this._mobile = new MobileList(this._version, this._solution.accountSid); + } - return this._mobile; - } + return this._mobile; + } }); Object.defineProperty(IncomingPhoneNumberListInstance, 'tollFree', { - get: function tollFree() { - if (!this._tollFree) { - this._tollFree = new TollFreeList(this._version, this._solution.accountSid); - } + get: function tollFree() { + if (!this._tollFree) { + this._tollFree = new TollFreeList(this._version, this._solution.accountSid); + } - return this._tollFree; - } + return this._tollFree; + } }); /* jshint ignore:start */ @@ -699,17 +699,17 @@ IncomingPhoneNumberInstance = function IncomingPhoneNumberInstance(version, Object.defineProperty(IncomingPhoneNumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new IncomingPhoneNumberContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new IncomingPhoneNumberContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -1053,16 +1053,16 @@ IncomingPhoneNumberContext.prototype.remove = function remove(callback) { Object.defineProperty(IncomingPhoneNumberContext.prototype, 'assignedAddOns', { - get: function() { - if (!this._assignedAddOns) { - this._assignedAddOns = new AssignedAddOnList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._assignedAddOns) { + this._assignedAddOns = new AssignedAddOnList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._assignedAddOns; } - return this._assignedAddOns; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js index 0f0030a29e..68d325411f 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.js @@ -531,18 +531,18 @@ AssignedAddOnInstance = function AssignedAddOnInstance(version, payload, Object.defineProperty(AssignedAddOnInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssignedAddOnContext( - this._version, - this._solution.accountSid, - this._solution.resourceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AssignedAddOnContext( + this._version, + this._solution.accountSid, + this._solution.resourceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -719,17 +719,17 @@ AssignedAddOnContext.prototype.remove = function remove(callback) { Object.defineProperty(AssignedAddOnContext.prototype, 'extensions', { - get: function() { - if (!this._extensions) { - this._extensions = new AssignedAddOnExtensionList( - this._version, - this._solution.accountSid, - this._solution.resourceSid, - this._solution.sid - ); + get: function() { + if (!this._extensions) { + this._extensions = new AssignedAddOnExtensionList( + this._version, + this._solution.accountSid, + this._solution.resourceSid, + this._solution.sid + ); + } + return this._extensions; } - return this._extensions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js index 03b785571d..8540e5c135 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn/assignedAddOnExtension.js @@ -491,19 +491,19 @@ AssignedAddOnExtensionInstance = function Object.defineProperty(AssignedAddOnExtensionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssignedAddOnExtensionContext( - this._version, - this._solution.accountSid, - this._solution.resourceSid, - this._solution.assignedAddOnSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AssignedAddOnExtensionContext( + this._version, + this._solution.accountSid, + this._solution.resourceSid, + this._solution.assignedAddOnSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/key.js b/lib/rest/api/v2010/account/key.js index 0c7ced9bbb..7f5c6f7768 100644 --- a/lib/rest/api/v2010/account/key.js +++ b/lib/rest/api/v2010/account/key.js @@ -435,13 +435,13 @@ KeyInstance = function KeyInstance(version, payload, accountSid, sid) { Object.defineProperty(KeyInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new KeyContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new KeyContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/message.js b/lib/rest/api/v2010/account/message.js index e709645f7b..689dd55826 100644 --- a/lib/rest/api/v2010/account/message.js +++ b/lib/rest/api/v2010/account/message.js @@ -581,13 +581,13 @@ MessageInstance = function MessageInstance(version, payload, accountSid, sid) { Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new MessageContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -839,22 +839,22 @@ MessageContext.prototype.update = function update(opts, callback) { Object.defineProperty(MessageContext.prototype, 'media', { - get: function() { - if (!this._media) { - this._media = new MediaList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._media) { + this._media = new MediaList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._media; } - return this._media; - } }); Object.defineProperty(MessageContext.prototype, 'feedback', { - get: function() { - if (!this._feedback) { - this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._feedback) { + this._feedback = new FeedbackList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._feedback; } - return this._feedback; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/message/media.js b/lib/rest/api/v2010/account/message/media.js index f5660ef5e1..e7c0ffcf10 100644 --- a/lib/rest/api/v2010/account/message/media.js +++ b/lib/rest/api/v2010/account/message/media.js @@ -471,18 +471,18 @@ MediaInstance = function MediaInstance(version, payload, accountSid, messageSid, Object.defineProperty(MediaInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MediaContext( - this._version, - this._solution.accountSid, - this._solution.messageSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MediaContext( + this._version, + this._solution.accountSid, + this._solution.messageSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/notification.js b/lib/rest/api/v2010/account/notification.js index 8996f48db7..cb691ae0df 100644 --- a/lib/rest/api/v2010/account/notification.js +++ b/lib/rest/api/v2010/account/notification.js @@ -483,17 +483,17 @@ NotificationInstance = function NotificationInstance(version, payload, Object.defineProperty(NotificationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new NotificationContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new NotificationContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/outgoingCallerId.js b/lib/rest/api/v2010/account/outgoingCallerId.js index f593136b61..02bad80644 100644 --- a/lib/rest/api/v2010/account/outgoingCallerId.js +++ b/lib/rest/api/v2010/account/outgoingCallerId.js @@ -458,17 +458,17 @@ OutgoingCallerIdInstance = function OutgoingCallerIdInstance(version, payload, Object.defineProperty(OutgoingCallerIdInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new OutgoingCallerIdContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new OutgoingCallerIdContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/queue.js b/lib/rest/api/v2010/account/queue.js index ddd6a4fd0f..5f00e54e12 100644 --- a/lib/rest/api/v2010/account/queue.js +++ b/lib/rest/api/v2010/account/queue.js @@ -497,13 +497,13 @@ QueueInstance = function QueueInstance(version, payload, accountSid, sid) { Object.defineProperty(QueueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new QueueContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new QueueContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -742,12 +742,12 @@ QueueContext.prototype.remove = function remove(callback) { Object.defineProperty(QueueContext.prototype, 'members', { - get: function() { - if (!this._members) { - this._members = new MemberList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._members) { + this._members = new MemberList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._members; } - return this._members; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/queue/member.js b/lib/rest/api/v2010/account/queue/member.js index 694ba79012..5bd7ff9bd5 100644 --- a/lib/rest/api/v2010/account/queue/member.js +++ b/lib/rest/api/v2010/account/queue/member.js @@ -449,18 +449,18 @@ MemberInstance = function MemberInstance(version, payload, accountSid, queueSid, Object.defineProperty(MemberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MemberContext( - this._version, - this._solution.accountSid, - this._solution.queueSid, - this._solution.callSid - ); - } + get: function() { + if (!this._context) { + this._context = new MemberContext( + this._version, + this._solution.accountSid, + this._solution.queueSid, + this._solution.callSid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/recording.js b/lib/rest/api/v2010/account/recording.js index 86649d4397..38a272eba8 100644 --- a/lib/rest/api/v2010/account/recording.js +++ b/lib/rest/api/v2010/account/recording.js @@ -503,13 +503,13 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid, Object.defineProperty(RecordingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RecordingContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RecordingContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -696,30 +696,30 @@ RecordingContext.prototype.remove = function remove(callback) { Object.defineProperty(RecordingContext.prototype, 'transcriptions', { - get: function() { - if (!this._transcriptions) { - this._transcriptions = new TranscriptionList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._transcriptions) { + this._transcriptions = new TranscriptionList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._transcriptions; } - return this._transcriptions; - } }); Object.defineProperty(RecordingContext.prototype, 'addOnResults', { - get: function() { - if (!this._addOnResults) { - this._addOnResults = new AddOnResultList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._addOnResults) { + this._addOnResults = new AddOnResultList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._addOnResults; } - return this._addOnResults; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/recording/addOnResult.js b/lib/rest/api/v2010/account/recording/addOnResult.js index e4757a5efc..20a49a0a57 100644 --- a/lib/rest/api/v2010/account/recording/addOnResult.js +++ b/lib/rest/api/v2010/account/recording/addOnResult.js @@ -465,18 +465,18 @@ AddOnResultInstance = function AddOnResultInstance(version, payload, accountSid, Object.defineProperty(AddOnResultInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AddOnResultContext( - this._version, - this._solution.accountSid, - this._solution.referenceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AddOnResultContext( + this._version, + this._solution.accountSid, + this._solution.referenceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -650,17 +650,17 @@ AddOnResultContext.prototype.remove = function remove(callback) { Object.defineProperty(AddOnResultContext.prototype, 'payloads', { - get: function() { - if (!this._payloads) { - this._payloads = new PayloadList( - this._version, - this._solution.accountSid, - this._solution.referenceSid, - this._solution.sid - ); + get: function() { + if (!this._payloads) { + this._payloads = new PayloadList( + this._version, + this._solution.accountSid, + this._solution.referenceSid, + this._solution.sid + ); + } + return this._payloads; } - return this._payloads; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/recording/addOnResult/payload.js b/lib/rest/api/v2010/account/recording/addOnResult/payload.js index bdb4cdc43f..b8d308c321 100644 --- a/lib/rest/api/v2010/account/recording/addOnResult/payload.js +++ b/lib/rest/api/v2010/account/recording/addOnResult/payload.js @@ -480,19 +480,19 @@ PayloadInstance = function PayloadInstance(version, payload, accountSid, Object.defineProperty(PayloadInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PayloadContext( - this._version, - this._solution.accountSid, - this._solution.referenceSid, - this._solution.addOnResultSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new PayloadContext( + this._version, + this._solution.accountSid, + this._solution.referenceSid, + this._solution.addOnResultSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/recording/transcription.js b/lib/rest/api/v2010/account/recording/transcription.js index 23ddc1d092..cac09c1da7 100644 --- a/lib/rest/api/v2010/account/recording/transcription.js +++ b/lib/rest/api/v2010/account/recording/transcription.js @@ -471,18 +471,18 @@ TranscriptionInstance = function TranscriptionInstance(version, payload, Object.defineProperty(TranscriptionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TranscriptionContext( - this._version, - this._solution.accountSid, - this._solution.recordingSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new TranscriptionContext( + this._version, + this._solution.accountSid, + this._solution.recordingSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/shortCode.js b/lib/rest/api/v2010/account/shortCode.js index 8531921860..035b60db65 100644 --- a/lib/rest/api/v2010/account/shortCode.js +++ b/lib/rest/api/v2010/account/shortCode.js @@ -468,13 +468,13 @@ ShortCodeInstance = function ShortCodeInstance(version, payload, accountSid, Object.defineProperty(ShortCodeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ShortCodeContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ShortCodeContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/signingKey.js b/lib/rest/api/v2010/account/signingKey.js index 0cc9df974f..e1f47765dc 100644 --- a/lib/rest/api/v2010/account/signingKey.js +++ b/lib/rest/api/v2010/account/signingKey.js @@ -434,13 +434,13 @@ SigningKeyInstance = function SigningKeyInstance(version, payload, accountSid, Object.defineProperty(SigningKeyInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SigningKeyContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SigningKeyContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip.js b/lib/rest/api/v2010/account/sip.js index f33db79ef4..7b2da6cdad 100644 --- a/lib/rest/api/v2010/account/sip.js +++ b/lib/rest/api/v2010/account/sip.js @@ -56,35 +56,35 @@ SipList = function SipList(version, accountSid) { Object.defineProperty(SipListInstance, 'domains', { - get: function domains() { - if (!this._domains) { - this._domains = new DomainList(this._version, this._solution.accountSid); - } + get: function domains() { + if (!this._domains) { + this._domains = new DomainList(this._version, this._solution.accountSid); + } - return this._domains; - } + return this._domains; + } }); Object.defineProperty(SipListInstance, 'ipAccessControlLists', { - get: function ipAccessControlLists() { - if (!this._ipAccessControlLists) { - this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.accountSid); - } + get: function ipAccessControlLists() { + if (!this._ipAccessControlLists) { + this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.accountSid); + } - return this._ipAccessControlLists; - } + return this._ipAccessControlLists; + } }); Object.defineProperty(SipListInstance, 'credentialLists', { - get: function credentialLists() { - if (!this._credentialLists) { - this._credentialLists = new CredentialListList(this._version, this._solution.accountSid); - } + get: function credentialLists() { + if (!this._credentialLists) { + this._credentialLists = new CredentialListList(this._version, this._solution.accountSid); + } - return this._credentialLists; - } + return this._credentialLists; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/credentialList.js b/lib/rest/api/v2010/account/sip/credentialList.js index 97effb9e62..e36f6a1026 100644 --- a/lib/rest/api/v2010/account/sip/credentialList.js +++ b/lib/rest/api/v2010/account/sip/credentialList.js @@ -490,17 +490,17 @@ CredentialListInstance = function CredentialListInstance(version, payload, Object.defineProperty(CredentialListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialListContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new CredentialListContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -736,16 +736,16 @@ CredentialListContext.prototype.remove = function remove(callback) { Object.defineProperty(CredentialListContext.prototype, 'credentials', { - get: function() { - if (!this._credentials) { - this._credentials = new CredentialList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._credentials) { + this._credentials = new CredentialList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._credentials; } - return this._credentials; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/credentialList/credential.js b/lib/rest/api/v2010/account/sip/credentialList/credential.js index 95658a74fa..d81b3aab91 100644 --- a/lib/rest/api/v2010/account/sip/credentialList/credential.js +++ b/lib/rest/api/v2010/account/sip/credentialList/credential.js @@ -518,18 +518,18 @@ CredentialInstance = function CredentialInstance(version, payload, accountSid, Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext( - this._version, - this._solution.accountSid, - this._solution.credentialListSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext( + this._version, + this._solution.accountSid, + this._solution.credentialListSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain.js b/lib/rest/api/v2010/account/sip/domain.js index 29321c15f2..ac700fc2fb 100644 --- a/lib/rest/api/v2010/account/sip/domain.js +++ b/lib/rest/api/v2010/account/sip/domain.js @@ -545,13 +545,13 @@ DomainInstance = function DomainInstance(version, payload, accountSid, sid) { Object.defineProperty(DomainInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DomainContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DomainContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -859,40 +859,40 @@ DomainContext.prototype.remove = function remove(callback) { Object.defineProperty(DomainContext.prototype, 'ipAccessControlListMappings', { - get: function() { - if (!this._ipAccessControlListMappings) { - this._ipAccessControlListMappings = new IpAccessControlListMappingList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._ipAccessControlListMappings) { + this._ipAccessControlListMappings = new IpAccessControlListMappingList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._ipAccessControlListMappings; } - return this._ipAccessControlListMappings; - } }); Object.defineProperty(DomainContext.prototype, 'credentialListMappings', { - get: function() { - if (!this._credentialListMappings) { - this._credentialListMappings = new CredentialListMappingList( - this._version, - this._solution.accountSid, - this._solution.sid - ); + get: function() { + if (!this._credentialListMappings) { + this._credentialListMappings = new CredentialListMappingList( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } + return this._credentialListMappings; } - return this._credentialListMappings; - } }); Object.defineProperty(DomainContext.prototype, 'auth', { - get: function() { - if (!this._auth) { - this._auth = new AuthTypesList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._auth) { + this._auth = new AuthTypesList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._auth; } - return this._auth; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes.js b/lib/rest/api/v2010/account/sip/domain/authTypes.js index c07a222a72..407c60fc5a 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes.js @@ -54,32 +54,32 @@ AuthTypesList = function AuthTypesList(version, accountSid, domainSid) { Object.defineProperty(AuthTypesListInstance, 'calls', { - get: function calls() { - if (!this._calls) { - this._calls = new AuthTypeCallsList( - this._version, - this._solution.accountSid, - this._solution.domainSid - ); - } + get: function calls() { + if (!this._calls) { + this._calls = new AuthTypeCallsList( + this._version, + this._solution.accountSid, + this._solution.domainSid + ); + } - return this._calls; - } + return this._calls; + } }); Object.defineProperty(AuthTypesListInstance, 'registrations', { - get: function registrations() { - if (!this._registrations) { - this._registrations = new AuthTypeRegistrationsList( - this._version, - this._solution.accountSid, - this._solution.domainSid - ); - } + get: function registrations() { + if (!this._registrations) { + this._registrations = new AuthTypeRegistrationsList( + this._version, + this._solution.accountSid, + this._solution.domainSid + ); + } - return this._registrations; - } + return this._registrations; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping.js b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping.js index 6764bb908e..df459f1921 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping.js @@ -54,32 +54,32 @@ AuthTypeCallsList = function AuthTypeCallsList(version, accountSid, domainSid) { Object.defineProperty(AuthTypeCallsListInstance, 'credentialListMappings', { - get: function credentialListMappings() { - if (!this._credentialListMappings) { - this._credentialListMappings = new AuthCallsCredentialListMappingList( - this._version, - this._solution.accountSid, - this._solution.domainSid - ); - } + get: function credentialListMappings() { + if (!this._credentialListMappings) { + this._credentialListMappings = new AuthCallsCredentialListMappingList( + this._version, + this._solution.accountSid, + this._solution.domainSid + ); + } - return this._credentialListMappings; - } + return this._credentialListMappings; + } }); Object.defineProperty(AuthTypeCallsListInstance, 'ipAccessControlListMappings', { - get: function ipAccessControlListMappings() { - if (!this._ipAccessControlListMappings) { - this._ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList( - this._version, - this._solution.accountSid, - this._solution.domainSid - ); - } + get: function ipAccessControlListMappings() { + if (!this._ipAccessControlListMappings) { + this._ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList( + this._version, + this._solution.accountSid, + this._solution.domainSid + ); + } - return this._ipAccessControlListMappings; - } + return this._ipAccessControlListMappings; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js index da920062ff..d7ab602119 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsCredentialListMapping.js @@ -516,18 +516,18 @@ AuthCallsCredentialListMappingInstance = function Object.defineProperty(AuthCallsCredentialListMappingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AuthCallsCredentialListMappingContext( - this._version, - this._solution.accountSid, - this._solution.domainSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AuthCallsCredentialListMappingContext( + this._version, + this._solution.accountSid, + this._solution.domainSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js index b7c1faa60f..f38763429a 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authCallsMapping/authCallsIpAccessControlListMapping.js @@ -526,18 +526,18 @@ AuthCallsIpAccessControlListMappingInstance = function Object.defineProperty(AuthCallsIpAccessControlListMappingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AuthCallsIpAccessControlListMappingContext( - this._version, - this._solution.accountSid, - this._solution.domainSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AuthCallsIpAccessControlListMappingContext( + this._version, + this._solution.accountSid, + this._solution.domainSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping.js b/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping.js index eba926ef67..be97884cb9 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping.js @@ -52,17 +52,17 @@ AuthTypeRegistrationsList = function AuthTypeRegistrationsList(version, Object.defineProperty(AuthTypeRegistrationsListInstance, 'credentialListMappings', { - get: function credentialListMappings() { - if (!this._credentialListMappings) { - this._credentialListMappings = new AuthRegistrationsCredentialListMappingList( - this._version, - this._solution.accountSid, - this._solution.domainSid - ); - } + get: function credentialListMappings() { + if (!this._credentialListMappings) { + this._credentialListMappings = new AuthRegistrationsCredentialListMappingList( + this._version, + this._solution.accountSid, + this._solution.domainSid + ); + } - return this._credentialListMappings; - } + return this._credentialListMappings; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js b/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js index 9382407af4..dbb0b3e59a 100644 --- a/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/authTypes/authRegistrationsMapping/authRegistrationsCredentialListMapping.js @@ -527,18 +527,18 @@ AuthRegistrationsCredentialListMappingInstance = function Object.defineProperty(AuthRegistrationsCredentialListMappingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AuthRegistrationsCredentialListMappingContext( - this._version, - this._solution.accountSid, - this._solution.domainSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AuthRegistrationsCredentialListMappingContext( + this._version, + this._solution.accountSid, + this._solution.domainSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js b/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js index dfe61dbf25..c293db4132 100644 --- a/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/credentialListMapping.js @@ -514,18 +514,18 @@ CredentialListMappingInstance = function CredentialListMappingInstance(version, Object.defineProperty(CredentialListMappingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialListMappingContext( - this._version, - this._solution.accountSid, - this._solution.domainSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new CredentialListMappingContext( + this._version, + this._solution.accountSid, + this._solution.domainSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js b/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js index 9c19aca0ed..303e8e31c7 100644 --- a/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js +++ b/lib/rest/api/v2010/account/sip/domain/ipAccessControlListMapping.js @@ -520,18 +520,18 @@ IpAccessControlListMappingInstance = function Object.defineProperty(IpAccessControlListMappingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new IpAccessControlListMappingContext( - this._version, - this._solution.accountSid, - this._solution.domainSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new IpAccessControlListMappingContext( + this._version, + this._solution.accountSid, + this._solution.domainSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/ipAccessControlList.js b/lib/rest/api/v2010/account/sip/ipAccessControlList.js index f3e9fd1d02..a17ac87790 100644 --- a/lib/rest/api/v2010/account/sip/ipAccessControlList.js +++ b/lib/rest/api/v2010/account/sip/ipAccessControlList.js @@ -495,17 +495,17 @@ IpAccessControlListInstance = function IpAccessControlListInstance(version, Object.defineProperty(IpAccessControlListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new IpAccessControlListContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new IpAccessControlListContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -742,12 +742,12 @@ IpAccessControlListContext.prototype.remove = function remove(callback) { Object.defineProperty(IpAccessControlListContext.prototype, 'ipAddresses', { - get: function() { - if (!this._ipAddresses) { - this._ipAddresses = new IpAddressList(this._version, this._solution.accountSid, this._solution.sid); + get: function() { + if (!this._ipAddresses) { + this._ipAddresses = new IpAddressList(this._version, this._solution.accountSid, this._solution.sid); + } + return this._ipAddresses; } - return this._ipAddresses; - } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js b/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js index 6d100124a1..13420ce8c9 100644 --- a/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js +++ b/lib/rest/api/v2010/account/sip/ipAccessControlList/ipAddress.js @@ -535,18 +535,18 @@ IpAddressInstance = function IpAddressInstance(version, payload, accountSid, Object.defineProperty(IpAddressInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new IpAddressContext( - this._version, - this._solution.accountSid, - this._solution.ipAccessControlListSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new IpAddressContext( + this._version, + this._solution.accountSid, + this._solution.ipAccessControlListSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/transcription.js b/lib/rest/api/v2010/account/transcription.js index da759ac297..e38ef15d05 100644 --- a/lib/rest/api/v2010/account/transcription.js +++ b/lib/rest/api/v2010/account/transcription.js @@ -455,17 +455,17 @@ TranscriptionInstance = function TranscriptionInstance(version, payload, Object.defineProperty(TranscriptionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TranscriptionContext( - this._version, - this._solution.accountSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new TranscriptionContext( + this._version, + this._solution.accountSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/usage.js b/lib/rest/api/v2010/account/usage.js index 0b7cecd12c..a35541ed21 100644 --- a/lib/rest/api/v2010/account/usage.js +++ b/lib/rest/api/v2010/account/usage.js @@ -52,24 +52,24 @@ UsageList = function UsageList(version, accountSid) { Object.defineProperty(UsageListInstance, 'records', { - get: function records() { - if (!this._records) { - this._records = new RecordList(this._version, this._solution.accountSid); - } + get: function records() { + if (!this._records) { + this._records = new RecordList(this._version, this._solution.accountSid); + } - return this._records; - } + return this._records; + } }); Object.defineProperty(UsageListInstance, 'triggers', { - get: function triggers() { - if (!this._triggers) { - this._triggers = new TriggerList(this._version, this._solution.accountSid); - } + get: function triggers() { + if (!this._triggers) { + this._triggers = new TriggerList(this._version, this._solution.accountSid); + } - return this._triggers; - } + return this._triggers; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/usage/record.js b/lib/rest/api/v2010/account/usage/record.js index d5f0e8ec92..d9cb534ccd 100644 --- a/lib/rest/api/v2010/account/usage/record.js +++ b/lib/rest/api/v2010/account/usage/record.js @@ -346,90 +346,90 @@ RecordList = function RecordList(version, accountSid) { Object.defineProperty(RecordListInstance, 'allTime', { - get: function allTime() { - if (!this._allTime) { - this._allTime = new AllTimeList(this._version, this._solution.accountSid); - } + get: function allTime() { + if (!this._allTime) { + this._allTime = new AllTimeList(this._version, this._solution.accountSid); + } - return this._allTime; - } + return this._allTime; + } }); Object.defineProperty(RecordListInstance, 'daily', { - get: function daily() { - if (!this._daily) { - this._daily = new DailyList(this._version, this._solution.accountSid); - } + get: function daily() { + if (!this._daily) { + this._daily = new DailyList(this._version, this._solution.accountSid); + } - return this._daily; - } + return this._daily; + } }); Object.defineProperty(RecordListInstance, 'lastMonth', { - get: function lastMonth() { - if (!this._lastMonth) { - this._lastMonth = new LastMonthList(this._version, this._solution.accountSid); - } + get: function lastMonth() { + if (!this._lastMonth) { + this._lastMonth = new LastMonthList(this._version, this._solution.accountSid); + } - return this._lastMonth; - } + return this._lastMonth; + } }); Object.defineProperty(RecordListInstance, 'monthly', { - get: function monthly() { - if (!this._monthly) { - this._monthly = new MonthlyList(this._version, this._solution.accountSid); - } + get: function monthly() { + if (!this._monthly) { + this._monthly = new MonthlyList(this._version, this._solution.accountSid); + } - return this._monthly; - } + return this._monthly; + } }); Object.defineProperty(RecordListInstance, 'thisMonth', { - get: function thisMonth() { - if (!this._thisMonth) { - this._thisMonth = new ThisMonthList(this._version, this._solution.accountSid); - } + get: function thisMonth() { + if (!this._thisMonth) { + this._thisMonth = new ThisMonthList(this._version, this._solution.accountSid); + } - return this._thisMonth; - } + return this._thisMonth; + } }); Object.defineProperty(RecordListInstance, 'today', { - get: function today() { - if (!this._today) { - this._today = new TodayList(this._version, this._solution.accountSid); - } + get: function today() { + if (!this._today) { + this._today = new TodayList(this._version, this._solution.accountSid); + } - return this._today; - } + return this._today; + } }); Object.defineProperty(RecordListInstance, 'yearly', { - get: function yearly() { - if (!this._yearly) { - this._yearly = new YearlyList(this._version, this._solution.accountSid); - } + get: function yearly() { + if (!this._yearly) { + this._yearly = new YearlyList(this._version, this._solution.accountSid); + } - return this._yearly; - } + return this._yearly; + } }); Object.defineProperty(RecordListInstance, 'yesterday', { - get: function yesterday() { - if (!this._yesterday) { - this._yesterday = new YesterdayList(this._version, this._solution.accountSid); - } + get: function yesterday() { + if (!this._yesterday) { + this._yesterday = new YesterdayList(this._version, this._solution.accountSid); + } - return this._yesterday; - } + return this._yesterday; + } }); /* jshint ignore:start */ diff --git a/lib/rest/api/v2010/account/usage/trigger.js b/lib/rest/api/v2010/account/usage/trigger.js index d378caa20c..b7bf2d9458 100644 --- a/lib/rest/api/v2010/account/usage/trigger.js +++ b/lib/rest/api/v2010/account/usage/trigger.js @@ -560,13 +560,13 @@ TriggerInstance = function TriggerInstance(version, payload, accountSid, sid) { Object.defineProperty(TriggerInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TriggerContext(this._version, this._solution.accountSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new TriggerContext(this._version, this._solution.accountSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/authy/V1.js b/lib/rest/authy/V1.js index a68077a558..5ebd507d1d 100644 --- a/lib/rest/authy/V1.js +++ b/lib/rest/authy/V1.js @@ -40,18 +40,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'forms', { - get: function() { - this._forms = this._forms || new FormList(this); - return this._forms; - } + get: function() { + this._forms = this._forms || new FormList(this); + return this._forms; + } }); Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/authy/v1/form.js b/lib/rest/authy/v1/form.js index ddb3037cea..f7b0837114 100644 --- a/lib/rest/authy/v1/form.js +++ b/lib/rest/authy/v1/form.js @@ -195,13 +195,13 @@ FormInstance = function FormInstance(version, payload, formType) { Object.defineProperty(FormInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FormContext(this._version, this._solution.formType); - } + get: function() { + if (!this._context) { + this._context = new FormContext(this._version, this._solution.formType); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/authy/v1/service.js b/lib/rest/authy/v1/service.js index 0fe6eeb291..e3286b4b4d 100644 --- a/lib/rest/authy/v1/service.js +++ b/lib/rest/authy/v1/service.js @@ -500,13 +500,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -767,12 +767,12 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'entities', { - get: function() { - if (!this._entities) { - this._entities = new EntityList(this._version, this._solution.sid); + get: function() { + if (!this._entities) { + this._entities = new EntityList(this._version, this._solution.sid); + } + return this._entities; } - return this._entities; - } }); /* jshint ignore:start */ diff --git a/lib/rest/authy/v1/service/entity.js b/lib/rest/authy/v1/service/entity.js index 27b1e33be0..2a530bb15c 100644 --- a/lib/rest/authy/v1/service/entity.js +++ b/lib/rest/authy/v1/service/entity.js @@ -509,17 +509,17 @@ EntityInstance = function EntityInstance(version, payload, serviceSid, identity) Object.defineProperty(EntityInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EntityContext( - this._version, - this._solution.serviceSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new EntityContext( + this._version, + this._solution.serviceSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -720,12 +720,12 @@ EntityContext.prototype.fetch = function fetch(opts, callback) { Object.defineProperty(EntityContext.prototype, 'factors', { - get: function() { - if (!this._factors) { - this._factors = new FactorList(this._version, this._solution.serviceSid, this._solution.identity); + get: function() { + if (!this._factors) { + this._factors = new FactorList(this._version, this._solution.serviceSid, this._solution.identity); + } + return this._factors; } - return this._factors; - } }); /* jshint ignore:start */ diff --git a/lib/rest/authy/v1/service/entity/factor.js b/lib/rest/authy/v1/service/entity/factor.js index 55618ecfca..6102b1e3de 100644 --- a/lib/rest/authy/v1/service/entity/factor.js +++ b/lib/rest/authy/v1/service/entity/factor.js @@ -539,18 +539,18 @@ FactorInstance = function FactorInstance(version, payload, serviceSid, identity, Object.defineProperty(FactorInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FactorContext( - this._version, - this._solution.serviceSid, - this._solution.identity, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FactorContext( + this._version, + this._solution.serviceSid, + this._solution.identity, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -825,17 +825,17 @@ FactorContext.prototype.update = function update(opts, callback) { Object.defineProperty(FactorContext.prototype, 'challenges', { - get: function() { - if (!this._challenges) { - this._challenges = new ChallengeList( - this._version, - this._solution.serviceSid, - this._solution.identity, - this._solution.sid - ); + get: function() { + if (!this._challenges) { + this._challenges = new ChallengeList( + this._version, + this._solution.serviceSid, + this._solution.identity, + this._solution.sid + ); + } + return this._challenges; } - return this._challenges; - } }); /* jshint ignore:start */ diff --git a/lib/rest/authy/v1/service/entity/factor/challenge.js b/lib/rest/authy/v1/service/entity/factor/challenge.js index 0474c4d60c..975932b9df 100644 --- a/lib/rest/authy/v1/service/entity/factor/challenge.js +++ b/lib/rest/authy/v1/service/entity/factor/challenge.js @@ -321,19 +321,19 @@ ChallengeInstance = function ChallengeInstance(version, payload, serviceSid, Object.defineProperty(ChallengeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChallengeContext( - this._version, - this._solution.serviceSid, - this._solution.identity, - this._solution.factorSid, - this._solution.sid - ); + get: function() { + if (!this._context) { + this._context = new ChallengeContext( + this._version, + this._solution.serviceSid, + this._solution.identity, + this._solution.factorSid, + this._solution.sid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/V1.js b/lib/rest/autopilot/V1.js index 474de5fd5f..0f4bac4139 100644 --- a/lib/rest/autopilot/V1.js +++ b/lib/rest/autopilot/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'assistants', { - get: function() { - this._assistants = this._assistants || new AssistantList(this); - return this._assistants; - } + get: function() { + this._assistants = this._assistants || new AssistantList(this); + return this._assistants; + } }); module.exports = V1; diff --git a/lib/rest/autopilot/v1/assistant.js b/lib/rest/autopilot/v1/assistant.js index 9b7e11cf68..5cb3462bb7 100644 --- a/lib/rest/autopilot/v1/assistant.js +++ b/lib/rest/autopilot/v1/assistant.js @@ -538,13 +538,13 @@ AssistantInstance = function AssistantInstance(version, payload, sid) { Object.defineProperty(AssistantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssistantContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AssistantContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -938,92 +938,92 @@ AssistantContext.prototype.remove = function remove(callback) { Object.defineProperty(AssistantContext.prototype, 'fieldTypes', { - get: function() { - if (!this._fieldTypes) { - this._fieldTypes = new FieldTypeList(this._version, this._solution.sid); + get: function() { + if (!this._fieldTypes) { + this._fieldTypes = new FieldTypeList(this._version, this._solution.sid); + } + return this._fieldTypes; } - return this._fieldTypes; - } }); Object.defineProperty(AssistantContext.prototype, 'tasks', { - get: function() { - if (!this._tasks) { - this._tasks = new TaskList(this._version, this._solution.sid); + get: function() { + if (!this._tasks) { + this._tasks = new TaskList(this._version, this._solution.sid); + } + return this._tasks; } - return this._tasks; - } }); Object.defineProperty(AssistantContext.prototype, 'modelBuilds', { - get: function() { - if (!this._modelBuilds) { - this._modelBuilds = new ModelBuildList(this._version, this._solution.sid); + get: function() { + if (!this._modelBuilds) { + this._modelBuilds = new ModelBuildList(this._version, this._solution.sid); + } + return this._modelBuilds; } - return this._modelBuilds; - } }); Object.defineProperty(AssistantContext.prototype, 'queries', { - get: function() { - if (!this._queries) { - this._queries = new QueryList(this._version, this._solution.sid); + get: function() { + if (!this._queries) { + this._queries = new QueryList(this._version, this._solution.sid); + } + return this._queries; } - return this._queries; - } }); Object.defineProperty(AssistantContext.prototype, 'styleSheet', { - get: function() { - if (!this._styleSheet) { - this._styleSheet = new StyleSheetList(this._version, this._solution.sid); + get: function() { + if (!this._styleSheet) { + this._styleSheet = new StyleSheetList(this._version, this._solution.sid); + } + return this._styleSheet; } - return this._styleSheet; - } }); Object.defineProperty(AssistantContext.prototype, 'defaults', { - get: function() { - if (!this._defaults) { - this._defaults = new DefaultsList(this._version, this._solution.sid); + get: function() { + if (!this._defaults) { + this._defaults = new DefaultsList(this._version, this._solution.sid); + } + return this._defaults; } - return this._defaults; - } }); Object.defineProperty(AssistantContext.prototype, 'dialogues', { - get: function() { - if (!this._dialogues) { - this._dialogues = new DialogueList(this._version, this._solution.sid); + get: function() { + if (!this._dialogues) { + this._dialogues = new DialogueList(this._version, this._solution.sid); + } + return this._dialogues; } - return this._dialogues; - } }); Object.defineProperty(AssistantContext.prototype, 'webhooks', { - get: function() { - if (!this._webhooks) { - this._webhooks = new WebhookList(this._version, this._solution.sid); + get: function() { + if (!this._webhooks) { + this._webhooks = new WebhookList(this._version, this._solution.sid); + } + return this._webhooks; } - return this._webhooks; - } }); Object.defineProperty(AssistantContext.prototype, 'exportAssistant', { - get: function() { - if (!this._exportAssistant) { - this._exportAssistant = new ExportAssistantList(this._version, this._solution.sid); + get: function() { + if (!this._exportAssistant) { + this._exportAssistant = new ExportAssistantList(this._version, this._solution.sid); + } + return this._exportAssistant; } - return this._exportAssistant; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/defaults.js b/lib/rest/autopilot/v1/assistant/defaults.js index 515f891cb0..22b135cc2f 100644 --- a/lib/rest/autopilot/v1/assistant/defaults.js +++ b/lib/rest/autopilot/v1/assistant/defaults.js @@ -196,13 +196,13 @@ DefaultsInstance = function DefaultsInstance(version, payload, assistantSid) { Object.defineProperty(DefaultsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DefaultsContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new DefaultsContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/dialogue.js b/lib/rest/autopilot/v1/assistant/dialogue.js index 122d7b338b..f8bfa6cc6c 100644 --- a/lib/rest/autopilot/v1/assistant/dialogue.js +++ b/lib/rest/autopilot/v1/assistant/dialogue.js @@ -202,13 +202,13 @@ DialogueInstance = function DialogueInstance(version, payload, assistantSid, Object.defineProperty(DialogueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/exportAssistant.js b/lib/rest/autopilot/v1/assistant/exportAssistant.js index c4c345c3dc..2aacd1cfc9 100644 --- a/lib/rest/autopilot/v1/assistant/exportAssistant.js +++ b/lib/rest/autopilot/v1/assistant/exportAssistant.js @@ -207,13 +207,13 @@ ExportAssistantInstance = function ExportAssistantInstance(version, payload, Object.defineProperty(ExportAssistantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExportAssistantContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new ExportAssistantContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/fieldType.js b/lib/rest/autopilot/v1/assistant/fieldType.js index ddd715d667..f744f9b5ab 100644 --- a/lib/rest/autopilot/v1/assistant/fieldType.js +++ b/lib/rest/autopilot/v1/assistant/fieldType.js @@ -514,17 +514,17 @@ FieldTypeInstance = function FieldTypeInstance(version, payload, assistantSid, Object.defineProperty(FieldTypeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldTypeContext( - this._version, - this._solution.assistantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldTypeContext( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -769,16 +769,16 @@ FieldTypeContext.prototype.remove = function remove(callback) { Object.defineProperty(FieldTypeContext.prototype, 'fieldValues', { - get: function() { - if (!this._fieldValues) { - this._fieldValues = new FieldValueList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._fieldValues) { + this._fieldValues = new FieldValueList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._fieldValues; } - return this._fieldValues; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js b/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js index db9c177a5f..a19be9c46f 100644 --- a/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +++ b/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js @@ -544,18 +544,18 @@ FieldValueInstance = function FieldValueInstance(version, payload, assistantSid, Object.defineProperty(FieldValueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldValueContext( - this._version, - this._solution.assistantSid, - this._solution.fieldTypeSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldValueContext( + this._version, + this._solution.assistantSid, + this._solution.fieldTypeSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/modelBuild.js b/lib/rest/autopilot/v1/assistant/modelBuild.js index 331e843575..5b6148e86c 100644 --- a/lib/rest/autopilot/v1/assistant/modelBuild.js +++ b/lib/rest/autopilot/v1/assistant/modelBuild.js @@ -516,17 +516,17 @@ ModelBuildInstance = function ModelBuildInstance(version, payload, assistantSid, Object.defineProperty(ModelBuildInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ModelBuildContext( - this._version, - this._solution.assistantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ModelBuildContext( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/query.js b/lib/rest/autopilot/v1/assistant/query.js index b914b6fb90..a202f97c02 100644 --- a/lib/rest/autopilot/v1/assistant/query.js +++ b/lib/rest/autopilot/v1/assistant/query.js @@ -551,13 +551,13 @@ QueryInstance = function QueryInstance(version, payload, assistantSid, sid) { Object.defineProperty(QueryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/styleSheet.js b/lib/rest/autopilot/v1/assistant/styleSheet.js index c786737fe4..3af9ef3845 100644 --- a/lib/rest/autopilot/v1/assistant/styleSheet.js +++ b/lib/rest/autopilot/v1/assistant/styleSheet.js @@ -198,13 +198,13 @@ StyleSheetInstance = function StyleSheetInstance(version, payload, assistantSid) Object.defineProperty(StyleSheetInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new StyleSheetContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new StyleSheetContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/task.js b/lib/rest/autopilot/v1/assistant/task.js index b63b252123..c60347536a 100644 --- a/lib/rest/autopilot/v1/assistant/task.js +++ b/lib/rest/autopilot/v1/assistant/task.js @@ -526,13 +526,13 @@ TaskInstance = function TaskInstance(version, payload, assistantSid, sid) { Object.defineProperty(TaskInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -837,50 +837,50 @@ TaskContext.prototype.remove = function remove(callback) { Object.defineProperty(TaskContext.prototype, 'fields', { - get: function() { - if (!this._fields) { - this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid); + get: function() { + if (!this._fields) { + this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid); + } + return this._fields; } - return this._fields; - } }); Object.defineProperty(TaskContext.prototype, 'samples', { - get: function() { - if (!this._samples) { - this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid); + get: function() { + if (!this._samples) { + this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid); + } + return this._samples; } - return this._samples; - } }); Object.defineProperty(TaskContext.prototype, 'taskActions', { - get: function() { - if (!this._taskActions) { - this._taskActions = new TaskActionsList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._taskActions) { + this._taskActions = new TaskActionsList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._taskActions; } - return this._taskActions; - } }); Object.defineProperty(TaskContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new TaskStatisticsList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._statistics) { + this._statistics = new TaskStatisticsList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._statistics; } - return this._statistics; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/task/field.js b/lib/rest/autopilot/v1/assistant/task/field.js index 9b2379eb82..acf268cf92 100644 --- a/lib/rest/autopilot/v1/assistant/task/field.js +++ b/lib/rest/autopilot/v1/assistant/task/field.js @@ -525,18 +525,18 @@ FieldInstance = function FieldInstance(version, payload, assistantSid, taskSid, Object.defineProperty(FieldInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/task/sample.js b/lib/rest/autopilot/v1/assistant/task/sample.js index cd0baa24a5..1c4872d09c 100644 --- a/lib/rest/autopilot/v1/assistant/task/sample.js +++ b/lib/rest/autopilot/v1/assistant/task/sample.js @@ -537,18 +537,18 @@ SampleInstance = function SampleInstance(version, payload, assistantSid, Object.defineProperty(SampleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SampleContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new SampleContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/task/taskActions.js b/lib/rest/autopilot/v1/assistant/task/taskActions.js index 59c451b141..1f8821941a 100644 --- a/lib/rest/autopilot/v1/assistant/task/taskActions.js +++ b/lib/rest/autopilot/v1/assistant/task/taskActions.js @@ -210,17 +210,17 @@ TaskActionsInstance = function TaskActionsInstance(version, payload, Object.defineProperty(TaskActionsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskActionsContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid - ); + get: function() { + if (!this._context) { + this._context = new TaskActionsContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/task/taskStatistics.js b/lib/rest/autopilot/v1/assistant/task/taskStatistics.js index 142a726069..6a1abbddfc 100644 --- a/lib/rest/autopilot/v1/assistant/task/taskStatistics.js +++ b/lib/rest/autopilot/v1/assistant/task/taskStatistics.js @@ -222,17 +222,17 @@ TaskStatisticsInstance = function TaskStatisticsInstance(version, payload, Object.defineProperty(TaskStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskStatisticsContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid - ); + get: function() { + if (!this._context) { + this._context = new TaskStatisticsContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/autopilot/v1/assistant/webhook.js b/lib/rest/autopilot/v1/assistant/webhook.js index 026ad3a0b1..b3eca67567 100644 --- a/lib/rest/autopilot/v1/assistant/webhook.js +++ b/lib/rest/autopilot/v1/assistant/webhook.js @@ -527,13 +527,13 @@ WebhookInstance = function WebhookInstance(version, payload, assistantSid, sid) Object.defineProperty(WebhookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebhookContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new WebhookContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/V1.js b/lib/rest/chat/V1.js index 0a672d0893..40c6f9f734 100644 --- a/lib/rest/chat/V1.js +++ b/lib/rest/chat/V1.js @@ -40,18 +40,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/chat/V2.js b/lib/rest/chat/V2.js index 133654521e..f627bcf10c 100644 --- a/lib/rest/chat/V2.js +++ b/lib/rest/chat/V2.js @@ -40,18 +40,18 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); Object.defineProperty(V2.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V2; diff --git a/lib/rest/chat/v1/credential.js b/lib/rest/chat/v1/credential.js index 3b6815f759..eedd3837aa 100644 --- a/lib/rest/chat/v1/credential.js +++ b/lib/rest/chat/v1/credential.js @@ -505,13 +505,13 @@ CredentialInstance = function CredentialInstance(version, payload, sid) { Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service.js b/lib/rest/chat/v1/service.js index 7ebd869e88..5ca4655490 100644 --- a/lib/rest/chat/v1/service.js +++ b/lib/rest/chat/v1/service.js @@ -523,13 +523,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -1044,32 +1044,32 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'channels', { - get: function() { - if (!this._channels) { - this._channels = new ChannelList(this._version, this._solution.sid); + get: function() { + if (!this._channels) { + this._channels = new ChannelList(this._version, this._solution.sid); + } + return this._channels; } - return this._channels; - } }); Object.defineProperty(ServiceContext.prototype, 'roles', { - get: function() { - if (!this._roles) { - this._roles = new RoleList(this._version, this._solution.sid); + get: function() { + if (!this._roles) { + this._roles = new RoleList(this._version, this._solution.sid); + } + return this._roles; } - return this._roles; - } }); Object.defineProperty(ServiceContext.prototype, 'users', { - get: function() { - if (!this._users) { - this._users = new UserList(this._version, this._solution.sid); + get: function() { + if (!this._users) { + this._users = new UserList(this._version, this._solution.sid); + } + return this._users; } - return this._users; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/channel.js b/lib/rest/chat/v1/service/channel.js index b36ea73832..6c78b56d28 100644 --- a/lib/rest/chat/v1/service/channel.js +++ b/lib/rest/chat/v1/service/channel.js @@ -527,13 +527,13 @@ ChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) { Object.defineProperty(ChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -812,32 +812,32 @@ ChannelContext.prototype.update = function update(opts, callback) { Object.defineProperty(ChannelContext.prototype, 'members', { - get: function() { - if (!this._members) { - this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._members) { + this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._members; } - return this._members; - } }); Object.defineProperty(ChannelContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(ChannelContext.prototype, 'invites', { - get: function() { - if (!this._invites) { - this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._invites) { + this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._invites; } - return this._invites; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/channel/invite.js b/lib/rest/chat/v1/service/channel/invite.js index b9f513b6dd..b3d97b88d9 100644 --- a/lib/rest/chat/v1/service/channel/invite.js +++ b/lib/rest/chat/v1/service/channel/invite.js @@ -515,18 +515,18 @@ InviteInstance = function InviteInstance(version, payload, serviceSid, Object.defineProperty(InviteInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InviteContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InviteContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/channel/member.js b/lib/rest/chat/v1/service/channel/member.js index 3fe8e4f5f1..dddadbbe00 100644 --- a/lib/rest/chat/v1/service/channel/member.js +++ b/lib/rest/chat/v1/service/channel/member.js @@ -518,18 +518,18 @@ MemberInstance = function MemberInstance(version, payload, serviceSid, Object.defineProperty(MemberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MemberContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MemberContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/channel/message.js b/lib/rest/chat/v1/service/channel/message.js index be2bb8fa57..a89ea2e070 100644 --- a/lib/rest/chat/v1/service/channel/message.js +++ b/lib/rest/chat/v1/service/channel/message.js @@ -528,18 +528,18 @@ MessageInstance = function MessageInstance(version, payload, serviceSid, Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/role.js b/lib/rest/chat/v1/service/role.js index a6ea2440ec..e30ef5e44d 100644 --- a/lib/rest/chat/v1/service/role.js +++ b/lib/rest/chat/v1/service/role.js @@ -507,13 +507,13 @@ RoleInstance = function RoleInstance(version, payload, serviceSid, sid) { Object.defineProperty(RoleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v1/service/user.js b/lib/rest/chat/v1/service/user.js index 863f4b85bf..f7f93cb0ab 100644 --- a/lib/rest/chat/v1/service/user.js +++ b/lib/rest/chat/v1/service/user.js @@ -519,13 +519,13 @@ UserInstance = function UserInstance(version, payload, serviceSid, sid) { Object.defineProperty(UserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -767,16 +767,16 @@ UserContext.prototype.update = function update(opts, callback) { Object.defineProperty(UserContext.prototype, 'userChannels', { - get: function() { - if (!this._userChannels) { - this._userChannels = new UserChannelList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userChannels) { + this._userChannels = new UserChannelList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userChannels; } - return this._userChannels; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/credential.js b/lib/rest/chat/v2/credential.js index a94dfcc3c5..a1b7360f81 100644 --- a/lib/rest/chat/v2/credential.js +++ b/lib/rest/chat/v2/credential.js @@ -505,13 +505,13 @@ CredentialInstance = function CredentialInstance(version, payload, sid) { Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service.js b/lib/rest/chat/v2/service.js index 4568654321..af4ba226a0 100644 --- a/lib/rest/chat/v2/service.js +++ b/lib/rest/chat/v2/service.js @@ -529,13 +529,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -950,42 +950,42 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'channels', { - get: function() { - if (!this._channels) { - this._channels = new ChannelList(this._version, this._solution.sid); + get: function() { + if (!this._channels) { + this._channels = new ChannelList(this._version, this._solution.sid); + } + return this._channels; } - return this._channels; - } }); Object.defineProperty(ServiceContext.prototype, 'roles', { - get: function() { - if (!this._roles) { - this._roles = new RoleList(this._version, this._solution.sid); + get: function() { + if (!this._roles) { + this._roles = new RoleList(this._version, this._solution.sid); + } + return this._roles; } - return this._roles; - } }); Object.defineProperty(ServiceContext.prototype, 'users', { - get: function() { - if (!this._users) { - this._users = new UserList(this._version, this._solution.sid); + get: function() { + if (!this._users) { + this._users = new UserList(this._version, this._solution.sid); + } + return this._users; } - return this._users; - } }); Object.defineProperty(ServiceContext.prototype, 'bindings', { - get: function() { - if (!this._bindings) { - this._bindings = new BindingList(this._version, this._solution.sid); + get: function() { + if (!this._bindings) { + this._bindings = new BindingList(this._version, this._solution.sid); + } + return this._bindings; } - return this._bindings; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/binding.js b/lib/rest/chat/v2/service/binding.js index d646de6d48..df0b3784c7 100644 --- a/lib/rest/chat/v2/service/binding.js +++ b/lib/rest/chat/v2/service/binding.js @@ -468,13 +468,13 @@ BindingInstance = function BindingInstance(version, payload, serviceSid, sid) { Object.defineProperty(BindingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/channel.js b/lib/rest/chat/v2/service/channel.js index 7baf6c269a..e0dc4f59e4 100644 --- a/lib/rest/chat/v2/service/channel.js +++ b/lib/rest/chat/v2/service/channel.js @@ -541,13 +541,13 @@ ChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) { Object.defineProperty(ChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -877,42 +877,42 @@ ChannelContext.prototype.update = function update(opts, callback) { Object.defineProperty(ChannelContext.prototype, 'members', { - get: function() { - if (!this._members) { - this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._members) { + this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._members; } - return this._members; - } }); Object.defineProperty(ChannelContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(ChannelContext.prototype, 'invites', { - get: function() { - if (!this._invites) { - this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._invites) { + this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._invites; } - return this._invites; - } }); Object.defineProperty(ChannelContext.prototype, 'webhooks', { - get: function() { - if (!this._webhooks) { - this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._webhooks) { + this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._webhooks; } - return this._webhooks; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/channel/invite.js b/lib/rest/chat/v2/service/channel/invite.js index 4d8e46cbfc..2a28bdbcf2 100644 --- a/lib/rest/chat/v2/service/channel/invite.js +++ b/lib/rest/chat/v2/service/channel/invite.js @@ -515,18 +515,18 @@ InviteInstance = function InviteInstance(version, payload, serviceSid, Object.defineProperty(InviteInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InviteContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InviteContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/channel/member.js b/lib/rest/chat/v2/service/channel/member.js index a591ac149e..3affac7f17 100644 --- a/lib/rest/chat/v2/service/channel/member.js +++ b/lib/rest/chat/v2/service/channel/member.js @@ -542,18 +542,18 @@ MemberInstance = function MemberInstance(version, payload, serviceSid, Object.defineProperty(MemberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MemberContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MemberContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/channel/message.js b/lib/rest/chat/v2/service/channel/message.js index e944085ee8..6f4a8af9cd 100644 --- a/lib/rest/chat/v2/service/channel/message.js +++ b/lib/rest/chat/v2/service/channel/message.js @@ -551,18 +551,18 @@ MessageInstance = function MessageInstance(version, payload, serviceSid, Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/channel/webhook.js b/lib/rest/chat/v2/service/channel/webhook.js index d9842a3856..b48ae7252b 100644 --- a/lib/rest/chat/v2/service/channel/webhook.js +++ b/lib/rest/chat/v2/service/channel/webhook.js @@ -526,18 +526,18 @@ WebhookInstance = function WebhookInstance(version, payload, serviceSid, Object.defineProperty(WebhookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebhookContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new WebhookContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/role.js b/lib/rest/chat/v2/service/role.js index 2ca07ba8e3..58b0ca33e5 100644 --- a/lib/rest/chat/v2/service/role.js +++ b/lib/rest/chat/v2/service/role.js @@ -507,13 +507,13 @@ RoleInstance = function RoleInstance(version, payload, serviceSid, sid) { Object.defineProperty(RoleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/user.js b/lib/rest/chat/v2/service/user.js index b130420d85..6012c50e96 100644 --- a/lib/rest/chat/v2/service/user.js +++ b/lib/rest/chat/v2/service/user.js @@ -523,13 +523,13 @@ UserInstance = function UserInstance(version, payload, serviceSid, sid) { Object.defineProperty(UserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -793,30 +793,30 @@ UserContext.prototype.update = function update(opts, callback) { Object.defineProperty(UserContext.prototype, 'userChannels', { - get: function() { - if (!this._userChannels) { - this._userChannels = new UserChannelList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userChannels) { + this._userChannels = new UserChannelList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userChannels; } - return this._userChannels; - } }); Object.defineProperty(UserContext.prototype, 'userBindings', { - get: function() { - if (!this._userBindings) { - this._userBindings = new UserBindingList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userBindings) { + this._userBindings = new UserBindingList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userBindings; } - return this._userBindings; - } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/user/userBinding.js b/lib/rest/chat/v2/service/user/userBinding.js index 7853a96583..bc4066777f 100644 --- a/lib/rest/chat/v2/service/user/userBinding.js +++ b/lib/rest/chat/v2/service/user/userBinding.js @@ -478,18 +478,18 @@ UserBindingInstance = function UserBindingInstance(version, payload, serviceSid, Object.defineProperty(UserBindingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserBindingContext( - this._version, - this._solution.serviceSid, - this._solution.userSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new UserBindingContext( + this._version, + this._solution.serviceSid, + this._solution.userSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/chat/v2/service/user/userChannel.js b/lib/rest/chat/v2/service/user/userChannel.js index 884310402c..d4f81ee18a 100644 --- a/lib/rest/chat/v2/service/user/userChannel.js +++ b/lib/rest/chat/v2/service/user/userChannel.js @@ -475,18 +475,18 @@ UserChannelInstance = function UserChannelInstance(version, payload, serviceSid, Object.defineProperty(UserChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserChannelContext( - this._version, - this._solution.serviceSid, - this._solution.userSid, - this._solution.channelSid - ); - } + get: function() { + if (!this._context) { + this._context = new UserChannelContext( + this._version, + this._solution.serviceSid, + this._solution.userSid, + this._solution.channelSid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/conversations/V1.js b/lib/rest/conversations/V1.js index c10cdeee02..96e193cad4 100644 --- a/lib/rest/conversations/V1.js +++ b/lib/rest/conversations/V1.js @@ -41,18 +41,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'conversations', { - get: function() { - this._conversations = this._conversations || new ConversationList(this); - return this._conversations; - } + get: function() { + this._conversations = this._conversations || new ConversationList(this); + return this._conversations; + } }); Object.defineProperty(V1.prototype, 'webhooks', { - get: function() { - this._webhooks = this._webhooks || new WebhookList(this); - return this._webhooks; - } + get: function() { + this._webhooks = this._webhooks || new WebhookList(this); + return this._webhooks; + } }); module.exports = V1; diff --git a/lib/rest/conversations/v1/conversation.js b/lib/rest/conversations/v1/conversation.js index 2362da60bf..2d26cd1daa 100644 --- a/lib/rest/conversations/v1/conversation.js +++ b/lib/rest/conversations/v1/conversation.js @@ -519,13 +519,13 @@ ConversationInstance = function ConversationInstance(version, payload, sid) { Object.defineProperty(ConversationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ConversationContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ConversationContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -823,32 +823,32 @@ ConversationContext.prototype.fetch = function fetch(callback) { Object.defineProperty(ConversationContext.prototype, 'participants', { - get: function() { - if (!this._participants) { - this._participants = new ParticipantList(this._version, this._solution.sid); + get: function() { + if (!this._participants) { + this._participants = new ParticipantList(this._version, this._solution.sid); + } + return this._participants; } - return this._participants; - } }); Object.defineProperty(ConversationContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(ConversationContext.prototype, 'webhooks', { - get: function() { - if (!this._webhooks) { - this._webhooks = new WebhookList(this._version, this._solution.sid); + get: function() { + if (!this._webhooks) { + this._webhooks = new WebhookList(this._version, this._solution.sid); + } + return this._webhooks; } - return this._webhooks; - } }); /* jshint ignore:start */ diff --git a/lib/rest/conversations/v1/conversation/message.js b/lib/rest/conversations/v1/conversation/message.js index 48a28930bc..3d5a2aeb3a 100644 --- a/lib/rest/conversations/v1/conversation/message.js +++ b/lib/rest/conversations/v1/conversation/message.js @@ -531,17 +531,17 @@ MessageInstance = function MessageInstance(version, payload, conversationSid, Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext( - this._version, - this._solution.conversationSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageContext( + this._version, + this._solution.conversationSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/conversations/v1/conversation/participant.js b/lib/rest/conversations/v1/conversation/participant.js index 7c208acde2..77eae39515 100644 --- a/lib/rest/conversations/v1/conversation/participant.js +++ b/lib/rest/conversations/v1/conversation/participant.js @@ -530,17 +530,17 @@ ParticipantInstance = function ParticipantInstance(version, payload, Object.defineProperty(ParticipantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ParticipantContext( - this._version, - this._solution.conversationSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ParticipantContext( + this._version, + this._solution.conversationSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/conversations/v1/conversation/webhook.js b/lib/rest/conversations/v1/conversation/webhook.js index b082fc2795..307a341479 100644 --- a/lib/rest/conversations/v1/conversation/webhook.js +++ b/lib/rest/conversations/v1/conversation/webhook.js @@ -522,17 +522,17 @@ WebhookInstance = function WebhookInstance(version, payload, conversationSid, Object.defineProperty(WebhookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebhookContext( - this._version, - this._solution.conversationSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new WebhookContext( + this._version, + this._solution.conversationSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/conversations/v1/webhook.js b/lib/rest/conversations/v1/webhook.js index 0ef1b6f347..9465d5981c 100644 --- a/lib/rest/conversations/v1/webhook.js +++ b/lib/rest/conversations/v1/webhook.js @@ -199,13 +199,13 @@ WebhookInstance = function WebhookInstance(version, payload) { Object.defineProperty(WebhookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebhookContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new WebhookContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/fax/V1.js b/lib/rest/fax/V1.js index 2cae00f8ee..77594331fe 100644 --- a/lib/rest/fax/V1.js +++ b/lib/rest/fax/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'faxes', { - get: function() { - this._faxes = this._faxes || new FaxList(this); - return this._faxes; - } + get: function() { + this._faxes = this._faxes || new FaxList(this); + return this._faxes; + } }); module.exports = V1; diff --git a/lib/rest/fax/v1/fax.js b/lib/rest/fax/v1/fax.js index 78a8c644bb..be83286e6d 100644 --- a/lib/rest/fax/v1/fax.js +++ b/lib/rest/fax/v1/fax.js @@ -560,13 +560,13 @@ FaxInstance = function FaxInstance(version, payload, sid) { Object.defineProperty(FaxInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FaxContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FaxContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -789,12 +789,12 @@ FaxContext.prototype.remove = function remove(callback) { Object.defineProperty(FaxContext.prototype, 'media', { - get: function() { - if (!this._media) { - this._media = new FaxMediaList(this._version, this._solution.sid); + get: function() { + if (!this._media) { + this._media = new FaxMediaList(this._version, this._solution.sid); + } + return this._media; } - return this._media; - } }); /* jshint ignore:start */ diff --git a/lib/rest/fax/v1/fax/faxMedia.js b/lib/rest/fax/v1/fax/faxMedia.js index 9c81bf2e83..0da5ccfdf4 100644 --- a/lib/rest/fax/v1/fax/faxMedia.js +++ b/lib/rest/fax/v1/fax/faxMedia.js @@ -450,13 +450,13 @@ FaxMediaInstance = function FaxMediaInstance(version, payload, faxSid, sid) { Object.defineProperty(FaxMediaInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FaxMediaContext(this._version, this._solution.faxSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FaxMediaContext(this._version, this._solution.faxSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/flexApi/V1.js b/lib/rest/flexApi/V1.js index f8f94c3890..46db583c9b 100644 --- a/lib/rest/flexApi/V1.js +++ b/lib/rest/flexApi/V1.js @@ -47,34 +47,34 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'channel', { - get: function() { - this._channel = this._channel || new ChannelList(this); - return this._channel; - } + get: function() { + this._channel = this._channel || new ChannelList(this); + return this._channel; + } }); Object.defineProperty(V1.prototype, 'configuration', { - get: function() { - this._configuration = this._configuration || new ConfigurationList(this); - return this._configuration; - } + get: function() { + this._configuration = this._configuration || new ConfigurationList(this); + return this._configuration; + } }); Object.defineProperty(V1.prototype, 'flexFlow', { - get: function() { - this._flexFlow = this._flexFlow || new FlexFlowList(this); - return this._flexFlow; - } + get: function() { + this._flexFlow = this._flexFlow || new FlexFlowList(this); + return this._flexFlow; + } }); Object.defineProperty(V1.prototype, 'webChannel', { - get: function() { - this._webChannel = this._webChannel || new WebChannelList(this); - return this._webChannel; - } + get: function() { + this._webChannel = this._webChannel || new WebChannelList(this); + return this._webChannel; + } }); module.exports = V1; diff --git a/lib/rest/flexApi/v1/channel.js b/lib/rest/flexApi/v1/channel.js index ca1c6ed62c..56f192466d 100644 --- a/lib/rest/flexApi/v1/channel.js +++ b/lib/rest/flexApi/v1/channel.js @@ -515,13 +515,13 @@ ChannelInstance = function ChannelInstance(version, payload, sid) { Object.defineProperty(ChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChannelContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ChannelContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/flexApi/v1/configuration.js b/lib/rest/flexApi/v1/configuration.js index 1a21c8d2ea..263dfae5fc 100644 --- a/lib/rest/flexApi/v1/configuration.js +++ b/lib/rest/flexApi/v1/configuration.js @@ -257,13 +257,13 @@ ConfigurationInstance = function ConfigurationInstance(version, payload) { Object.defineProperty(ConfigurationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ConfigurationContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new ConfigurationContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/flexApi/v1/flexFlow.js b/lib/rest/flexApi/v1/flexFlow.js index 2b64e7c055..9fd63661a6 100644 --- a/lib/rest/flexApi/v1/flexFlow.js +++ b/lib/rest/flexApi/v1/flexFlow.js @@ -549,13 +549,13 @@ FlexFlowInstance = function FlexFlowInstance(version, payload, sid) { Object.defineProperty(FlexFlowInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FlexFlowContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FlexFlowContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/flexApi/v1/webChannel.js b/lib/rest/flexApi/v1/webChannel.js index 1e837ff3a5..c464e07d91 100644 --- a/lib/rest/flexApi/v1/webChannel.js +++ b/lib/rest/flexApi/v1/webChannel.js @@ -500,13 +500,13 @@ WebChannelInstance = function WebChannelInstance(version, payload, sid) { Object.defineProperty(WebChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebChannelContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new WebChannelContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/insights/V1.js b/lib/rest/insights/V1.js index 37038dd1e0..c1c9ea24ca 100644 --- a/lib/rest/insights/V1.js +++ b/lib/rest/insights/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'calls', { - get: function() { - this._calls = this._calls || new CallList(this); - return this._calls; - } + get: function() { + this._calls = this._calls || new CallList(this); + return this._calls; + } }); module.exports = V1; diff --git a/lib/rest/insights/v1/call.js b/lib/rest/insights/v1/call.js index 59b955b23d..dc0523c1cf 100644 --- a/lib/rest/insights/v1/call.js +++ b/lib/rest/insights/v1/call.js @@ -194,13 +194,13 @@ CallInstance = function CallInstance(version, payload, sid) { Object.defineProperty(CallInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CallContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CallContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -351,32 +351,32 @@ CallContext.prototype.fetch = function fetch(callback) { Object.defineProperty(CallContext.prototype, 'events', { - get: function() { - if (!this._events) { - this._events = new EventList(this._version, this._solution.sid); + get: function() { + if (!this._events) { + this._events = new EventList(this._version, this._solution.sid); + } + return this._events; } - return this._events; - } }); Object.defineProperty(CallContext.prototype, 'metrics', { - get: function() { - if (!this._metrics) { - this._metrics = new MetricList(this._version, this._solution.sid); + get: function() { + if (!this._metrics) { + this._metrics = new MetricList(this._version, this._solution.sid); + } + return this._metrics; } - return this._metrics; - } }); Object.defineProperty(CallContext.prototype, 'summary', { - get: function() { - if (!this._summary) { - this._summary = new CallSummaryList(this._version, this._solution.sid); + get: function() { + if (!this._summary) { + this._summary = new CallSummaryList(this._version, this._solution.sid); + } + return this._summary; } - return this._summary; - } }); /* jshint ignore:start */ diff --git a/lib/rest/insights/v1/call/summary.js b/lib/rest/insights/v1/call/summary.js index 4348e70db7..d296d87939 100644 --- a/lib/rest/insights/v1/call/summary.js +++ b/lib/rest/insights/v1/call/summary.js @@ -226,13 +226,13 @@ CallSummaryInstance = function CallSummaryInstance(version, payload, callSid) { Object.defineProperty(CallSummaryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CallSummaryContext(this._version, this._solution.callSid); - } + get: function() { + if (!this._context) { + this._context = new CallSummaryContext(this._version, this._solution.callSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/V1.js b/lib/rest/ipMessaging/V1.js index 1c6950ef1e..57297fbad9 100644 --- a/lib/rest/ipMessaging/V1.js +++ b/lib/rest/ipMessaging/V1.js @@ -41,18 +41,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/ipMessaging/V2.js b/lib/rest/ipMessaging/V2.js index a665b92026..bd93c63a21 100644 --- a/lib/rest/ipMessaging/V2.js +++ b/lib/rest/ipMessaging/V2.js @@ -41,18 +41,18 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); Object.defineProperty(V2.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V2; diff --git a/lib/rest/ipMessaging/v1/credential.js b/lib/rest/ipMessaging/v1/credential.js index 58f44e3485..2f7e873d97 100644 --- a/lib/rest/ipMessaging/v1/credential.js +++ b/lib/rest/ipMessaging/v1/credential.js @@ -505,13 +505,13 @@ CredentialInstance = function CredentialInstance(version, payload, sid) { Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service.js b/lib/rest/ipMessaging/v1/service.js index db06413ebd..94342a8ae7 100644 --- a/lib/rest/ipMessaging/v1/service.js +++ b/lib/rest/ipMessaging/v1/service.js @@ -523,13 +523,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -1044,32 +1044,32 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'channels', { - get: function() { - if (!this._channels) { - this._channels = new ChannelList(this._version, this._solution.sid); + get: function() { + if (!this._channels) { + this._channels = new ChannelList(this._version, this._solution.sid); + } + return this._channels; } - return this._channels; - } }); Object.defineProperty(ServiceContext.prototype, 'roles', { - get: function() { - if (!this._roles) { - this._roles = new RoleList(this._version, this._solution.sid); + get: function() { + if (!this._roles) { + this._roles = new RoleList(this._version, this._solution.sid); + } + return this._roles; } - return this._roles; - } }); Object.defineProperty(ServiceContext.prototype, 'users', { - get: function() { - if (!this._users) { - this._users = new UserList(this._version, this._solution.sid); + get: function() { + if (!this._users) { + this._users = new UserList(this._version, this._solution.sid); + } + return this._users; } - return this._users; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/channel.js b/lib/rest/ipMessaging/v1/service/channel.js index 357c8d5944..3306141613 100644 --- a/lib/rest/ipMessaging/v1/service/channel.js +++ b/lib/rest/ipMessaging/v1/service/channel.js @@ -527,13 +527,13 @@ ChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) { Object.defineProperty(ChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -812,32 +812,32 @@ ChannelContext.prototype.update = function update(opts, callback) { Object.defineProperty(ChannelContext.prototype, 'members', { - get: function() { - if (!this._members) { - this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._members) { + this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._members; } - return this._members; - } }); Object.defineProperty(ChannelContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(ChannelContext.prototype, 'invites', { - get: function() { - if (!this._invites) { - this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._invites) { + this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._invites; } - return this._invites; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/channel/invite.js b/lib/rest/ipMessaging/v1/service/channel/invite.js index 8d4f0f0e0c..de8044f746 100644 --- a/lib/rest/ipMessaging/v1/service/channel/invite.js +++ b/lib/rest/ipMessaging/v1/service/channel/invite.js @@ -515,18 +515,18 @@ InviteInstance = function InviteInstance(version, payload, serviceSid, Object.defineProperty(InviteInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InviteContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InviteContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/channel/member.js b/lib/rest/ipMessaging/v1/service/channel/member.js index c6c2417004..79aac2154f 100644 --- a/lib/rest/ipMessaging/v1/service/channel/member.js +++ b/lib/rest/ipMessaging/v1/service/channel/member.js @@ -518,18 +518,18 @@ MemberInstance = function MemberInstance(version, payload, serviceSid, Object.defineProperty(MemberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MemberContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MemberContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/channel/message.js b/lib/rest/ipMessaging/v1/service/channel/message.js index ac8ea4f79d..6124d168bc 100644 --- a/lib/rest/ipMessaging/v1/service/channel/message.js +++ b/lib/rest/ipMessaging/v1/service/channel/message.js @@ -528,18 +528,18 @@ MessageInstance = function MessageInstance(version, payload, serviceSid, Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/role.js b/lib/rest/ipMessaging/v1/service/role.js index 3cb8a4de12..2b70b5a503 100644 --- a/lib/rest/ipMessaging/v1/service/role.js +++ b/lib/rest/ipMessaging/v1/service/role.js @@ -507,13 +507,13 @@ RoleInstance = function RoleInstance(version, payload, serviceSid, sid) { Object.defineProperty(RoleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v1/service/user.js b/lib/rest/ipMessaging/v1/service/user.js index fafc95a16f..bf05799556 100644 --- a/lib/rest/ipMessaging/v1/service/user.js +++ b/lib/rest/ipMessaging/v1/service/user.js @@ -519,13 +519,13 @@ UserInstance = function UserInstance(version, payload, serviceSid, sid) { Object.defineProperty(UserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -767,16 +767,16 @@ UserContext.prototype.update = function update(opts, callback) { Object.defineProperty(UserContext.prototype, 'userChannels', { - get: function() { - if (!this._userChannels) { - this._userChannels = new UserChannelList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userChannels) { + this._userChannels = new UserChannelList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userChannels; } - return this._userChannels; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/credential.js b/lib/rest/ipMessaging/v2/credential.js index cd0cc908f3..d5a57f4648 100644 --- a/lib/rest/ipMessaging/v2/credential.js +++ b/lib/rest/ipMessaging/v2/credential.js @@ -505,13 +505,13 @@ CredentialInstance = function CredentialInstance(version, payload, sid) { Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service.js b/lib/rest/ipMessaging/v2/service.js index 10fc185b49..eecaf8452f 100644 --- a/lib/rest/ipMessaging/v2/service.js +++ b/lib/rest/ipMessaging/v2/service.js @@ -529,13 +529,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -950,42 +950,42 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'channels', { - get: function() { - if (!this._channels) { - this._channels = new ChannelList(this._version, this._solution.sid); + get: function() { + if (!this._channels) { + this._channels = new ChannelList(this._version, this._solution.sid); + } + return this._channels; } - return this._channels; - } }); Object.defineProperty(ServiceContext.prototype, 'roles', { - get: function() { - if (!this._roles) { - this._roles = new RoleList(this._version, this._solution.sid); + get: function() { + if (!this._roles) { + this._roles = new RoleList(this._version, this._solution.sid); + } + return this._roles; } - return this._roles; - } }); Object.defineProperty(ServiceContext.prototype, 'users', { - get: function() { - if (!this._users) { - this._users = new UserList(this._version, this._solution.sid); + get: function() { + if (!this._users) { + this._users = new UserList(this._version, this._solution.sid); + } + return this._users; } - return this._users; - } }); Object.defineProperty(ServiceContext.prototype, 'bindings', { - get: function() { - if (!this._bindings) { - this._bindings = new BindingList(this._version, this._solution.sid); + get: function() { + if (!this._bindings) { + this._bindings = new BindingList(this._version, this._solution.sid); + } + return this._bindings; } - return this._bindings; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/binding.js b/lib/rest/ipMessaging/v2/service/binding.js index 9625df8b32..558f21bf72 100644 --- a/lib/rest/ipMessaging/v2/service/binding.js +++ b/lib/rest/ipMessaging/v2/service/binding.js @@ -468,13 +468,13 @@ BindingInstance = function BindingInstance(version, payload, serviceSid, sid) { Object.defineProperty(BindingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/channel.js b/lib/rest/ipMessaging/v2/service/channel.js index 6fa39bf28b..0b9d1afe0a 100644 --- a/lib/rest/ipMessaging/v2/service/channel.js +++ b/lib/rest/ipMessaging/v2/service/channel.js @@ -541,13 +541,13 @@ ChannelInstance = function ChannelInstance(version, payload, serviceSid, sid) { Object.defineProperty(ChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ChannelContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -877,42 +877,42 @@ ChannelContext.prototype.update = function update(opts, callback) { Object.defineProperty(ChannelContext.prototype, 'members', { - get: function() { - if (!this._members) { - this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._members) { + this._members = new MemberList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._members; } - return this._members; - } }); Object.defineProperty(ChannelContext.prototype, 'messages', { - get: function() { - if (!this._messages) { - this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._messages) { + this._messages = new MessageList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._messages; } - return this._messages; - } }); Object.defineProperty(ChannelContext.prototype, 'invites', { - get: function() { - if (!this._invites) { - this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._invites) { + this._invites = new InviteList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._invites; } - return this._invites; - } }); Object.defineProperty(ChannelContext.prototype, 'webhooks', { - get: function() { - if (!this._webhooks) { - this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._webhooks) { + this._webhooks = new WebhookList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._webhooks; } - return this._webhooks; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/channel/invite.js b/lib/rest/ipMessaging/v2/service/channel/invite.js index f49700a94e..ded09c08e0 100644 --- a/lib/rest/ipMessaging/v2/service/channel/invite.js +++ b/lib/rest/ipMessaging/v2/service/channel/invite.js @@ -515,18 +515,18 @@ InviteInstance = function InviteInstance(version, payload, serviceSid, Object.defineProperty(InviteInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InviteContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InviteContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/channel/member.js b/lib/rest/ipMessaging/v2/service/channel/member.js index b3052c672c..4dc64f12b0 100644 --- a/lib/rest/ipMessaging/v2/service/channel/member.js +++ b/lib/rest/ipMessaging/v2/service/channel/member.js @@ -542,18 +542,18 @@ MemberInstance = function MemberInstance(version, payload, serviceSid, Object.defineProperty(MemberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MemberContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MemberContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/channel/message.js b/lib/rest/ipMessaging/v2/service/channel/message.js index bcdc59883e..d73902c406 100644 --- a/lib/rest/ipMessaging/v2/service/channel/message.js +++ b/lib/rest/ipMessaging/v2/service/channel/message.js @@ -551,18 +551,18 @@ MessageInstance = function MessageInstance(version, payload, serviceSid, Object.defineProperty(MessageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/channel/webhook.js b/lib/rest/ipMessaging/v2/service/channel/webhook.js index b7c1fff35b..d0b2009746 100644 --- a/lib/rest/ipMessaging/v2/service/channel/webhook.js +++ b/lib/rest/ipMessaging/v2/service/channel/webhook.js @@ -526,18 +526,18 @@ WebhookInstance = function WebhookInstance(version, payload, serviceSid, Object.defineProperty(WebhookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WebhookContext( - this._version, - this._solution.serviceSid, - this._solution.channelSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new WebhookContext( + this._version, + this._solution.serviceSid, + this._solution.channelSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/role.js b/lib/rest/ipMessaging/v2/service/role.js index 7ecb6a4814..9824f81509 100644 --- a/lib/rest/ipMessaging/v2/service/role.js +++ b/lib/rest/ipMessaging/v2/service/role.js @@ -507,13 +507,13 @@ RoleInstance = function RoleInstance(version, payload, serviceSid, sid) { Object.defineProperty(RoleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoleContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/user.js b/lib/rest/ipMessaging/v2/service/user.js index c1c64c19ec..cb60382a61 100644 --- a/lib/rest/ipMessaging/v2/service/user.js +++ b/lib/rest/ipMessaging/v2/service/user.js @@ -523,13 +523,13 @@ UserInstance = function UserInstance(version, payload, serviceSid, sid) { Object.defineProperty(UserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new UserContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -793,30 +793,30 @@ UserContext.prototype.update = function update(opts, callback) { Object.defineProperty(UserContext.prototype, 'userChannels', { - get: function() { - if (!this._userChannels) { - this._userChannels = new UserChannelList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userChannels) { + this._userChannels = new UserChannelList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userChannels; } - return this._userChannels; - } }); Object.defineProperty(UserContext.prototype, 'userBindings', { - get: function() { - if (!this._userBindings) { - this._userBindings = new UserBindingList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._userBindings) { + this._userBindings = new UserBindingList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._userBindings; } - return this._userBindings; - } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/user/userBinding.js b/lib/rest/ipMessaging/v2/service/user/userBinding.js index ddc4ca6451..8b6aac11e3 100644 --- a/lib/rest/ipMessaging/v2/service/user/userBinding.js +++ b/lib/rest/ipMessaging/v2/service/user/userBinding.js @@ -478,18 +478,18 @@ UserBindingInstance = function UserBindingInstance(version, payload, serviceSid, Object.defineProperty(UserBindingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserBindingContext( - this._version, - this._solution.serviceSid, - this._solution.userSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new UserBindingContext( + this._version, + this._solution.serviceSid, + this._solution.userSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/ipMessaging/v2/service/user/userChannel.js b/lib/rest/ipMessaging/v2/service/user/userChannel.js index 31c2a0a0ca..a0ee913235 100644 --- a/lib/rest/ipMessaging/v2/service/user/userChannel.js +++ b/lib/rest/ipMessaging/v2/service/user/userChannel.js @@ -475,18 +475,18 @@ UserChannelInstance = function UserChannelInstance(version, payload, serviceSid, Object.defineProperty(UserChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UserChannelContext( - this._version, - this._solution.serviceSid, - this._solution.userSid, - this._solution.channelSid - ); - } + get: function() { + if (!this._context) { + this._context = new UserChannelContext( + this._version, + this._solution.serviceSid, + this._solution.userSid, + this._solution.channelSid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/lookups/V1.js b/lib/rest/lookups/V1.js index 9c01a9ee4f..93f6578a0d 100644 --- a/lib/rest/lookups/V1.js +++ b/lib/rest/lookups/V1.js @@ -38,10 +38,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'phoneNumbers', { - get: function() { - this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this); - return this._phoneNumbers; - } + get: function() { + this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this); + return this._phoneNumbers; + } }); module.exports = V1; diff --git a/lib/rest/lookups/v1/phoneNumber.js b/lib/rest/lookups/v1/phoneNumber.js index 5813f0689b..57d4a6ca72 100644 --- a/lib/rest/lookups/v1/phoneNumber.js +++ b/lib/rest/lookups/v1/phoneNumber.js @@ -192,13 +192,13 @@ PhoneNumberInstance = function PhoneNumberInstance(version, payload, Object.defineProperty(PhoneNumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PhoneNumberContext(this._version, this._solution.phoneNumber); - } + get: function() { + if (!this._context) { + this._context = new PhoneNumberContext(this._version, this._solution.phoneNumber); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/messaging/V1.js b/lib/rest/messaging/V1.js index 40b75d23cc..ef0f8c641d 100644 --- a/lib/rest/messaging/V1.js +++ b/lib/rest/messaging/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/messaging/v1/service.js b/lib/rest/messaging/v1/service.js index 0e72cd2b88..97daa2e8ed 100644 --- a/lib/rest/messaging/v1/service.js +++ b/lib/rest/messaging/v1/service.js @@ -567,13 +567,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -895,32 +895,32 @@ ServiceContext.prototype.remove = function remove(callback) { Object.defineProperty(ServiceContext.prototype, 'phoneNumbers', { - get: function() { - if (!this._phoneNumbers) { - this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + get: function() { + if (!this._phoneNumbers) { + this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + } + return this._phoneNumbers; } - return this._phoneNumbers; - } }); Object.defineProperty(ServiceContext.prototype, 'shortCodes', { - get: function() { - if (!this._shortCodes) { - this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + get: function() { + if (!this._shortCodes) { + this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + } + return this._shortCodes; } - return this._shortCodes; - } }); Object.defineProperty(ServiceContext.prototype, 'alphaSenders', { - get: function() { - if (!this._alphaSenders) { - this._alphaSenders = new AlphaSenderList(this._version, this._solution.sid); + get: function() { + if (!this._alphaSenders) { + this._alphaSenders = new AlphaSenderList(this._version, this._solution.sid); + } + return this._alphaSenders; } - return this._alphaSenders; - } }); /* jshint ignore:start */ diff --git a/lib/rest/messaging/v1/service/alphaSender.js b/lib/rest/messaging/v1/service/alphaSender.js index d7b4d4fef5..d3f8b68815 100644 --- a/lib/rest/messaging/v1/service/alphaSender.js +++ b/lib/rest/messaging/v1/service/alphaSender.js @@ -503,17 +503,17 @@ AlphaSenderInstance = function AlphaSenderInstance(version, payload, serviceSid, Object.defineProperty(AlphaSenderInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AlphaSenderContext( - this._version, - this._solution.serviceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AlphaSenderContext( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/messaging/v1/service/phoneNumber.js b/lib/rest/messaging/v1/service/phoneNumber.js index 2688812116..5b13ae40bd 100644 --- a/lib/rest/messaging/v1/service/phoneNumber.js +++ b/lib/rest/messaging/v1/service/phoneNumber.js @@ -506,17 +506,17 @@ PhoneNumberInstance = function PhoneNumberInstance(version, payload, serviceSid, Object.defineProperty(PhoneNumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PhoneNumberContext( - this._version, - this._solution.serviceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new PhoneNumberContext( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/messaging/v1/service/shortCode.js b/lib/rest/messaging/v1/service/shortCode.js index a41ecae1c4..6455bbdd0f 100644 --- a/lib/rest/messaging/v1/service/shortCode.js +++ b/lib/rest/messaging/v1/service/shortCode.js @@ -505,13 +505,13 @@ ShortCodeInstance = function ShortCodeInstance(version, payload, serviceSid, Object.defineProperty(ShortCodeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/monitor/V1.js b/lib/rest/monitor/V1.js index 48c0ba582e..aff380256d 100644 --- a/lib/rest/monitor/V1.js +++ b/lib/rest/monitor/V1.js @@ -40,18 +40,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'alerts', { - get: function() { - this._alerts = this._alerts || new AlertList(this); - return this._alerts; - } + get: function() { + this._alerts = this._alerts || new AlertList(this); + return this._alerts; + } }); Object.defineProperty(V1.prototype, 'events', { - get: function() { - this._events = this._events || new EventList(this); - return this._events; - } + get: function() { + this._events = this._events || new EventList(this); + return this._events; + } }); module.exports = V1; diff --git a/lib/rest/monitor/v1/alert.js b/lib/rest/monitor/v1/alert.js index 8921e2abbd..373bfa6c76 100644 --- a/lib/rest/monitor/v1/alert.js +++ b/lib/rest/monitor/v1/alert.js @@ -490,13 +490,13 @@ AlertInstance = function AlertInstance(version, payload, sid) { Object.defineProperty(AlertInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AlertContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AlertContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/monitor/v1/event.js b/lib/rest/monitor/v1/event.js index 1c9419c8b6..7f904af3c9 100644 --- a/lib/rest/monitor/v1/event.js +++ b/lib/rest/monitor/v1/event.js @@ -489,13 +489,13 @@ EventInstance = function EventInstance(version, payload, sid) { Object.defineProperty(EventInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EventContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new EventContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/notify/V1.js b/lib/rest/notify/V1.js index 84f1677a0e..7d6c3f2dac 100644 --- a/lib/rest/notify/V1.js +++ b/lib/rest/notify/V1.js @@ -40,18 +40,18 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'credentials', { - get: function() { - this._credentials = this._credentials || new CredentialList(this); - return this._credentials; - } + get: function() { + this._credentials = this._credentials || new CredentialList(this); + return this._credentials; + } }); Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/notify/v1/credential.js b/lib/rest/notify/v1/credential.js index 10b2d28074..a3073ecae0 100644 --- a/lib/rest/notify/v1/credential.js +++ b/lib/rest/notify/v1/credential.js @@ -513,13 +513,13 @@ CredentialInstance = function CredentialInstance(version, payload, sid) { Object.defineProperty(CredentialInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CredentialContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/notify/v1/service.js b/lib/rest/notify/v1/service.js index 8317002ae8..812a62f2f4 100644 --- a/lib/rest/notify/v1/service.js +++ b/lib/rest/notify/v1/service.js @@ -557,13 +557,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -860,22 +860,22 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'bindings', { - get: function() { - if (!this._bindings) { - this._bindings = new BindingList(this._version, this._solution.sid); + get: function() { + if (!this._bindings) { + this._bindings = new BindingList(this._version, this._solution.sid); + } + return this._bindings; } - return this._bindings; - } }); Object.defineProperty(ServiceContext.prototype, 'notifications', { - get: function() { - if (!this._notifications) { - this._notifications = new NotificationList(this._version, this._solution.sid); + get: function() { + if (!this._notifications) { + this._notifications = new NotificationList(this._version, this._solution.sid); + } + return this._notifications; } - return this._notifications; - } }); /* jshint ignore:start */ diff --git a/lib/rest/notify/v1/service/binding.js b/lib/rest/notify/v1/service/binding.js index dce89b4035..4b6626b2b2 100644 --- a/lib/rest/notify/v1/service/binding.js +++ b/lib/rest/notify/v1/service/binding.js @@ -567,13 +567,13 @@ BindingInstance = function BindingInstance(version, payload, serviceSid, sid) { Object.defineProperty(BindingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BindingContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/V2.js b/lib/rest/numbers/V2.js index 1ba3afa72e..3e688e48fc 100644 --- a/lib/rest/numbers/V2.js +++ b/lib/rest/numbers/V2.js @@ -39,10 +39,10 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'regulatoryCompliance', { - get: function() { - this._regulatoryCompliance = this._regulatoryCompliance || new RegulatoryComplianceList(this); - return this._regulatoryCompliance; - } + get: function() { + this._regulatoryCompliance = this._regulatoryCompliance || new RegulatoryComplianceList(this); + return this._regulatoryCompliance; + } }); module.exports = V2; diff --git a/lib/rest/numbers/v2/regulatoryCompliance.js b/lib/rest/numbers/v2/regulatoryCompliance.js index f85263c0bf..97b35cf458 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance.js +++ b/lib/rest/numbers/v2/regulatoryCompliance.js @@ -62,68 +62,68 @@ RegulatoryComplianceList = function RegulatoryComplianceList(version) { Object.defineProperty(RegulatoryComplianceListInstance, 'bundles', { - get: function bundles() { - if (!this._bundles) { - this._bundles = new BundleList(this._version); - } + get: function bundles() { + if (!this._bundles) { + this._bundles = new BundleList(this._version); + } - return this._bundles; - } + return this._bundles; + } }); Object.defineProperty(RegulatoryComplianceListInstance, 'endUsers', { - get: function endUsers() { - if (!this._endUsers) { - this._endUsers = new EndUserList(this._version); - } + get: function endUsers() { + if (!this._endUsers) { + this._endUsers = new EndUserList(this._version); + } - return this._endUsers; - } + return this._endUsers; + } }); Object.defineProperty(RegulatoryComplianceListInstance, 'endUserTypes', { - get: function endUserTypes() { - if (!this._endUserTypes) { - this._endUserTypes = new EndUserTypeList(this._version); - } + get: function endUserTypes() { + if (!this._endUserTypes) { + this._endUserTypes = new EndUserTypeList(this._version); + } - return this._endUserTypes; - } + return this._endUserTypes; + } }); Object.defineProperty(RegulatoryComplianceListInstance, 'regulations', { - get: function regulations() { - if (!this._regulations) { - this._regulations = new RegulationList(this._version); - } + get: function regulations() { + if (!this._regulations) { + this._regulations = new RegulationList(this._version); + } - return this._regulations; - } + return this._regulations; + } }); Object.defineProperty(RegulatoryComplianceListInstance, 'supportingDocuments', { - get: function supportingDocuments() { - if (!this._supportingDocuments) { - this._supportingDocuments = new SupportingDocumentList(this._version); - } + get: function supportingDocuments() { + if (!this._supportingDocuments) { + this._supportingDocuments = new SupportingDocumentList(this._version); + } - return this._supportingDocuments; - } + return this._supportingDocuments; + } }); Object.defineProperty(RegulatoryComplianceListInstance, 'supportingDocumentTypes', { - get: function supportingDocumentTypes() { - if (!this._supportingDocumentTypes) { - this._supportingDocumentTypes = new SupportingDocumentTypeList(this._version); - } + get: function supportingDocumentTypes() { + if (!this._supportingDocumentTypes) { + this._supportingDocumentTypes = new SupportingDocumentTypeList(this._version); + } - return this._supportingDocumentTypes; - } + return this._supportingDocumentTypes; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle.js b/lib/rest/numbers/v2/regulatoryCompliance/bundle.js index 541658721d..f143b87709 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle.js @@ -536,13 +536,13 @@ BundleInstance = function BundleInstance(version, payload, sid) { Object.defineProperty(BundleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BundleContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BundleContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -734,12 +734,12 @@ BundleContext.prototype.update = function update(opts, callback) { Object.defineProperty(BundleContext.prototype, 'itemAssignments', { - get: function() { - if (!this._itemAssignments) { - this._itemAssignments = new ItemAssignmentList(this._version, this._solution.sid); + get: function() { + if (!this._itemAssignments) { + this._itemAssignments = new ItemAssignmentList(this._version, this._solution.sid); + } + return this._itemAssignments; } - return this._itemAssignments; - } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js b/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js index 28fb21014b..c5919cec06 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/bundle/itemAssignment.js @@ -487,17 +487,17 @@ ItemAssignmentInstance = function ItemAssignmentInstance(version, payload, Object.defineProperty(ItemAssignmentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ItemAssignmentContext( - this._version, - this._solution.bundleSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ItemAssignmentContext( + this._version, + this._solution.bundleSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/endUser.js b/lib/rest/numbers/v2/regulatoryCompliance/endUser.js index b0da865800..2c32b1ed58 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/endUser.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/endUser.js @@ -494,13 +494,13 @@ EndUserInstance = function EndUserInstance(version, payload, sid) { Object.defineProperty(EndUserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EndUserContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new EndUserContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js b/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js index dfb83bbbe2..6f349a233c 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/endUserType.js @@ -435,13 +435,13 @@ EndUserTypeInstance = function EndUserTypeInstance(version, payload, sid) { Object.defineProperty(EndUserTypeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EndUserTypeContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new EndUserTypeContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/regulation.js b/lib/rest/numbers/v2/regulatoryCompliance/regulation.js index d74c65a89e..52c02733d9 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/regulation.js @@ -457,13 +457,13 @@ RegulationInstance = function RegulationInstance(version, payload, sid) { Object.defineProperty(RegulationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RegulationContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RegulationContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js index bf6621c385..a52616acb5 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js @@ -504,13 +504,13 @@ SupportingDocumentInstance = function SupportingDocumentInstance(version, Object.defineProperty(SupportingDocumentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SupportingDocumentContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SupportingDocumentContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js index 85cf917563..ad76d594d1 100644 --- a/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js +++ b/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.js @@ -442,13 +442,13 @@ SupportingDocumentTypeInstance = function Object.defineProperty(SupportingDocumentTypeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SupportingDocumentTypeContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SupportingDocumentTypeContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/BulkExports.js b/lib/rest/preview/BulkExports.js index 31ed938cc4..6015e2f25a 100644 --- a/lib/rest/preview/BulkExports.js +++ b/lib/rest/preview/BulkExports.js @@ -42,18 +42,18 @@ BulkExports.prototype.constructor = BulkExports; Object.defineProperty(BulkExports.prototype, 'exports', { - get: function() { - this._exports = this._exports || new ExportList(this); - return this._exports; - } + get: function() { + this._exports = this._exports || new ExportList(this); + return this._exports; + } }); Object.defineProperty(BulkExports.prototype, 'exportConfiguration', { - get: function() { - this._exportConfiguration = this._exportConfiguration || new ExportConfigurationList(this); - return this._exportConfiguration; - } + get: function() { + this._exportConfiguration = this._exportConfiguration || new ExportConfigurationList(this); + return this._exportConfiguration; + } }); module.exports = BulkExports; diff --git a/lib/rest/preview/DeployedDevices.js b/lib/rest/preview/DeployedDevices.js index 87593031e4..7a0724ae69 100644 --- a/lib/rest/preview/DeployedDevices.js +++ b/lib/rest/preview/DeployedDevices.js @@ -37,10 +37,10 @@ DeployedDevices.prototype.constructor = DeployedDevices; Object.defineProperty(DeployedDevices.prototype, 'fleets', { - get: function() { - this._fleets = this._fleets || new FleetList(this); - return this._fleets; - } + get: function() { + this._fleets = this._fleets || new FleetList(this); + return this._fleets; + } }); module.exports = DeployedDevices; diff --git a/lib/rest/preview/HostedNumbers.js b/lib/rest/preview/HostedNumbers.js index 02433ad6b7..6d01699a7a 100644 --- a/lib/rest/preview/HostedNumbers.js +++ b/lib/rest/preview/HostedNumbers.js @@ -44,18 +44,18 @@ HostedNumbers.prototype.constructor = HostedNumbers; Object.defineProperty(HostedNumbers.prototype, 'authorizationDocuments', { - get: function() { - this._authorizationDocuments = this._authorizationDocuments || new AuthorizationDocumentList(this); - return this._authorizationDocuments; - } + get: function() { + this._authorizationDocuments = this._authorizationDocuments || new AuthorizationDocumentList(this); + return this._authorizationDocuments; + } }); Object.defineProperty(HostedNumbers.prototype, 'hostedNumberOrders', { - get: function() { - this._hostedNumberOrders = this._hostedNumberOrders || new HostedNumberOrderList(this); - return this._hostedNumberOrders; - } + get: function() { + this._hostedNumberOrders = this._hostedNumberOrders || new HostedNumberOrderList(this); + return this._hostedNumberOrders; + } }); module.exports = HostedNumbers; diff --git a/lib/rest/preview/Marketplace.js b/lib/rest/preview/Marketplace.js index 58fb2a01e7..cb014a9daa 100644 --- a/lib/rest/preview/Marketplace.js +++ b/lib/rest/preview/Marketplace.js @@ -44,18 +44,18 @@ Marketplace.prototype.constructor = Marketplace; Object.defineProperty(Marketplace.prototype, 'availableAddOns', { - get: function() { - this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this); - return this._availableAddOns; - } + get: function() { + this._availableAddOns = this._availableAddOns || new AvailableAddOnList(this); + return this._availableAddOns; + } }); Object.defineProperty(Marketplace.prototype, 'installedAddOns', { - get: function() { - this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this); - return this._installedAddOns; - } + get: function() { + this._installedAddOns = this._installedAddOns || new InstalledAddOnList(this); + return this._installedAddOns; + } }); module.exports = Marketplace; diff --git a/lib/rest/preview/Sync.js b/lib/rest/preview/Sync.js index c362ce79be..709debdbfb 100644 --- a/lib/rest/preview/Sync.js +++ b/lib/rest/preview/Sync.js @@ -37,10 +37,10 @@ Sync.prototype.constructor = Sync; Object.defineProperty(Sync.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = Sync; diff --git a/lib/rest/preview/TrustedComms.js b/lib/rest/preview/TrustedComms.js index ad409c77a2..1d914f4e98 100644 --- a/lib/rest/preview/TrustedComms.js +++ b/lib/rest/preview/TrustedComms.js @@ -56,50 +56,50 @@ TrustedComms.prototype.constructor = TrustedComms; Object.defineProperty(TrustedComms.prototype, 'brandedCalls', { - get: function() { - this._brandedCalls = this._brandedCalls || new BrandedCallList(this); - return this._brandedCalls; - } + get: function() { + this._brandedCalls = this._brandedCalls || new BrandedCallList(this); + return this._brandedCalls; + } }); Object.defineProperty(TrustedComms.prototype, 'businesses', { - get: function() { - this._businesses = this._businesses || new BusinessList(this); - return this._businesses; - } + get: function() { + this._businesses = this._businesses || new BusinessList(this); + return this._businesses; + } }); Object.defineProperty(TrustedComms.prototype, 'cps', { - get: function() { - this._cps = this._cps || new CpsList(this); - return this._cps; - } + get: function() { + this._cps = this._cps || new CpsList(this); + return this._cps; + } }); Object.defineProperty(TrustedComms.prototype, 'currentCalls', { - get: function() { - this._currentCalls = this._currentCalls || new CurrentCallList(this); - return this._currentCalls; - } + get: function() { + this._currentCalls = this._currentCalls || new CurrentCallList(this); + return this._currentCalls; + } }); Object.defineProperty(TrustedComms.prototype, 'devices', { - get: function() { - this._devices = this._devices || new DeviceList(this); - return this._devices; - } + get: function() { + this._devices = this._devices || new DeviceList(this); + return this._devices; + } }); Object.defineProperty(TrustedComms.prototype, 'phoneCalls', { - get: function() { - this._phoneCalls = this._phoneCalls || new PhoneCallList(this); - return this._phoneCalls; - } + get: function() { + this._phoneCalls = this._phoneCalls || new PhoneCallList(this); + return this._phoneCalls; + } }); module.exports = TrustedComms; diff --git a/lib/rest/preview/Understand.js b/lib/rest/preview/Understand.js index 248ec7e197..76a577a9dd 100644 --- a/lib/rest/preview/Understand.js +++ b/lib/rest/preview/Understand.js @@ -38,10 +38,10 @@ Understand.prototype.constructor = Understand; Object.defineProperty(Understand.prototype, 'assistants', { - get: function() { - this._assistants = this._assistants || new AssistantList(this); - return this._assistants; - } + get: function() { + this._assistants = this._assistants || new AssistantList(this); + return this._assistants; + } }); module.exports = Understand; diff --git a/lib/rest/preview/Wireless.js b/lib/rest/preview/Wireless.js index 8e4c7a8bf2..2588d9d9aa 100644 --- a/lib/rest/preview/Wireless.js +++ b/lib/rest/preview/Wireless.js @@ -43,26 +43,26 @@ Wireless.prototype.constructor = Wireless; Object.defineProperty(Wireless.prototype, 'commands', { - get: function() { - this._commands = this._commands || new CommandList(this); - return this._commands; - } + get: function() { + this._commands = this._commands || new CommandList(this); + return this._commands; + } }); Object.defineProperty(Wireless.prototype, 'ratePlans', { - get: function() { - this._ratePlans = this._ratePlans || new RatePlanList(this); - return this._ratePlans; - } + get: function() { + this._ratePlans = this._ratePlans || new RatePlanList(this); + return this._ratePlans; + } }); Object.defineProperty(Wireless.prototype, 'sims', { - get: function() { - this._sims = this._sims || new SimList(this); - return this._sims; - } + get: function() { + this._sims = this._sims || new SimList(this); + return this._sims; + } }); module.exports = Wireless; diff --git a/lib/rest/preview/bulk_exports/export.js b/lib/rest/preview/bulk_exports/export.js index b885707557..2416d718bf 100644 --- a/lib/rest/preview/bulk_exports/export.js +++ b/lib/rest/preview/bulk_exports/export.js @@ -77,13 +77,13 @@ ExportList = function ExportList(version) { Object.defineProperty(ExportListInstance, 'jobs', { - get: function jobs() { - if (!this._jobs) { - this._jobs = new JobList(this._version); - } + get: function jobs() { + if (!this._jobs) { + this._jobs = new JobList(this._version); + } - return this._jobs; - } + return this._jobs; + } }); /* jshint ignore:start */ @@ -210,13 +210,13 @@ ExportInstance = function ExportInstance(version, payload, resourceType) { Object.defineProperty(ExportInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExportContext(this._version, this._solution.resourceType); - } + get: function() { + if (!this._context) { + this._context = new ExportContext(this._version, this._solution.resourceType); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -353,22 +353,22 @@ ExportContext.prototype.fetch = function fetch(callback) { Object.defineProperty(ExportContext.prototype, 'days', { - get: function() { - if (!this._days) { - this._days = new DayList(this._version, this._solution.resourceType); + get: function() { + if (!this._days) { + this._days = new DayList(this._version, this._solution.resourceType); + } + return this._days; } - return this._days; - } }); Object.defineProperty(ExportContext.prototype, 'exportCustomJobs', { - get: function() { - if (!this._exportCustomJobs) { - this._exportCustomJobs = new ExportCustomJobList(this._version, this._solution.resourceType); + get: function() { + if (!this._exportCustomJobs) { + this._exportCustomJobs = new ExportCustomJobList(this._version, this._solution.resourceType); + } + return this._exportCustomJobs; } - return this._exportCustomJobs; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/bulk_exports/export/job.js b/lib/rest/preview/bulk_exports/export/job.js index f1aedceea4..84a83b6016 100644 --- a/lib/rest/preview/bulk_exports/export/job.js +++ b/lib/rest/preview/bulk_exports/export/job.js @@ -210,13 +210,13 @@ JobInstance = function JobInstance(version, payload, jobSid) { Object.defineProperty(JobInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new JobContext(this._version, this._solution.jobSid); - } + get: function() { + if (!this._context) { + this._context = new JobContext(this._version, this._solution.jobSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/bulk_exports/exportConfiguration.js b/lib/rest/preview/bulk_exports/exportConfiguration.js index 05e303f8a6..d24ae9cf2f 100644 --- a/lib/rest/preview/bulk_exports/exportConfiguration.js +++ b/lib/rest/preview/bulk_exports/exportConfiguration.js @@ -200,13 +200,13 @@ ExportConfigurationInstance = function ExportConfigurationInstance(version, Object.defineProperty(ExportConfigurationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExportConfigurationContext(this._version, this._solution.resourceType); - } + get: function() { + if (!this._context) { + this._context = new ExportConfigurationContext(this._version, this._solution.resourceType); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/deployed_devices/fleet.js b/lib/rest/preview/deployed_devices/fleet.js index f3b67c861d..ddc52a0764 100644 --- a/lib/rest/preview/deployed_devices/fleet.js +++ b/lib/rest/preview/deployed_devices/fleet.js @@ -497,13 +497,13 @@ FleetInstance = function FleetInstance(version, payload, sid) { Object.defineProperty(FleetInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FleetContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FleetContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -787,42 +787,42 @@ FleetContext.prototype.update = function update(opts, callback) { Object.defineProperty(FleetContext.prototype, 'devices', { - get: function() { - if (!this._devices) { - this._devices = new DeviceList(this._version, this._solution.sid); + get: function() { + if (!this._devices) { + this._devices = new DeviceList(this._version, this._solution.sid); + } + return this._devices; } - return this._devices; - } }); Object.defineProperty(FleetContext.prototype, 'deployments', { - get: function() { - if (!this._deployments) { - this._deployments = new DeploymentList(this._version, this._solution.sid); + get: function() { + if (!this._deployments) { + this._deployments = new DeploymentList(this._version, this._solution.sid); + } + return this._deployments; } - return this._deployments; - } }); Object.defineProperty(FleetContext.prototype, 'certificates', { - get: function() { - if (!this._certificates) { - this._certificates = new CertificateList(this._version, this._solution.sid); + get: function() { + if (!this._certificates) { + this._certificates = new CertificateList(this._version, this._solution.sid); + } + return this._certificates; } - return this._certificates; - } }); Object.defineProperty(FleetContext.prototype, 'keys', { - get: function() { - if (!this._keys) { - this._keys = new KeyList(this._version, this._solution.sid); + get: function() { + if (!this._keys) { + this._keys = new KeyList(this._version, this._solution.sid); + } + return this._keys; } - return this._keys; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/deployed_devices/fleet/certificate.js b/lib/rest/preview/deployed_devices/fleet/certificate.js index b423ffc965..4736bf53e0 100644 --- a/lib/rest/preview/deployed_devices/fleet/certificate.js +++ b/lib/rest/preview/deployed_devices/fleet/certificate.js @@ -518,13 +518,13 @@ CertificateInstance = function CertificateInstance(version, payload, fleetSid, Object.defineProperty(CertificateInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CertificateContext(this._version, this._solution.fleetSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CertificateContext(this._version, this._solution.fleetSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/deployed_devices/fleet/deployment.js b/lib/rest/preview/deployed_devices/fleet/deployment.js index 3d34503435..e36333951d 100644 --- a/lib/rest/preview/deployed_devices/fleet/deployment.js +++ b/lib/rest/preview/deployed_devices/fleet/deployment.js @@ -506,13 +506,13 @@ DeploymentInstance = function DeploymentInstance(version, payload, fleetSid, Object.defineProperty(DeploymentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DeploymentContext(this._version, this._solution.fleetSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DeploymentContext(this._version, this._solution.fleetSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/deployed_devices/fleet/device.js b/lib/rest/preview/deployed_devices/fleet/device.js index 09bb3cfb6b..6237c196f2 100644 --- a/lib/rest/preview/deployed_devices/fleet/device.js +++ b/lib/rest/preview/deployed_devices/fleet/device.js @@ -523,13 +523,13 @@ DeviceInstance = function DeviceInstance(version, payload, fleetSid, sid) { Object.defineProperty(DeviceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DeviceContext(this._version, this._solution.fleetSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DeviceContext(this._version, this._solution.fleetSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/deployed_devices/fleet/key.js b/lib/rest/preview/deployed_devices/fleet/key.js index 62d3fcaa13..648de937b3 100644 --- a/lib/rest/preview/deployed_devices/fleet/key.js +++ b/lib/rest/preview/deployed_devices/fleet/key.js @@ -511,13 +511,13 @@ KeyInstance = function KeyInstance(version, payload, fleetSid, sid) { Object.defineProperty(KeyInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new KeyContext(this._version, this._solution.fleetSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new KeyContext(this._version, this._solution.fleetSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/hosted_numbers/authorizationDocument.js b/lib/rest/preview/hosted_numbers/authorizationDocument.js index c7f1c47be0..2135264546 100644 --- a/lib/rest/preview/hosted_numbers/authorizationDocument.js +++ b/lib/rest/preview/hosted_numbers/authorizationDocument.js @@ -541,13 +541,13 @@ AuthorizationDocumentInstance = function AuthorizationDocumentInstance(version, Object.defineProperty(AuthorizationDocumentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AuthorizationDocumentContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AuthorizationDocumentContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -758,15 +758,15 @@ AuthorizationDocumentContext.prototype.update = function update(opts, callback) Object.defineProperty(AuthorizationDocumentContext.prototype, 'dependentHostedNumberOrders', { - get: function() { - if (!this._dependentHostedNumberOrders) { - this._dependentHostedNumberOrders = new DependentHostedNumberOrderList( - this._version, - this._solution.sid - ); + get: function() { + if (!this._dependentHostedNumberOrders) { + this._dependentHostedNumberOrders = new DependentHostedNumberOrderList( + this._version, + this._solution.sid + ); + } + return this._dependentHostedNumberOrders; } - return this._dependentHostedNumberOrders; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/hosted_numbers/hostedNumberOrder.js b/lib/rest/preview/hosted_numbers/hostedNumberOrder.js index 5df75527e9..f15bd22c8d 100644 --- a/lib/rest/preview/hosted_numbers/hostedNumberOrder.js +++ b/lib/rest/preview/hosted_numbers/hostedNumberOrder.js @@ -603,13 +603,13 @@ HostedNumberOrderInstance = function HostedNumberOrderInstance(version, payload, Object.defineProperty(HostedNumberOrderInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new HostedNumberOrderContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new HostedNumberOrderContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/marketplace/availableAddOn.js b/lib/rest/preview/marketplace/availableAddOn.js index be02b9702e..3d285034ec 100644 --- a/lib/rest/preview/marketplace/availableAddOn.js +++ b/lib/rest/preview/marketplace/availableAddOn.js @@ -452,13 +452,13 @@ AvailableAddOnInstance = function AvailableAddOnInstance(version, payload, sid) Object.defineProperty(AvailableAddOnInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AvailableAddOnContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AvailableAddOnContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -578,12 +578,12 @@ AvailableAddOnContext.prototype.fetch = function fetch(callback) { Object.defineProperty(AvailableAddOnContext.prototype, 'extensions', { - get: function() { - if (!this._extensions) { - this._extensions = new AvailableAddOnExtensionList(this._version, this._solution.sid); + get: function() { + if (!this._extensions) { + this._extensions = new AvailableAddOnExtensionList(this._version, this._solution.sid); + } + return this._extensions; } - return this._extensions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js b/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js index 80b9e16742..dab9104b09 100644 --- a/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js +++ b/lib/rest/preview/marketplace/availableAddOn/availableAddOnExtension.js @@ -461,17 +461,17 @@ AvailableAddOnExtensionInstance = function Object.defineProperty(AvailableAddOnExtensionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AvailableAddOnExtensionContext( - this._version, - this._solution.availableAddOnSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AvailableAddOnExtensionContext( + this._version, + this._solution.availableAddOnSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/marketplace/installedAddOn.js b/lib/rest/preview/marketplace/installedAddOn.js index f0823b184b..aadac43e47 100644 --- a/lib/rest/preview/marketplace/installedAddOn.js +++ b/lib/rest/preview/marketplace/installedAddOn.js @@ -521,13 +521,13 @@ InstalledAddOnInstance = function InstalledAddOnInstance(version, payload, sid) Object.defineProperty(InstalledAddOnInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InstalledAddOnContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new InstalledAddOnContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -762,12 +762,12 @@ InstalledAddOnContext.prototype.update = function update(opts, callback) { Object.defineProperty(InstalledAddOnContext.prototype, 'extensions', { - get: function() { - if (!this._extensions) { - this._extensions = new InstalledAddOnExtensionList(this._version, this._solution.sid); + get: function() { + if (!this._extensions) { + this._extensions = new InstalledAddOnExtensionList(this._version, this._solution.sid); + } + return this._extensions; } - return this._extensions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js b/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js index c80aeda2d3..7afa37fcf6 100644 --- a/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js +++ b/lib/rest/preview/marketplace/installedAddOn/installedAddOnExtension.js @@ -464,17 +464,17 @@ InstalledAddOnExtensionInstance = function Object.defineProperty(InstalledAddOnExtensionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InstalledAddOnExtensionContext( - this._version, - this._solution.installedAddOnSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InstalledAddOnExtensionContext( + this._version, + this._solution.installedAddOnSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service.js b/lib/rest/preview/sync/service.js index 95b682f397..78d8ee56f2 100644 --- a/lib/rest/preview/sync/service.js +++ b/lib/rest/preview/sync/service.js @@ -507,13 +507,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -786,32 +786,32 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'documents', { - get: function() { - if (!this._documents) { - this._documents = new DocumentList(this._version, this._solution.sid); + get: function() { + if (!this._documents) { + this._documents = new DocumentList(this._version, this._solution.sid); + } + return this._documents; } - return this._documents; - } }); Object.defineProperty(ServiceContext.prototype, 'syncLists', { - get: function() { - if (!this._syncLists) { - this._syncLists = new SyncListList(this._version, this._solution.sid); + get: function() { + if (!this._syncLists) { + this._syncLists = new SyncListList(this._version, this._solution.sid); + } + return this._syncLists; } - return this._syncLists; - } }); Object.defineProperty(ServiceContext.prototype, 'syncMaps', { - get: function() { - if (!this._syncMaps) { - this._syncMaps = new SyncMapList(this._version, this._solution.sid); + get: function() { + if (!this._syncMaps) { + this._syncMaps = new SyncMapList(this._version, this._solution.sid); + } + return this._syncMaps; } - return this._syncMaps; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/document.js b/lib/rest/preview/sync/service/document.js index f716c1b86e..e480660fd8 100644 --- a/lib/rest/preview/sync/service/document.js +++ b/lib/rest/preview/sync/service/document.js @@ -510,13 +510,13 @@ DocumentInstance = function DocumentInstance(version, payload, serviceSid, sid) Object.defineProperty(DocumentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -770,16 +770,16 @@ DocumentContext.prototype.update = function update(opts, callback) { Object.defineProperty(DocumentContext.prototype, 'documentPermissions', { - get: function() { - if (!this._documentPermissions) { - this._documentPermissions = new DocumentPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._documentPermissions) { + this._documentPermissions = new DocumentPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._documentPermissions; } - return this._documentPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/document/documentPermission.js b/lib/rest/preview/sync/service/document/documentPermission.js index a5c99de148..a6414b04c5 100644 --- a/lib/rest/preview/sync/service/document/documentPermission.js +++ b/lib/rest/preview/sync/service/document/documentPermission.js @@ -475,18 +475,18 @@ DocumentPermissionInstance = function DocumentPermissionInstance(version, Object.defineProperty(DocumentPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DocumentPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.documentSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new DocumentPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.documentSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncList.js b/lib/rest/preview/sync/service/syncList.js index 32fefa97e2..a0a95e5d9e 100644 --- a/lib/rest/preview/sync/service/syncList.js +++ b/lib/rest/preview/sync/service/syncList.js @@ -504,13 +504,13 @@ SyncListInstance = function SyncListInstance(version, payload, serviceSid, sid) Object.defineProperty(SyncListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -701,30 +701,30 @@ SyncListContext.prototype.remove = function remove(callback) { Object.defineProperty(SyncListContext.prototype, 'syncListItems', { - get: function() { - if (!this._syncListItems) { - this._syncListItems = new SyncListItemList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncListItems) { + this._syncListItems = new SyncListItemList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncListItems; } - return this._syncListItems; - } }); Object.defineProperty(SyncListContext.prototype, 'syncListPermissions', { - get: function() { - if (!this._syncListPermissions) { - this._syncListPermissions = new SyncListPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncListPermissions) { + this._syncListPermissions = new SyncListPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncListPermissions; } - return this._syncListPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncList/syncListItem.js b/lib/rest/preview/sync/service/syncList/syncListItem.js index b1ac868441..0400422323 100644 --- a/lib/rest/preview/sync/service/syncList/syncListItem.js +++ b/lib/rest/preview/sync/service/syncList/syncListItem.js @@ -532,18 +532,18 @@ SyncListItemInstance = function SyncListItemInstance(version, payload, Object.defineProperty(SyncListItemInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListItemContext( - this._version, - this._solution.serviceSid, - this._solution.listSid, - this._solution.index - ); - } + get: function() { + if (!this._context) { + this._context = new SyncListItemContext( + this._version, + this._solution.serviceSid, + this._solution.listSid, + this._solution.index + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncList/syncListPermission.js b/lib/rest/preview/sync/service/syncList/syncListPermission.js index 58a2b5a4b2..e1b042af70 100644 --- a/lib/rest/preview/sync/service/syncList/syncListPermission.js +++ b/lib/rest/preview/sync/service/syncList/syncListPermission.js @@ -471,18 +471,18 @@ SyncListPermissionInstance = function SyncListPermissionInstance(version, Object.defineProperty(SyncListPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.listSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new SyncListPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.listSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncMap.js b/lib/rest/preview/sync/service/syncMap.js index 513ca2aedc..7e3300a50f 100644 --- a/lib/rest/preview/sync/service/syncMap.js +++ b/lib/rest/preview/sync/service/syncMap.js @@ -503,13 +503,13 @@ SyncMapInstance = function SyncMapInstance(version, payload, serviceSid, sid) { Object.defineProperty(SyncMapInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -699,30 +699,30 @@ SyncMapContext.prototype.remove = function remove(callback) { Object.defineProperty(SyncMapContext.prototype, 'syncMapItems', { - get: function() { - if (!this._syncMapItems) { - this._syncMapItems = new SyncMapItemList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncMapItems) { + this._syncMapItems = new SyncMapItemList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncMapItems; } - return this._syncMapItems; - } }); Object.defineProperty(SyncMapContext.prototype, 'syncMapPermissions', { - get: function() { - if (!this._syncMapPermissions) { - this._syncMapPermissions = new SyncMapPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncMapPermissions) { + this._syncMapPermissions = new SyncMapPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncMapPermissions; } - return this._syncMapPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncMap/syncMapItem.js b/lib/rest/preview/sync/service/syncMap/syncMapItem.js index 2d8c876138..926d78f58b 100644 --- a/lib/rest/preview/sync/service/syncMap/syncMapItem.js +++ b/lib/rest/preview/sync/service/syncMap/syncMapItem.js @@ -530,18 +530,18 @@ SyncMapItemInstance = function SyncMapItemInstance(version, payload, serviceSid, Object.defineProperty(SyncMapItemInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapItemContext( - this._version, - this._solution.serviceSid, - this._solution.mapSid, - this._solution.key - ); - } + get: function() { + if (!this._context) { + this._context = new SyncMapItemContext( + this._version, + this._solution.serviceSid, + this._solution.mapSid, + this._solution.key + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/sync/service/syncMap/syncMapPermission.js b/lib/rest/preview/sync/service/syncMap/syncMapPermission.js index 55c64bac5e..3bf31bb612 100644 --- a/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +++ b/lib/rest/preview/sync/service/syncMap/syncMapPermission.js @@ -470,18 +470,18 @@ SyncMapPermissionInstance = function SyncMapPermissionInstance(version, payload, Object.defineProperty(SyncMapPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.mapSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new SyncMapPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.mapSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/trusted_comms/business.js b/lib/rest/preview/trusted_comms/business.js index 2db98987bd..e6415aca99 100644 --- a/lib/rest/preview/trusted_comms/business.js +++ b/lib/rest/preview/trusted_comms/business.js @@ -194,13 +194,13 @@ BusinessInstance = function BusinessInstance(version, payload, sid) { Object.defineProperty(BusinessInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BusinessContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BusinessContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -320,12 +320,12 @@ BusinessContext.prototype.fetch = function fetch(callback) { Object.defineProperty(BusinessContext.prototype, 'insights', { - get: function() { - if (!this._insights) { - this._insights = new InsightsList(this._version, this._solution.sid); + get: function() { + if (!this._insights) { + this._insights = new InsightsList(this._version, this._solution.sid); + } + return this._insights; } - return this._insights; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/trusted_comms/business/insights.js b/lib/rest/preview/trusted_comms/business/insights.js index d12785282d..3e014ef56f 100644 --- a/lib/rest/preview/trusted_comms/business/insights.js +++ b/lib/rest/preview/trusted_comms/business/insights.js @@ -53,13 +53,13 @@ InsightsList = function InsightsList(version, businessSid) { Object.defineProperty(InsightsListInstance, 'successRate', { - get: function successRate() { - if (!this._successRate) { - this._successRate = new SuccessRateList(this._version, this._solution.businessSid); - } + get: function successRate() { + if (!this._successRate) { + this._successRate = new SuccessRateList(this._version, this._solution.businessSid); + } - return this._successRate; - } + return this._successRate; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/trusted_comms/business/insights/successRate.js b/lib/rest/preview/trusted_comms/business/insights/successRate.js index 1ef358c9b5..c6b0627412 100644 --- a/lib/rest/preview/trusted_comms/business/insights/successRate.js +++ b/lib/rest/preview/trusted_comms/business/insights/successRate.js @@ -205,13 +205,13 @@ SuccessRateInstance = function SuccessRateInstance(version, payload, Object.defineProperty(SuccessRateInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SuccessRateContext(this._version, this._solution.businessSid); - } + get: function() { + if (!this._context) { + this._context = new SuccessRateContext(this._version, this._solution.businessSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/trusted_comms/cps.js b/lib/rest/preview/trusted_comms/cps.js index 862fcd4547..1673b3a46f 100644 --- a/lib/rest/preview/trusted_comms/cps.js +++ b/lib/rest/preview/trusted_comms/cps.js @@ -188,13 +188,13 @@ CpsInstance = function CpsInstance(version, payload) { Object.defineProperty(CpsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CpsContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new CpsContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/trusted_comms/currentCall.js b/lib/rest/preview/trusted_comms/currentCall.js index 92f9538923..31a69be1ad 100644 --- a/lib/rest/preview/trusted_comms/currentCall.js +++ b/lib/rest/preview/trusted_comms/currentCall.js @@ -216,13 +216,13 @@ CurrentCallInstance = function CurrentCallInstance(version, payload) { Object.defineProperty(CurrentCallInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CurrentCallContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new CurrentCallContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant.js b/lib/rest/preview/understand/assistant.js index 489350fa04..d452658ba5 100644 --- a/lib/rest/preview/understand/assistant.js +++ b/lib/rest/preview/understand/assistant.js @@ -542,13 +542,13 @@ AssistantInstance = function AssistantInstance(version, payload, sid) { Object.defineProperty(AssistantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssistantContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AssistantContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -935,88 +935,88 @@ AssistantContext.prototype.remove = function remove(callback) { Object.defineProperty(AssistantContext.prototype, 'fieldTypes', { - get: function() { - if (!this._fieldTypes) { - this._fieldTypes = new FieldTypeList(this._version, this._solution.sid); + get: function() { + if (!this._fieldTypes) { + this._fieldTypes = new FieldTypeList(this._version, this._solution.sid); + } + return this._fieldTypes; } - return this._fieldTypes; - } }); Object.defineProperty(AssistantContext.prototype, 'tasks', { - get: function() { - if (!this._tasks) { - this._tasks = new TaskList(this._version, this._solution.sid); + get: function() { + if (!this._tasks) { + this._tasks = new TaskList(this._version, this._solution.sid); + } + return this._tasks; } - return this._tasks; - } }); Object.defineProperty(AssistantContext.prototype, 'modelBuilds', { - get: function() { - if (!this._modelBuilds) { - this._modelBuilds = new ModelBuildList(this._version, this._solution.sid); + get: function() { + if (!this._modelBuilds) { + this._modelBuilds = new ModelBuildList(this._version, this._solution.sid); + } + return this._modelBuilds; } - return this._modelBuilds; - } }); Object.defineProperty(AssistantContext.prototype, 'queries', { - get: function() { - if (!this._queries) { - this._queries = new QueryList(this._version, this._solution.sid); + get: function() { + if (!this._queries) { + this._queries = new QueryList(this._version, this._solution.sid); + } + return this._queries; } - return this._queries; - } }); Object.defineProperty(AssistantContext.prototype, 'assistantFallbackActions', { - get: function() { - if (!this._assistantFallbackActions) { - this._assistantFallbackActions = new AssistantFallbackActionsList( - this._version, - this._solution.sid - ); + get: function() { + if (!this._assistantFallbackActions) { + this._assistantFallbackActions = new AssistantFallbackActionsList( + this._version, + this._solution.sid + ); + } + return this._assistantFallbackActions; } - return this._assistantFallbackActions; - } }); Object.defineProperty(AssistantContext.prototype, 'assistantInitiationActions', { - get: function() { - if (!this._assistantInitiationActions) { - this._assistantInitiationActions = new AssistantInitiationActionsList( - this._version, - this._solution.sid - ); + get: function() { + if (!this._assistantInitiationActions) { + this._assistantInitiationActions = new AssistantInitiationActionsList( + this._version, + this._solution.sid + ); + } + return this._assistantInitiationActions; } - return this._assistantInitiationActions; - } }); Object.defineProperty(AssistantContext.prototype, 'dialogues', { - get: function() { - if (!this._dialogues) { - this._dialogues = new DialogueList(this._version, this._solution.sid); + get: function() { + if (!this._dialogues) { + this._dialogues = new DialogueList(this._version, this._solution.sid); + } + return this._dialogues; } - return this._dialogues; - } }); Object.defineProperty(AssistantContext.prototype, 'styleSheet', { - get: function() { - if (!this._styleSheet) { - this._styleSheet = new StyleSheetList(this._version, this._solution.sid); + get: function() { + if (!this._styleSheet) { + this._styleSheet = new StyleSheetList(this._version, this._solution.sid); + } + return this._styleSheet; } - return this._styleSheet; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/assistantFallbackActions.js b/lib/rest/preview/understand/assistant/assistantFallbackActions.js index 10d25ca1ca..68dd13cc7d 100644 --- a/lib/rest/preview/understand/assistant/assistantFallbackActions.js +++ b/lib/rest/preview/understand/assistant/assistantFallbackActions.js @@ -199,13 +199,13 @@ AssistantFallbackActionsInstance = function Object.defineProperty(AssistantFallbackActionsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssistantFallbackActionsContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new AssistantFallbackActionsContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/assistantInitiationActions.js b/lib/rest/preview/understand/assistant/assistantInitiationActions.js index 6c8e5f4fd8..f403c79e4f 100644 --- a/lib/rest/preview/understand/assistant/assistantInitiationActions.js +++ b/lib/rest/preview/understand/assistant/assistantInitiationActions.js @@ -200,13 +200,13 @@ AssistantInitiationActionsInstance = function Object.defineProperty(AssistantInitiationActionsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssistantInitiationActionsContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new AssistantInitiationActionsContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/dialogue.js b/lib/rest/preview/understand/assistant/dialogue.js index 61ea6e61ef..90852dee83 100644 --- a/lib/rest/preview/understand/assistant/dialogue.js +++ b/lib/rest/preview/understand/assistant/dialogue.js @@ -199,13 +199,13 @@ DialogueInstance = function DialogueInstance(version, payload, assistantSid, Object.defineProperty(DialogueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DialogueContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/fieldType.js b/lib/rest/preview/understand/assistant/fieldType.js index 2ad802f62c..63ced230e4 100644 --- a/lib/rest/preview/understand/assistant/fieldType.js +++ b/lib/rest/preview/understand/assistant/fieldType.js @@ -512,17 +512,17 @@ FieldTypeInstance = function FieldTypeInstance(version, payload, assistantSid, Object.defineProperty(FieldTypeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldTypeContext( - this._version, - this._solution.assistantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldTypeContext( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -768,16 +768,16 @@ FieldTypeContext.prototype.remove = function remove(callback) { Object.defineProperty(FieldTypeContext.prototype, 'fieldValues', { - get: function() { - if (!this._fieldValues) { - this._fieldValues = new FieldValueList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._fieldValues) { + this._fieldValues = new FieldValueList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._fieldValues; } - return this._fieldValues; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/fieldType/fieldValue.js b/lib/rest/preview/understand/assistant/fieldType/fieldValue.js index ba0177ba73..3152d72232 100644 --- a/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +++ b/lib/rest/preview/understand/assistant/fieldType/fieldValue.js @@ -540,18 +540,18 @@ FieldValueInstance = function FieldValueInstance(version, payload, assistantSid, Object.defineProperty(FieldValueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldValueContext( - this._version, - this._solution.assistantSid, - this._solution.fieldTypeSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldValueContext( + this._version, + this._solution.assistantSid, + this._solution.fieldTypeSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/modelBuild.js b/lib/rest/preview/understand/assistant/modelBuild.js index c9aa37558d..48d093139c 100644 --- a/lib/rest/preview/understand/assistant/modelBuild.js +++ b/lib/rest/preview/understand/assistant/modelBuild.js @@ -512,17 +512,17 @@ ModelBuildInstance = function ModelBuildInstance(version, payload, assistantSid, Object.defineProperty(ModelBuildInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ModelBuildContext( - this._version, - this._solution.assistantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ModelBuildContext( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/query.js b/lib/rest/preview/understand/assistant/query.js index 6e27136883..d29b189909 100644 --- a/lib/rest/preview/understand/assistant/query.js +++ b/lib/rest/preview/understand/assistant/query.js @@ -550,13 +550,13 @@ QueryInstance = function QueryInstance(version, payload, assistantSid, sid) { Object.defineProperty(QueryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new QueryContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/styleSheet.js b/lib/rest/preview/understand/assistant/styleSheet.js index ec7efcbaa9..f70f69dbe2 100644 --- a/lib/rest/preview/understand/assistant/styleSheet.js +++ b/lib/rest/preview/understand/assistant/styleSheet.js @@ -196,13 +196,13 @@ StyleSheetInstance = function StyleSheetInstance(version, payload, assistantSid) Object.defineProperty(StyleSheetInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new StyleSheetContext(this._version, this._solution.assistantSid); - } + get: function() { + if (!this._context) { + this._context = new StyleSheetContext(this._version, this._solution.assistantSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/task.js b/lib/rest/preview/understand/assistant/task.js index db45664526..c486b62f16 100644 --- a/lib/rest/preview/understand/assistant/task.js +++ b/lib/rest/preview/understand/assistant/task.js @@ -525,13 +525,13 @@ TaskInstance = function TaskInstance(version, payload, assistantSid, sid) { Object.defineProperty(TaskInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new TaskContext(this._version, this._solution.assistantSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -838,50 +838,50 @@ TaskContext.prototype.remove = function remove(callback) { Object.defineProperty(TaskContext.prototype, 'fields', { - get: function() { - if (!this._fields) { - this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid); + get: function() { + if (!this._fields) { + this._fields = new FieldList(this._version, this._solution.assistantSid, this._solution.sid); + } + return this._fields; } - return this._fields; - } }); Object.defineProperty(TaskContext.prototype, 'samples', { - get: function() { - if (!this._samples) { - this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid); + get: function() { + if (!this._samples) { + this._samples = new SampleList(this._version, this._solution.assistantSid, this._solution.sid); + } + return this._samples; } - return this._samples; - } }); Object.defineProperty(TaskContext.prototype, 'taskActions', { - get: function() { - if (!this._taskActions) { - this._taskActions = new TaskActionsList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._taskActions) { + this._taskActions = new TaskActionsList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._taskActions; } - return this._taskActions; - } }); Object.defineProperty(TaskContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new TaskStatisticsList( - this._version, - this._solution.assistantSid, - this._solution.sid - ); + get: function() { + if (!this._statistics) { + this._statistics = new TaskStatisticsList( + this._version, + this._solution.assistantSid, + this._solution.sid + ); + } + return this._statistics; } - return this._statistics; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/task/field.js b/lib/rest/preview/understand/assistant/task/field.js index 9aa7ffc339..139f1d0d18 100644 --- a/lib/rest/preview/understand/assistant/task/field.js +++ b/lib/rest/preview/understand/assistant/task/field.js @@ -524,18 +524,18 @@ FieldInstance = function FieldInstance(version, payload, assistantSid, taskSid, Object.defineProperty(FieldInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FieldContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FieldContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/task/sample.js b/lib/rest/preview/understand/assistant/task/sample.js index cd5d873d6f..ee825f69d0 100644 --- a/lib/rest/preview/understand/assistant/task/sample.js +++ b/lib/rest/preview/understand/assistant/task/sample.js @@ -531,18 +531,18 @@ SampleInstance = function SampleInstance(version, payload, assistantSid, Object.defineProperty(SampleInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SampleContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new SampleContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/task/taskActions.js b/lib/rest/preview/understand/assistant/task/taskActions.js index 058e08e708..b0c3c36ef6 100644 --- a/lib/rest/preview/understand/assistant/task/taskActions.js +++ b/lib/rest/preview/understand/assistant/task/taskActions.js @@ -207,17 +207,17 @@ TaskActionsInstance = function TaskActionsInstance(version, payload, Object.defineProperty(TaskActionsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskActionsContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid - ); + get: function() { + if (!this._context) { + this._context = new TaskActionsContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/understand/assistant/task/taskStatistics.js b/lib/rest/preview/understand/assistant/task/taskStatistics.js index c818ff7fd2..428cfed008 100644 --- a/lib/rest/preview/understand/assistant/task/taskStatistics.js +++ b/lib/rest/preview/understand/assistant/task/taskStatistics.js @@ -218,17 +218,17 @@ TaskStatisticsInstance = function TaskStatisticsInstance(version, payload, Object.defineProperty(TaskStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskStatisticsContext( - this._version, - this._solution.assistantSid, - this._solution.taskSid - ); + get: function() { + if (!this._context) { + this._context = new TaskStatisticsContext( + this._version, + this._solution.assistantSid, + this._solution.taskSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/wireless/command.js b/lib/rest/preview/wireless/command.js index 3d085264a3..b96cb6ce74 100644 --- a/lib/rest/preview/wireless/command.js +++ b/lib/rest/preview/wireless/command.js @@ -526,13 +526,13 @@ CommandInstance = function CommandInstance(version, payload, sid) { Object.defineProperty(CommandInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CommandContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CommandContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/wireless/ratePlan.js b/lib/rest/preview/wireless/ratePlan.js index 8d23717968..42383a79d3 100644 --- a/lib/rest/preview/wireless/ratePlan.js +++ b/lib/rest/preview/wireless/ratePlan.js @@ -522,13 +522,13 @@ RatePlanInstance = function RatePlanInstance(version, payload, sid) { Object.defineProperty(RatePlanInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RatePlanContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RatePlanContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/wireless/sim.js b/lib/rest/preview/wireless/sim.js index 46320e2cd5..17e77108dd 100644 --- a/lib/rest/preview/wireless/sim.js +++ b/lib/rest/preview/wireless/sim.js @@ -497,13 +497,13 @@ SimInstance = function SimInstance(version, payload, sid) { Object.defineProperty(SimInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SimContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SimContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -727,12 +727,12 @@ SimContext.prototype.update = function update(opts, callback) { Object.defineProperty(SimContext.prototype, 'usage', { - get: function() { - if (!this._usage) { - this._usage = new UsageList(this._version, this._solution.sid); + get: function() { + if (!this._usage) { + this._usage = new UsageList(this._version, this._solution.sid); + } + return this._usage; } - return this._usage; - } }); /* jshint ignore:start */ diff --git a/lib/rest/preview/wireless/sim/usage.js b/lib/rest/preview/wireless/sim/usage.js index 3214be1d3e..919f51f774 100644 --- a/lib/rest/preview/wireless/sim/usage.js +++ b/lib/rest/preview/wireless/sim/usage.js @@ -202,13 +202,13 @@ UsageInstance = function UsageInstance(version, payload, simSid) { Object.defineProperty(UsageInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new UsageContext(this._version, this._solution.simSid); - } + get: function() { + if (!this._context) { + this._context = new UsageContext(this._version, this._solution.simSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/V1.js b/lib/rest/pricing/V1.js index 168605bf19..c0da32f812 100644 --- a/lib/rest/pricing/V1.js +++ b/lib/rest/pricing/V1.js @@ -44,26 +44,26 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'messaging', { - get: function() { - this._messaging = this._messaging || new MessagingList(this); - return this._messaging; - } + get: function() { + this._messaging = this._messaging || new MessagingList(this); + return this._messaging; + } }); Object.defineProperty(V1.prototype, 'phoneNumbers', { - get: function() { - this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this); - return this._phoneNumbers; - } + get: function() { + this._phoneNumbers = this._phoneNumbers || new PhoneNumberList(this); + return this._phoneNumbers; + } }); Object.defineProperty(V1.prototype, 'voice', { - get: function() { - this._voice = this._voice || new VoiceList(this); - return this._voice; - } + get: function() { + this._voice = this._voice || new VoiceList(this); + return this._voice; + } }); module.exports = V1; diff --git a/lib/rest/pricing/V2.js b/lib/rest/pricing/V2.js index 2bbcbabc1c..e972df0121 100644 --- a/lib/rest/pricing/V2.js +++ b/lib/rest/pricing/V2.js @@ -37,10 +37,10 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'voice', { - get: function() { - this._voice = this._voice || new VoiceList(this); - return this._voice; - } + get: function() { + this._voice = this._voice || new VoiceList(this); + return this._voice; + } }); module.exports = V2; diff --git a/lib/rest/pricing/v1/messaging.js b/lib/rest/pricing/v1/messaging.js index 0cda13fb38..d2272e831b 100644 --- a/lib/rest/pricing/v1/messaging.js +++ b/lib/rest/pricing/v1/messaging.js @@ -51,13 +51,13 @@ MessagingList = function MessagingList(version) { Object.defineProperty(MessagingListInstance, 'countries', { - get: function countries() { - if (!this._countries) { - this._countries = new CountryList(this._version); - } + get: function countries() { + if (!this._countries) { + this._countries = new CountryList(this._version); + } - return this._countries; - } + return this._countries; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/messaging/country.js b/lib/rest/pricing/v1/messaging/country.js index ce3e1acb30..acaec9c12c 100644 --- a/lib/rest/pricing/v1/messaging/country.js +++ b/lib/rest/pricing/v1/messaging/country.js @@ -431,13 +431,13 @@ CountryInstance = function CountryInstance(version, payload, isoCountry) { Object.defineProperty(CountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CountryContext(this._version, this._solution.isoCountry); - } + get: function() { + if (!this._context) { + this._context = new CountryContext(this._version, this._solution.isoCountry); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/phoneNumber.js b/lib/rest/pricing/v1/phoneNumber.js index 8ae049f210..0855a56d40 100644 --- a/lib/rest/pricing/v1/phoneNumber.js +++ b/lib/rest/pricing/v1/phoneNumber.js @@ -51,13 +51,13 @@ PhoneNumberList = function PhoneNumberList(version) { Object.defineProperty(PhoneNumberListInstance, 'countries', { - get: function countries() { - if (!this._countries) { - this._countries = new CountryList(this._version); - } + get: function countries() { + if (!this._countries) { + this._countries = new CountryList(this._version); + } - return this._countries; - } + return this._countries; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/phoneNumber/country.js b/lib/rest/pricing/v1/phoneNumber/country.js index 3943de02e5..9c82cb23e0 100644 --- a/lib/rest/pricing/v1/phoneNumber/country.js +++ b/lib/rest/pricing/v1/phoneNumber/country.js @@ -429,13 +429,13 @@ CountryInstance = function CountryInstance(version, payload, isoCountry) { Object.defineProperty(CountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CountryContext(this._version, this._solution.isoCountry); - } + get: function() { + if (!this._context) { + this._context = new CountryContext(this._version, this._solution.isoCountry); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/voice.js b/lib/rest/pricing/v1/voice.js index fe89a41b75..7f24515ee5 100644 --- a/lib/rest/pricing/v1/voice.js +++ b/lib/rest/pricing/v1/voice.js @@ -53,24 +53,24 @@ VoiceList = function VoiceList(version) { Object.defineProperty(VoiceListInstance, 'numbers', { - get: function numbers() { - if (!this._numbers) { - this._numbers = new NumberList(this._version); - } + get: function numbers() { + if (!this._numbers) { + this._numbers = new NumberList(this._version); + } - return this._numbers; - } + return this._numbers; + } }); Object.defineProperty(VoiceListInstance, 'countries', { - get: function countries() { - if (!this._countries) { - this._countries = new CountryList(this._version); - } + get: function countries() { + if (!this._countries) { + this._countries = new CountryList(this._version); + } - return this._countries; - } + return this._countries; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/voice/country.js b/lib/rest/pricing/v1/voice/country.js index fd487825c4..2f35e1e665 100644 --- a/lib/rest/pricing/v1/voice/country.js +++ b/lib/rest/pricing/v1/voice/country.js @@ -432,13 +432,13 @@ CountryInstance = function CountryInstance(version, payload, isoCountry) { Object.defineProperty(CountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CountryContext(this._version, this._solution.isoCountry); - } + get: function() { + if (!this._context) { + this._context = new CountryContext(this._version, this._solution.isoCountry); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v1/voice/number.js b/lib/rest/pricing/v1/voice/number.js index c6cb47ea61..2144252672 100644 --- a/lib/rest/pricing/v1/voice/number.js +++ b/lib/rest/pricing/v1/voice/number.js @@ -188,13 +188,13 @@ NumberInstance = function NumberInstance(version, payload, number) { Object.defineProperty(NumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new NumberContext(this._version, this._solution.number); - } + get: function() { + if (!this._context) { + this._context = new NumberContext(this._version, this._solution.number); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v2/voice.js b/lib/rest/pricing/v2/voice.js index b4a7dbba6d..88360260c7 100644 --- a/lib/rest/pricing/v2/voice.js +++ b/lib/rest/pricing/v2/voice.js @@ -53,24 +53,24 @@ VoiceList = function VoiceList(version) { Object.defineProperty(VoiceListInstance, 'countries', { - get: function countries() { - if (!this._countries) { - this._countries = new CountryList(this._version); - } + get: function countries() { + if (!this._countries) { + this._countries = new CountryList(this._version); + } - return this._countries; - } + return this._countries; + } }); Object.defineProperty(VoiceListInstance, 'numbers', { - get: function numbers() { - if (!this._numbers) { - this._numbers = new NumberList(this._version); - } + get: function numbers() { + if (!this._numbers) { + this._numbers = new NumberList(this._version); + } - return this._numbers; - } + return this._numbers; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v2/voice/country.js b/lib/rest/pricing/v2/voice/country.js index 668553c4eb..2f715aae75 100644 --- a/lib/rest/pricing/v2/voice/country.js +++ b/lib/rest/pricing/v2/voice/country.js @@ -434,13 +434,13 @@ CountryInstance = function CountryInstance(version, payload, isoCountry) { Object.defineProperty(CountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CountryContext(this._version, this._solution.isoCountry); - } + get: function() { + if (!this._context) { + this._context = new CountryContext(this._version, this._solution.isoCountry); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/pricing/v2/voice/number.js b/lib/rest/pricing/v2/voice/number.js index f1f247e3e8..6a4dcd84ba 100644 --- a/lib/rest/pricing/v2/voice/number.js +++ b/lib/rest/pricing/v2/voice/number.js @@ -195,13 +195,13 @@ NumberInstance = function NumberInstance(version, payload, destinationNumber) { Object.defineProperty(NumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new NumberContext(this._version, this._solution.destinationNumber); - } + get: function() { + if (!this._context) { + this._context = new NumberContext(this._version, this._solution.destinationNumber); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/V1.js b/lib/rest/proxy/V1.js index ee0a8249b5..7fb0bc827b 100644 --- a/lib/rest/proxy/V1.js +++ b/lib/rest/proxy/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/proxy/v1/service.js b/lib/rest/proxy/v1/service.js index 15ddf4e700..518f3c000b 100644 --- a/lib/rest/proxy/v1/service.js +++ b/lib/rest/proxy/v1/service.js @@ -531,13 +531,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -831,32 +831,32 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'sessions', { - get: function() { - if (!this._sessions) { - this._sessions = new SessionList(this._version, this._solution.sid); + get: function() { + if (!this._sessions) { + this._sessions = new SessionList(this._version, this._solution.sid); + } + return this._sessions; } - return this._sessions; - } }); Object.defineProperty(ServiceContext.prototype, 'phoneNumbers', { - get: function() { - if (!this._phoneNumbers) { - this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + get: function() { + if (!this._phoneNumbers) { + this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + } + return this._phoneNumbers; } - return this._phoneNumbers; - } }); Object.defineProperty(ServiceContext.prototype, 'shortCodes', { - get: function() { - if (!this._shortCodes) { - this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + get: function() { + if (!this._shortCodes) { + this._shortCodes = new ShortCodeList(this._version, this._solution.sid); + } + return this._shortCodes; } - return this._shortCodes; - } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/phoneNumber.js b/lib/rest/proxy/v1/service/phoneNumber.js index fbe92e4c41..6136044180 100644 --- a/lib/rest/proxy/v1/service/phoneNumber.js +++ b/lib/rest/proxy/v1/service/phoneNumber.js @@ -519,17 +519,17 @@ PhoneNumberInstance = function PhoneNumberInstance(version, payload, serviceSid, Object.defineProperty(PhoneNumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PhoneNumberContext( - this._version, - this._solution.serviceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new PhoneNumberContext( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/session.js b/lib/rest/proxy/v1/service/session.js index 4bfef3aa5f..e305216e57 100644 --- a/lib/rest/proxy/v1/service/session.js +++ b/lib/rest/proxy/v1/service/session.js @@ -531,13 +531,13 @@ SessionInstance = function SessionInstance(version, payload, serviceSid, sid) { Object.defineProperty(SessionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SessionContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SessionContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -800,30 +800,30 @@ SessionContext.prototype.update = function update(opts, callback) { Object.defineProperty(SessionContext.prototype, 'interactions', { - get: function() { - if (!this._interactions) { - this._interactions = new InteractionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._interactions) { + this._interactions = new InteractionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._interactions; } - return this._interactions; - } }); Object.defineProperty(SessionContext.prototype, 'participants', { - get: function() { - if (!this._participants) { - this._participants = new ParticipantList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._participants) { + this._participants = new ParticipantList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._participants; } - return this._participants; - } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/session/interaction.js b/lib/rest/proxy/v1/service/session/interaction.js index 51ebd7df49..562ea973a2 100644 --- a/lib/rest/proxy/v1/service/session/interaction.js +++ b/lib/rest/proxy/v1/service/session/interaction.js @@ -490,18 +490,18 @@ InteractionInstance = function InteractionInstance(version, payload, serviceSid, Object.defineProperty(InteractionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new InteractionContext( - this._version, - this._solution.serviceSid, - this._solution.sessionSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new InteractionContext( + this._version, + this._solution.serviceSid, + this._solution.sessionSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/session/participant.js b/lib/rest/proxy/v1/service/session/participant.js index f771594103..e5d7bde248 100644 --- a/lib/rest/proxy/v1/service/session/participant.js +++ b/lib/rest/proxy/v1/service/session/participant.js @@ -537,18 +537,18 @@ ParticipantInstance = function ParticipantInstance(version, payload, serviceSid, Object.defineProperty(ParticipantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ParticipantContext( - this._version, - this._solution.serviceSid, - this._solution.sessionSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ParticipantContext( + this._version, + this._solution.serviceSid, + this._solution.sessionSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -724,17 +724,17 @@ ParticipantContext.prototype.remove = function remove(callback) { Object.defineProperty(ParticipantContext.prototype, 'messageInteractions', { - get: function() { - if (!this._messageInteractions) { - this._messageInteractions = new MessageInteractionList( - this._version, - this._solution.serviceSid, - this._solution.sessionSid, - this._solution.sid - ); + get: function() { + if (!this._messageInteractions) { + this._messageInteractions = new MessageInteractionList( + this._version, + this._solution.serviceSid, + this._solution.sessionSid, + this._solution.sid + ); + } + return this._messageInteractions; } - return this._messageInteractions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/session/participant/messageInteraction.js b/lib/rest/proxy/v1/service/session/participant/messageInteraction.js index 3fcc797e03..01ea216208 100644 --- a/lib/rest/proxy/v1/service/session/participant/messageInteraction.js +++ b/lib/rest/proxy/v1/service/session/participant/messageInteraction.js @@ -564,19 +564,19 @@ MessageInteractionInstance = function MessageInteractionInstance(version, Object.defineProperty(MessageInteractionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessageInteractionContext( - this._version, - this._solution.serviceSid, - this._solution.sessionSid, - this._solution.participantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new MessageInteractionContext( + this._version, + this._solution.serviceSid, + this._solution.sessionSid, + this._solution.participantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/proxy/v1/service/shortCode.js b/lib/rest/proxy/v1/service/shortCode.js index e62cd62605..af6a345e86 100644 --- a/lib/rest/proxy/v1/service/shortCode.js +++ b/lib/rest/proxy/v1/service/shortCode.js @@ -504,13 +504,13 @@ ShortCodeInstance = function ShortCodeInstance(version, payload, serviceSid, Object.defineProperty(ShortCodeInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ShortCodeContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/V1.js b/lib/rest/serverless/V1.js index 30f0081632..9fd8a36854 100644 --- a/lib/rest/serverless/V1.js +++ b/lib/rest/serverless/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/serverless/v1/service.js b/lib/rest/serverless/v1/service.js index f18c5708b5..bb68340ee6 100644 --- a/lib/rest/serverless/v1/service.js +++ b/lib/rest/serverless/v1/service.js @@ -514,13 +514,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -804,42 +804,42 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'environments', { - get: function() { - if (!this._environments) { - this._environments = new EnvironmentList(this._version, this._solution.sid); + get: function() { + if (!this._environments) { + this._environments = new EnvironmentList(this._version, this._solution.sid); + } + return this._environments; } - return this._environments; - } }); Object.defineProperty(ServiceContext.prototype, 'functions', { - get: function() { - if (!this._functions) { - this._functions = new FunctionList(this._version, this._solution.sid); + get: function() { + if (!this._functions) { + this._functions = new FunctionList(this._version, this._solution.sid); + } + return this._functions; } - return this._functions; - } }); Object.defineProperty(ServiceContext.prototype, 'assets', { - get: function() { - if (!this._assets) { - this._assets = new AssetList(this._version, this._solution.sid); + get: function() { + if (!this._assets) { + this._assets = new AssetList(this._version, this._solution.sid); + } + return this._assets; } - return this._assets; - } }); Object.defineProperty(ServiceContext.prototype, 'builds', { - get: function() { - if (!this._builds) { - this._builds = new BuildList(this._version, this._solution.sid); + get: function() { + if (!this._builds) { + this._builds = new BuildList(this._version, this._solution.sid); + } + return this._builds; } - return this._builds; - } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/asset.js b/lib/rest/serverless/v1/service/asset.js index 194c059546..699c0f1a1c 100644 --- a/lib/rest/serverless/v1/service/asset.js +++ b/lib/rest/serverless/v1/service/asset.js @@ -505,13 +505,13 @@ AssetInstance = function AssetInstance(version, payload, serviceSid, sid) { Object.defineProperty(AssetInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssetContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new AssetContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -750,16 +750,16 @@ AssetContext.prototype.update = function update(opts, callback) { Object.defineProperty(AssetContext.prototype, 'assetVersions', { - get: function() { - if (!this._assetVersions) { - this._assetVersions = new AssetVersionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._assetVersions) { + this._assetVersions = new AssetVersionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._assetVersions; } - return this._assetVersions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/asset/assetVersion.js b/lib/rest/serverless/v1/service/asset/assetVersion.js index e44c3567a1..f0fbbdaff7 100644 --- a/lib/rest/serverless/v1/service/asset/assetVersion.js +++ b/lib/rest/serverless/v1/service/asset/assetVersion.js @@ -478,18 +478,18 @@ AssetVersionInstance = function AssetVersionInstance(version, payload, Object.defineProperty(AssetVersionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new AssetVersionContext( - this._version, - this._solution.serviceSid, - this._solution.assetSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new AssetVersionContext( + this._version, + this._solution.serviceSid, + this._solution.assetSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/build.js b/lib/rest/serverless/v1/service/build.js index 132508b98b..559c32bab5 100644 --- a/lib/rest/serverless/v1/service/build.js +++ b/lib/rest/serverless/v1/service/build.js @@ -519,13 +519,13 @@ BuildInstance = function BuildInstance(version, payload, serviceSid, sid) { Object.defineProperty(BuildInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BuildContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new BuildContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/environment.js b/lib/rest/serverless/v1/service/environment.js index 851bb4a465..c65b5b318e 100644 --- a/lib/rest/serverless/v1/service/environment.js +++ b/lib/rest/serverless/v1/service/environment.js @@ -525,17 +525,17 @@ EnvironmentInstance = function EnvironmentInstance(version, payload, serviceSid, Object.defineProperty(EnvironmentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EnvironmentContext( - this._version, - this._solution.serviceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new EnvironmentContext( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -743,36 +743,36 @@ EnvironmentContext.prototype.remove = function remove(callback) { Object.defineProperty(EnvironmentContext.prototype, 'variables', { - get: function() { - if (!this._variables) { - this._variables = new VariableList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._variables) { + this._variables = new VariableList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._variables; } - return this._variables; - } }); Object.defineProperty(EnvironmentContext.prototype, 'deployments', { - get: function() { - if (!this._deployments) { - this._deployments = new DeploymentList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._deployments) { + this._deployments = new DeploymentList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._deployments; } - return this._deployments; - } }); Object.defineProperty(EnvironmentContext.prototype, 'logs', { - get: function() { - if (!this._logs) { - this._logs = new LogList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._logs) { + this._logs = new LogList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._logs; } - return this._logs; - } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/environment/deployment.js b/lib/rest/serverless/v1/service/environment/deployment.js index 96855467b2..5af7ffe149 100644 --- a/lib/rest/serverless/v1/service/environment/deployment.js +++ b/lib/rest/serverless/v1/service/environment/deployment.js @@ -520,18 +520,18 @@ DeploymentInstance = function DeploymentInstance(version, payload, serviceSid, Object.defineProperty(DeploymentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DeploymentContext( - this._version, - this._solution.serviceSid, - this._solution.environmentSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new DeploymentContext( + this._version, + this._solution.serviceSid, + this._solution.environmentSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/environment/log.js b/lib/rest/serverless/v1/service/environment/log.js index 4cf7fe137d..8ebe144e29 100644 --- a/lib/rest/serverless/v1/service/environment/log.js +++ b/lib/rest/serverless/v1/service/environment/log.js @@ -497,18 +497,18 @@ LogInstance = function LogInstance(version, payload, serviceSid, environmentSid, Object.defineProperty(LogInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new LogContext( - this._version, - this._solution.serviceSid, - this._solution.environmentSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new LogContext( + this._version, + this._solution.serviceSid, + this._solution.environmentSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/environment/variable.js b/lib/rest/serverless/v1/service/environment/variable.js index 35526d4485..5ba941467b 100644 --- a/lib/rest/serverless/v1/service/environment/variable.js +++ b/lib/rest/serverless/v1/service/environment/variable.js @@ -530,18 +530,18 @@ VariableInstance = function VariableInstance(version, payload, serviceSid, Object.defineProperty(VariableInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new VariableContext( - this._version, - this._solution.serviceSid, - this._solution.environmentSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new VariableContext( + this._version, + this._solution.serviceSid, + this._solution.environmentSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/function.js b/lib/rest/serverless/v1/service/function.js index 4c647a3c58..565b3d7cbb 100644 --- a/lib/rest/serverless/v1/service/function.js +++ b/lib/rest/serverless/v1/service/function.js @@ -507,13 +507,13 @@ FunctionInstance = function FunctionInstance(version, payload, serviceSid, sid) Object.defineProperty(FunctionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FunctionContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FunctionContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -752,16 +752,16 @@ FunctionContext.prototype.update = function update(opts, callback) { Object.defineProperty(FunctionContext.prototype, 'functionVersions', { - get: function() { - if (!this._functionVersions) { - this._functionVersions = new FunctionVersionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._functionVersions) { + this._functionVersions = new FunctionVersionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._functionVersions; } - return this._functionVersions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/serverless/v1/service/function/functionVersion.js b/lib/rest/serverless/v1/service/function/functionVersion.js index fc4e86f0ad..b05ea7ea7f 100644 --- a/lib/rest/serverless/v1/service/function/functionVersion.js +++ b/lib/rest/serverless/v1/service/function/functionVersion.js @@ -481,18 +481,18 @@ FunctionVersionInstance = function FunctionVersionInstance(version, payload, Object.defineProperty(FunctionVersionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FunctionVersionContext( - this._version, - this._solution.serviceSid, - this._solution.functionSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new FunctionVersionContext( + this._version, + this._solution.serviceSid, + this._solution.functionSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/V1.js b/lib/rest/studio/V1.js index 436d3b2c2a..f1269a246b 100644 --- a/lib/rest/studio/V1.js +++ b/lib/rest/studio/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'flows', { - get: function() { - this._flows = this._flows || new FlowList(this); - return this._flows; - } + get: function() { + this._flows = this._flows || new FlowList(this); + return this._flows; + } }); module.exports = V1; diff --git a/lib/rest/studio/V2.js b/lib/rest/studio/V2.js index 9ee65814ba..c20754d508 100644 --- a/lib/rest/studio/V2.js +++ b/lib/rest/studio/V2.js @@ -40,18 +40,18 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'flows', { - get: function() { - this._flows = this._flows || new FlowList(this); - return this._flows; - } + get: function() { + this._flows = this._flows || new FlowList(this); + return this._flows; + } }); Object.defineProperty(V2.prototype, 'flowValid', { - get: function() { - this._flowValid = this._flowValid || new FlowValidateList(this); - return this._flowValid; - } + get: function() { + this._flowValid = this._flowValid || new FlowValidateList(this); + return this._flowValid; + } }); module.exports = V2; diff --git a/lib/rest/studio/v1/flow.js b/lib/rest/studio/v1/flow.js index 51faeb7774..c19d2acbe2 100644 --- a/lib/rest/studio/v1/flow.js +++ b/lib/rest/studio/v1/flow.js @@ -443,13 +443,13 @@ FlowInstance = function FlowInstance(version, payload, sid) { Object.defineProperty(FlowInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FlowContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FlowContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -628,22 +628,22 @@ FlowContext.prototype.remove = function remove(callback) { Object.defineProperty(FlowContext.prototype, 'engagements', { - get: function() { - if (!this._engagements) { - this._engagements = new EngagementList(this._version, this._solution.sid); + get: function() { + if (!this._engagements) { + this._engagements = new EngagementList(this._version, this._solution.sid); + } + return this._engagements; } - return this._engagements; - } }); Object.defineProperty(FlowContext.prototype, 'executions', { - get: function() { - if (!this._executions) { - this._executions = new ExecutionList(this._version, this._solution.sid); + get: function() { + if (!this._executions) { + this._executions = new ExecutionList(this._version, this._solution.sid); + } + return this._executions; } - return this._executions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/engagement.js b/lib/rest/studio/v1/flow/engagement.js index 3e66aefca4..7afdc86142 100644 --- a/lib/rest/studio/v1/flow/engagement.js +++ b/lib/rest/studio/v1/flow/engagement.js @@ -512,13 +512,13 @@ EngagementInstance = function EngagementInstance(version, payload, flowSid, sid) Object.defineProperty(EngagementInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EngagementContext(this._version, this._solution.flowSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new EngagementContext(this._version, this._solution.flowSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -704,26 +704,26 @@ EngagementContext.prototype.remove = function remove(callback) { Object.defineProperty(EngagementContext.prototype, 'steps', { - get: function() { - if (!this._steps) { - this._steps = new StepList(this._version, this._solution.flowSid, this._solution.sid); + get: function() { + if (!this._steps) { + this._steps = new StepList(this._version, this._solution.flowSid, this._solution.sid); + } + return this._steps; } - return this._steps; - } }); Object.defineProperty(EngagementContext.prototype, 'engagementContext', { - get: function() { - if (!this._engagementContext) { - this._engagementContext = new EngagementContextList( - this._version, - this._solution.flowSid, - this._solution.sid - ); + get: function() { + if (!this._engagementContext) { + this._engagementContext = new EngagementContextList( + this._version, + this._solution.flowSid, + this._solution.sid + ); + } + return this._engagementContext; } - return this._engagementContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/engagement/engagementContext.js b/lib/rest/studio/v1/flow/engagement/engagementContext.js index d64f44851b..f2e37eeabe 100644 --- a/lib/rest/studio/v1/flow/engagement/engagementContext.js +++ b/lib/rest/studio/v1/flow/engagement/engagementContext.js @@ -198,17 +198,17 @@ EngagementContextInstance = function EngagementContextInstance(version, payload, Object.defineProperty(EngagementContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EngagementContextContext( - this._version, - this._solution.flowSid, - this._solution.engagementSid - ); + get: function() { + if (!this._context) { + this._context = new EngagementContextContext( + this._version, + this._solution.flowSid, + this._solution.engagementSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/engagement/step.js b/lib/rest/studio/v1/flow/engagement/step.js index 3d04c172c4..ed525fbbbf 100644 --- a/lib/rest/studio/v1/flow/engagement/step.js +++ b/lib/rest/studio/v1/flow/engagement/step.js @@ -460,18 +460,18 @@ StepInstance = function StepInstance(version, payload, flowSid, engagementSid, Object.defineProperty(StepInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new StepContext( - this._version, - this._solution.flowSid, - this._solution.engagementSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new StepContext( + this._version, + this._solution.flowSid, + this._solution.engagementSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -594,17 +594,17 @@ StepContext.prototype.fetch = function fetch(callback) { Object.defineProperty(StepContext.prototype, 'stepContext', { - get: function() { - if (!this._stepContext) { - this._stepContext = new StepContextList( - this._version, - this._solution.flowSid, - this._solution.engagementSid, - this._solution.sid - ); + get: function() { + if (!this._stepContext) { + this._stepContext = new StepContextList( + this._version, + this._solution.flowSid, + this._solution.engagementSid, + this._solution.sid + ); + } + return this._stepContext; } - return this._stepContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/engagement/step/stepContext.js b/lib/rest/studio/v1/flow/engagement/step/stepContext.js index a3de4a635f..b877046976 100644 --- a/lib/rest/studio/v1/flow/engagement/step/stepContext.js +++ b/lib/rest/studio/v1/flow/engagement/step/stepContext.js @@ -207,18 +207,18 @@ StepContextInstance = function StepContextInstance(version, payload, flowSid, Object.defineProperty(StepContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new StepContextContext( - this._version, - this._solution.flowSid, - this._solution.engagementSid, - this._solution.stepSid - ); + get: function() { + if (!this._context) { + this._context = new StepContextContext( + this._version, + this._solution.flowSid, + this._solution.engagementSid, + this._solution.stepSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/execution.js b/lib/rest/studio/v1/flow/execution.js index cb9991a470..dfbf33efa7 100644 --- a/lib/rest/studio/v1/flow/execution.js +++ b/lib/rest/studio/v1/flow/execution.js @@ -525,13 +525,13 @@ ExecutionInstance = function ExecutionInstance(version, payload, flowSid, sid) { Object.defineProperty(ExecutionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -717,26 +717,26 @@ ExecutionContext.prototype.remove = function remove(callback) { Object.defineProperty(ExecutionContext.prototype, 'steps', { - get: function() { - if (!this._steps) { - this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid); + get: function() { + if (!this._steps) { + this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid); + } + return this._steps; } - return this._steps; - } }); Object.defineProperty(ExecutionContext.prototype, 'executionContext', { - get: function() { - if (!this._executionContext) { - this._executionContext = new ExecutionContextList( - this._version, - this._solution.flowSid, - this._solution.sid - ); + get: function() { + if (!this._executionContext) { + this._executionContext = new ExecutionContextList( + this._version, + this._solution.flowSid, + this._solution.sid + ); + } + return this._executionContext; } - return this._executionContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/execution/executionContext.js b/lib/rest/studio/v1/flow/execution/executionContext.js index 293b068728..159c6bd32f 100644 --- a/lib/rest/studio/v1/flow/execution/executionContext.js +++ b/lib/rest/studio/v1/flow/execution/executionContext.js @@ -198,17 +198,17 @@ ExecutionContextInstance = function ExecutionContextInstance(version, payload, Object.defineProperty(ExecutionContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionContextContext( - this._version, - this._solution.flowSid, - this._solution.executionSid - ); + get: function() { + if (!this._context) { + this._context = new ExecutionContextContext( + this._version, + this._solution.flowSid, + this._solution.executionSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/execution/executionStep.js b/lib/rest/studio/v1/flow/execution/executionStep.js index 767e3c34e7..480e00e669 100644 --- a/lib/rest/studio/v1/flow/execution/executionStep.js +++ b/lib/rest/studio/v1/flow/execution/executionStep.js @@ -469,18 +469,18 @@ ExecutionStepInstance = function ExecutionStepInstance(version, payload, Object.defineProperty(ExecutionStepInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionStepContext( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ExecutionStepContext( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -605,17 +605,17 @@ ExecutionStepContext.prototype.fetch = function fetch(callback) { Object.defineProperty(ExecutionStepContext.prototype, 'stepContext', { - get: function() { - if (!this._stepContext) { - this._stepContext = new ExecutionStepContextList( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.sid - ); + get: function() { + if (!this._stepContext) { + this._stepContext = new ExecutionStepContextList( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.sid + ); + } + return this._stepContext; } - return this._stepContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js b/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js index a20af2761a..92677c5e03 100644 --- a/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js +++ b/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.js @@ -208,18 +208,18 @@ ExecutionStepContextInstance = function ExecutionStepContextInstance(version, Object.defineProperty(ExecutionStepContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionStepContextContext( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.stepSid - ); + get: function() { + if (!this._context) { + this._context = new ExecutionStepContextContext( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.stepSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow.js b/lib/rest/studio/v2/flow.js index ac985d897c..5f639c4ddb 100644 --- a/lib/rest/studio/v2/flow.js +++ b/lib/rest/studio/v2/flow.js @@ -523,13 +523,13 @@ FlowInstance = function FlowInstance(version, payload, sid) { Object.defineProperty(FlowInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FlowContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FlowContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -803,32 +803,32 @@ FlowContext.prototype.remove = function remove(callback) { Object.defineProperty(FlowContext.prototype, 'revisions', { - get: function() { - if (!this._revisions) { - this._revisions = new FlowRevisionList(this._version, this._solution.sid); + get: function() { + if (!this._revisions) { + this._revisions = new FlowRevisionList(this._version, this._solution.sid); + } + return this._revisions; } - return this._revisions; - } }); Object.defineProperty(FlowContext.prototype, 'testUsers', { - get: function() { - if (!this._testUsers) { - this._testUsers = new FlowTestUserList(this._version, this._solution.sid); + get: function() { + if (!this._testUsers) { + this._testUsers = new FlowTestUserList(this._version, this._solution.sid); + } + return this._testUsers; } - return this._testUsers; - } }); Object.defineProperty(FlowContext.prototype, 'executions', { - get: function() { - if (!this._executions) { - this._executions = new ExecutionList(this._version, this._solution.sid); + get: function() { + if (!this._executions) { + this._executions = new ExecutionList(this._version, this._solution.sid); + } + return this._executions; } - return this._executions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/execution.js b/lib/rest/studio/v2/flow/execution.js index f525588a38..fd291b7309 100644 --- a/lib/rest/studio/v2/flow/execution.js +++ b/lib/rest/studio/v2/flow/execution.js @@ -520,13 +520,13 @@ ExecutionInstance = function ExecutionInstance(version, payload, flowSid, sid) { Object.defineProperty(ExecutionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ExecutionContext(this._version, this._solution.flowSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -715,26 +715,26 @@ ExecutionContext.prototype.remove = function remove(callback) { Object.defineProperty(ExecutionContext.prototype, 'steps', { - get: function() { - if (!this._steps) { - this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid); + get: function() { + if (!this._steps) { + this._steps = new ExecutionStepList(this._version, this._solution.flowSid, this._solution.sid); + } + return this._steps; } - return this._steps; - } }); Object.defineProperty(ExecutionContext.prototype, 'executionContext', { - get: function() { - if (!this._executionContext) { - this._executionContext = new ExecutionContextList( - this._version, - this._solution.flowSid, - this._solution.sid - ); + get: function() { + if (!this._executionContext) { + this._executionContext = new ExecutionContextList( + this._version, + this._solution.flowSid, + this._solution.sid + ); + } + return this._executionContext; } - return this._executionContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/execution/executionContext.js b/lib/rest/studio/v2/flow/execution/executionContext.js index dba5496f8f..c2c43282f1 100644 --- a/lib/rest/studio/v2/flow/execution/executionContext.js +++ b/lib/rest/studio/v2/flow/execution/executionContext.js @@ -207,17 +207,17 @@ ExecutionContextInstance = function ExecutionContextInstance(version, payload, Object.defineProperty(ExecutionContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionContextContext( - this._version, - this._solution.flowSid, - this._solution.executionSid - ); + get: function() { + if (!this._context) { + this._context = new ExecutionContextContext( + this._version, + this._solution.flowSid, + this._solution.executionSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/execution/executionStep.js b/lib/rest/studio/v2/flow/execution/executionStep.js index 8d4c994f18..1bd3994904 100644 --- a/lib/rest/studio/v2/flow/execution/executionStep.js +++ b/lib/rest/studio/v2/flow/execution/executionStep.js @@ -473,18 +473,18 @@ ExecutionStepInstance = function ExecutionStepInstance(version, payload, Object.defineProperty(ExecutionStepInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionStepContext( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ExecutionStepContext( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -612,17 +612,17 @@ ExecutionStepContext.prototype.fetch = function fetch(callback) { Object.defineProperty(ExecutionStepContext.prototype, 'stepContext', { - get: function() { - if (!this._stepContext) { - this._stepContext = new ExecutionStepContextList( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.sid - ); + get: function() { + if (!this._stepContext) { + this._stepContext = new ExecutionStepContextList( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.sid + ); + } + return this._stepContext; } - return this._stepContext; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js b/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js index c566b2d5c3..aa9aa23eda 100644 --- a/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js +++ b/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.js @@ -217,18 +217,18 @@ ExecutionStepContextInstance = function ExecutionStepContextInstance(version, Object.defineProperty(ExecutionStepContextInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ExecutionStepContextContext( - this._version, - this._solution.flowSid, - this._solution.executionSid, - this._solution.stepSid - ); + get: function() { + if (!this._context) { + this._context = new ExecutionStepContextContext( + this._version, + this._solution.flowSid, + this._solution.executionSid, + this._solution.stepSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/flowRevision.js b/lib/rest/studio/v2/flow/flowRevision.js index f2f1415a38..0c6ba74afb 100644 --- a/lib/rest/studio/v2/flow/flowRevision.js +++ b/lib/rest/studio/v2/flow/flowRevision.js @@ -464,13 +464,13 @@ FlowRevisionInstance = function FlowRevisionInstance(version, payload, sid, Object.defineProperty(FlowRevisionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FlowRevisionContext(this._version, this._solution.sid, this._solution.revision); - } + get: function() { + if (!this._context) { + this._context = new FlowRevisionContext(this._version, this._solution.sid, this._solution.revision); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/studio/v2/flow/testUser.js b/lib/rest/studio/v2/flow/testUser.js index fb5fd811ce..d450b1deec 100644 --- a/lib/rest/studio/v2/flow/testUser.js +++ b/lib/rest/studio/v2/flow/testUser.js @@ -190,13 +190,13 @@ FlowTestUserInstance = function FlowTestUserInstance(version, payload, sid) { Object.defineProperty(FlowTestUserInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new FlowTestUserContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new FlowTestUserContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/V1.js b/lib/rest/sync/V1.js index 9f253ed768..09f0ae0ed9 100644 --- a/lib/rest/sync/V1.js +++ b/lib/rest/sync/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V1; diff --git a/lib/rest/sync/v1/service.js b/lib/rest/sync/v1/service.js index f0fc68417f..ecd5324ac5 100644 --- a/lib/rest/sync/v1/service.js +++ b/lib/rest/sync/v1/service.js @@ -534,13 +534,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -850,42 +850,42 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'documents', { - get: function() { - if (!this._documents) { - this._documents = new DocumentList(this._version, this._solution.sid); + get: function() { + if (!this._documents) { + this._documents = new DocumentList(this._version, this._solution.sid); + } + return this._documents; } - return this._documents; - } }); Object.defineProperty(ServiceContext.prototype, 'syncLists', { - get: function() { - if (!this._syncLists) { - this._syncLists = new SyncListList(this._version, this._solution.sid); + get: function() { + if (!this._syncLists) { + this._syncLists = new SyncListList(this._version, this._solution.sid); + } + return this._syncLists; } - return this._syncLists; - } }); Object.defineProperty(ServiceContext.prototype, 'syncMaps', { - get: function() { - if (!this._syncMaps) { - this._syncMaps = new SyncMapList(this._version, this._solution.sid); + get: function() { + if (!this._syncMaps) { + this._syncMaps = new SyncMapList(this._version, this._solution.sid); + } + return this._syncMaps; } - return this._syncMaps; - } }); Object.defineProperty(ServiceContext.prototype, 'syncStreams', { - get: function() { - if (!this._syncStreams) { - this._syncStreams = new SyncStreamList(this._version, this._solution.sid); + get: function() { + if (!this._syncStreams) { + this._syncStreams = new SyncStreamList(this._version, this._solution.sid); + } + return this._syncStreams; } - return this._syncStreams; - } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/document.js b/lib/rest/sync/v1/service/document.js index 29062a3392..c16970658e 100644 --- a/lib/rest/sync/v1/service/document.js +++ b/lib/rest/sync/v1/service/document.js @@ -523,13 +523,13 @@ DocumentInstance = function DocumentInstance(version, payload, serviceSid, sid) Object.defineProperty(DocumentInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new DocumentContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -788,16 +788,16 @@ DocumentContext.prototype.update = function update(opts, callback) { Object.defineProperty(DocumentContext.prototype, 'documentPermissions', { - get: function() { - if (!this._documentPermissions) { - this._documentPermissions = new DocumentPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._documentPermissions) { + this._documentPermissions = new DocumentPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._documentPermissions; } - return this._documentPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/document/documentPermission.js b/lib/rest/sync/v1/service/document/documentPermission.js index 5973aebfeb..8935f0b448 100644 --- a/lib/rest/sync/v1/service/document/documentPermission.js +++ b/lib/rest/sync/v1/service/document/documentPermission.js @@ -476,18 +476,18 @@ DocumentPermissionInstance = function DocumentPermissionInstance(version, Object.defineProperty(DocumentPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new DocumentPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.documentSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new DocumentPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.documentSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncList.js b/lib/rest/sync/v1/service/syncList.js index ec4fad58df..0868f82a0f 100644 --- a/lib/rest/sync/v1/service/syncList.js +++ b/lib/rest/sync/v1/service/syncList.js @@ -519,13 +519,13 @@ SyncListInstance = function SyncListInstance(version, payload, serviceSid, sid) Object.defineProperty(SyncListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SyncListContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -784,30 +784,30 @@ SyncListContext.prototype.update = function update(opts, callback) { Object.defineProperty(SyncListContext.prototype, 'syncListItems', { - get: function() { - if (!this._syncListItems) { - this._syncListItems = new SyncListItemList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncListItems) { + this._syncListItems = new SyncListItemList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncListItems; } - return this._syncListItems; - } }); Object.defineProperty(SyncListContext.prototype, 'syncListPermissions', { - get: function() { - if (!this._syncListPermissions) { - this._syncListPermissions = new SyncListPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncListPermissions) { + this._syncListPermissions = new SyncListPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncListPermissions; } - return this._syncListPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncList/syncListItem.js b/lib/rest/sync/v1/service/syncList/syncListItem.js index 94fb423aca..11b781c050 100644 --- a/lib/rest/sync/v1/service/syncList/syncListItem.js +++ b/lib/rest/sync/v1/service/syncList/syncListItem.js @@ -560,18 +560,18 @@ SyncListItemInstance = function SyncListItemInstance(version, payload, Object.defineProperty(SyncListItemInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListItemContext( - this._version, - this._solution.serviceSid, - this._solution.listSid, - this._solution.index - ); - } + get: function() { + if (!this._context) { + this._context = new SyncListItemContext( + this._version, + this._solution.serviceSid, + this._solution.listSid, + this._solution.index + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncList/syncListPermission.js b/lib/rest/sync/v1/service/syncList/syncListPermission.js index f5382b2563..fe03110202 100644 --- a/lib/rest/sync/v1/service/syncList/syncListPermission.js +++ b/lib/rest/sync/v1/service/syncList/syncListPermission.js @@ -473,18 +473,18 @@ SyncListPermissionInstance = function SyncListPermissionInstance(version, Object.defineProperty(SyncListPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncListPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.listSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new SyncListPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.listSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncMap.js b/lib/rest/sync/v1/service/syncMap.js index 68fb6faf8d..f52214c3f7 100644 --- a/lib/rest/sync/v1/service/syncMap.js +++ b/lib/rest/sync/v1/service/syncMap.js @@ -518,13 +518,13 @@ SyncMapInstance = function SyncMapInstance(version, payload, serviceSid, sid) { Object.defineProperty(SyncMapInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SyncMapContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -782,30 +782,30 @@ SyncMapContext.prototype.update = function update(opts, callback) { Object.defineProperty(SyncMapContext.prototype, 'syncMapItems', { - get: function() { - if (!this._syncMapItems) { - this._syncMapItems = new SyncMapItemList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncMapItems) { + this._syncMapItems = new SyncMapItemList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncMapItems; } - return this._syncMapItems; - } }); Object.defineProperty(SyncMapContext.prototype, 'syncMapPermissions', { - get: function() { - if (!this._syncMapPermissions) { - this._syncMapPermissions = new SyncMapPermissionList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._syncMapPermissions) { + this._syncMapPermissions = new SyncMapPermissionList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._syncMapPermissions; } - return this._syncMapPermissions; - } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncMap/syncMapItem.js b/lib/rest/sync/v1/service/syncMap/syncMapItem.js index 957fd3bc25..cd80c89d89 100644 --- a/lib/rest/sync/v1/service/syncMap/syncMapItem.js +++ b/lib/rest/sync/v1/service/syncMap/syncMapItem.js @@ -558,18 +558,18 @@ SyncMapItemInstance = function SyncMapItemInstance(version, payload, serviceSid, Object.defineProperty(SyncMapItemInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapItemContext( - this._version, - this._solution.serviceSid, - this._solution.mapSid, - this._solution.key - ); - } + get: function() { + if (!this._context) { + this._context = new SyncMapItemContext( + this._version, + this._solution.serviceSid, + this._solution.mapSid, + this._solution.key + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncMap/syncMapPermission.js b/lib/rest/sync/v1/service/syncMap/syncMapPermission.js index d3d5630d6a..0b9022c4b3 100644 --- a/lib/rest/sync/v1/service/syncMap/syncMapPermission.js +++ b/lib/rest/sync/v1/service/syncMap/syncMapPermission.js @@ -470,18 +470,18 @@ SyncMapPermissionInstance = function SyncMapPermissionInstance(version, payload, Object.defineProperty(SyncMapPermissionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncMapPermissionContext( - this._version, - this._solution.serviceSid, - this._solution.mapSid, - this._solution.identity - ); - } + get: function() { + if (!this._context) { + this._context = new SyncMapPermissionContext( + this._version, + this._solution.serviceSid, + this._solution.mapSid, + this._solution.identity + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/sync/v1/service/syncStream.js b/lib/rest/sync/v1/service/syncStream.js index cab2ab8943..46ae0924e9 100644 --- a/lib/rest/sync/v1/service/syncStream.js +++ b/lib/rest/sync/v1/service/syncStream.js @@ -510,13 +510,13 @@ SyncStreamInstance = function SyncStreamInstance(version, payload, serviceSid, Object.defineProperty(SyncStreamInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SyncStreamContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SyncStreamContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -755,16 +755,16 @@ SyncStreamContext.prototype.update = function update(opts, callback) { Object.defineProperty(SyncStreamContext.prototype, 'streamMessages', { - get: function() { - if (!this._streamMessages) { - this._streamMessages = new StreamMessageList( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._streamMessages) { + this._streamMessages = new StreamMessageList( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + return this._streamMessages; } - return this._streamMessages; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/V1.js b/lib/rest/taskrouter/V1.js index c4cc286242..f9b06a96d9 100644 --- a/lib/rest/taskrouter/V1.js +++ b/lib/rest/taskrouter/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'workspaces', { - get: function() { - this._workspaces = this._workspaces || new WorkspaceList(this); - return this._workspaces; - } + get: function() { + this._workspaces = this._workspaces || new WorkspaceList(this); + return this._workspaces; + } }); module.exports = V1; diff --git a/lib/rest/taskrouter/v1/workspace.js b/lib/rest/taskrouter/v1/workspace.js index 9cf7c8ab2f..dc9eabc376 100644 --- a/lib/rest/taskrouter/v1/workspace.js +++ b/lib/rest/taskrouter/v1/workspace.js @@ -536,13 +536,13 @@ WorkspaceInstance = function WorkspaceInstance(version, payload, sid) { Object.defineProperty(WorkspaceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkspaceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new WorkspaceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -950,105 +950,105 @@ WorkspaceContext.prototype.remove = function remove(callback) { Object.defineProperty(WorkspaceContext.prototype, 'activities', { - get: function() { - if (!this._activities) { - this._activities = new ActivityList(this._version, this._solution.sid); + get: function() { + if (!this._activities) { + this._activities = new ActivityList(this._version, this._solution.sid); + } + return this._activities; } - return this._activities; - } }); Object.defineProperty(WorkspaceContext.prototype, 'events', { - get: function() { - if (!this._events) { - this._events = new EventList(this._version, this._solution.sid); + get: function() { + if (!this._events) { + this._events = new EventList(this._version, this._solution.sid); + } + return this._events; } - return this._events; - } }); Object.defineProperty(WorkspaceContext.prototype, 'tasks', { - get: function() { - if (!this._tasks) { - this._tasks = new TaskList(this._version, this._solution.sid); + get: function() { + if (!this._tasks) { + this._tasks = new TaskList(this._version, this._solution.sid); + } + return this._tasks; } - return this._tasks; - } }); Object.defineProperty(WorkspaceContext.prototype, 'taskQueues', { - get: function() { - if (!this._taskQueues) { - this._taskQueues = new TaskQueueList(this._version, this._solution.sid); + get: function() { + if (!this._taskQueues) { + this._taskQueues = new TaskQueueList(this._version, this._solution.sid); + } + return this._taskQueues; } - return this._taskQueues; - } }); Object.defineProperty(WorkspaceContext.prototype, 'workers', { - get: function() { - if (!this._workers) { - this._workers = new WorkerList(this._version, this._solution.sid); + get: function() { + if (!this._workers) { + this._workers = new WorkerList(this._version, this._solution.sid); + } + return this._workers; } - return this._workers; - } }); Object.defineProperty(WorkspaceContext.prototype, 'workflows', { - get: function() { - if (!this._workflows) { - this._workflows = new WorkflowList(this._version, this._solution.sid); + get: function() { + if (!this._workflows) { + this._workflows = new WorkflowList(this._version, this._solution.sid); + } + return this._workflows; } - return this._workflows; - } }); Object.defineProperty(WorkspaceContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new WorkspaceStatisticsList(this._version, this._solution.sid); + get: function() { + if (!this._statistics) { + this._statistics = new WorkspaceStatisticsList(this._version, this._solution.sid); + } + return this._statistics; } - return this._statistics; - } }); Object.defineProperty(WorkspaceContext.prototype, 'realTimeStatistics', { - get: function() { - if (!this._realTimeStatistics) { - this._realTimeStatistics = new WorkspaceRealTimeStatisticsList(this._version, this._solution.sid); + get: function() { + if (!this._realTimeStatistics) { + this._realTimeStatistics = new WorkspaceRealTimeStatisticsList(this._version, this._solution.sid); + } + return this._realTimeStatistics; } - return this._realTimeStatistics; - } }); Object.defineProperty(WorkspaceContext.prototype, 'cumulativeStatistics', { - get: function() { - if (!this._cumulativeStatistics) { - this._cumulativeStatistics = new WorkspaceCumulativeStatisticsList( - this._version, - this._solution.sid - ); + get: function() { + if (!this._cumulativeStatistics) { + this._cumulativeStatistics = new WorkspaceCumulativeStatisticsList( + this._version, + this._solution.sid + ); + } + return this._cumulativeStatistics; } - return this._cumulativeStatistics; - } }); Object.defineProperty(WorkspaceContext.prototype, 'taskChannels', { - get: function() { - if (!this._taskChannels) { - this._taskChannels = new TaskChannelList(this._version, this._solution.sid); + get: function() { + if (!this._taskChannels) { + this._taskChannels = new TaskChannelList(this._version, this._solution.sid); + } + return this._taskChannels; } - return this._taskChannels; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/activity.js b/lib/rest/taskrouter/v1/workspace/activity.js index 706b3b7482..057f24f12c 100644 --- a/lib/rest/taskrouter/v1/workspace/activity.js +++ b/lib/rest/taskrouter/v1/workspace/activity.js @@ -512,13 +512,13 @@ ActivityInstance = function ActivityInstance(version, payload, workspaceSid, Object.defineProperty(ActivityInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ActivityContext(this._version, this._solution.workspaceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ActivityContext(this._version, this._solution.workspaceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/event.js b/lib/rest/taskrouter/v1/workspace/event.js index b0c048be33..13e3374b68 100644 --- a/lib/rest/taskrouter/v1/workspace/event.js +++ b/lib/rest/taskrouter/v1/workspace/event.js @@ -518,13 +518,13 @@ EventInstance = function EventInstance(version, payload, workspaceSid, sid) { Object.defineProperty(EventInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new EventContext(this._version, this._solution.workspaceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new EventContext(this._version, this._solution.workspaceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/task.js b/lib/rest/taskrouter/v1/workspace/task.js index 25d814efb6..9b3c5ff155 100644 --- a/lib/rest/taskrouter/v1/workspace/task.js +++ b/lib/rest/taskrouter/v1/workspace/task.js @@ -592,13 +592,13 @@ TaskInstance = function TaskInstance(version, payload, workspaceSid, sid) { Object.defineProperty(TaskInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskContext(this._version, this._solution.workspaceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new TaskContext(this._version, this._solution.workspaceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -850,16 +850,16 @@ TaskContext.prototype.remove = function remove(callback) { Object.defineProperty(TaskContext.prototype, 'reservations', { - get: function() { - if (!this._reservations) { - this._reservations = new ReservationList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._reservations) { + this._reservations = new ReservationList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._reservations; } - return this._reservations; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/task/reservation.js b/lib/rest/taskrouter/v1/workspace/task/reservation.js index 6f94d09942..6632ca52c9 100644 --- a/lib/rest/taskrouter/v1/workspace/task/reservation.js +++ b/lib/rest/taskrouter/v1/workspace/task/reservation.js @@ -475,18 +475,18 @@ ReservationInstance = function ReservationInstance(version, payload, Object.defineProperty(ReservationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ReservationContext( - this._version, - this._solution.workspaceSid, - this._solution.taskSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ReservationContext( + this._version, + this._solution.workspaceSid, + this._solution.taskSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/taskChannel.js b/lib/rest/taskrouter/v1/workspace/taskChannel.js index 1dd64b7d00..fb0a3fe7fe 100644 --- a/lib/rest/taskrouter/v1/workspace/taskChannel.js +++ b/lib/rest/taskrouter/v1/workspace/taskChannel.js @@ -513,17 +513,17 @@ TaskChannelInstance = function TaskChannelInstance(version, payload, Object.defineProperty(TaskChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskChannelContext( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new TaskChannelContext( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue.js b/lib/rest/taskrouter/v1/workspace/taskQueue.js index 63fb1f0694..ac8258d727 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue.js +++ b/lib/rest/taskrouter/v1/workspace/taskQueue.js @@ -411,13 +411,13 @@ TaskQueueList = function TaskQueueList(version, workspaceSid) { Object.defineProperty(TaskQueueListInstance, 'statistics', { - get: function statistics() { - if (!this._statistics) { - this._statistics = new TaskQueuesStatisticsList(this._version, this._solution.workspaceSid); - } + get: function statistics() { + if (!this._statistics) { + this._statistics = new TaskQueuesStatisticsList(this._version, this._solution.workspaceSid); + } - return this._statistics; - } + return this._statistics; + } }); /* jshint ignore:start */ @@ -573,17 +573,17 @@ TaskQueueInstance = function TaskQueueInstance(version, payload, workspaceSid, Object.defineProperty(TaskQueueInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskQueueContext( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new TaskQueueContext( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -878,44 +878,44 @@ TaskQueueContext.prototype.remove = function remove(callback) { Object.defineProperty(TaskQueueContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new TaskQueueStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._statistics) { + this._statistics = new TaskQueueStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._statistics; } - return this._statistics; - } }); Object.defineProperty(TaskQueueContext.prototype, 'realTimeStatistics', { - get: function() { - if (!this._realTimeStatistics) { - this._realTimeStatistics = new TaskQueueRealTimeStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._realTimeStatistics) { + this._realTimeStatistics = new TaskQueueRealTimeStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._realTimeStatistics; } - return this._realTimeStatistics; - } }); Object.defineProperty(TaskQueueContext.prototype, 'cumulativeStatistics', { - get: function() { - if (!this._cumulativeStatistics) { - this._cumulativeStatistics = new TaskQueueCumulativeStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._cumulativeStatistics) { + this._cumulativeStatistics = new TaskQueueCumulativeStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._cumulativeStatistics; } - return this._cumulativeStatistics; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js index 3837a11ce0..f4cb1750ed 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.js @@ -265,17 +265,17 @@ TaskQueueCumulativeStatisticsInstance = function Object.defineProperty(TaskQueueCumulativeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskQueueCumulativeStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.taskQueueSid - ); + get: function() { + if (!this._context) { + this._context = new TaskQueueCumulativeStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.taskQueueSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js index 6f1dd96a37..33cb21f051 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.js @@ -234,17 +234,17 @@ TaskQueueRealTimeStatisticsInstance = function Object.defineProperty(TaskQueueRealTimeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskQueueRealTimeStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.taskQueueSid - ); + get: function() { + if (!this._context) { + this._context = new TaskQueueRealTimeStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.taskQueueSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js index 2123ae11a4..8d41751ba9 100644 --- a/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.js @@ -213,17 +213,17 @@ TaskQueueStatisticsInstance = function TaskQueueStatisticsInstance(version, Object.defineProperty(TaskQueueStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TaskQueueStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.taskQueueSid - ); + get: function() { + if (!this._context) { + this._context = new TaskQueueStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.taskQueueSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker.js b/lib/rest/taskrouter/v1/workspace/worker.js index d6af964e06..6f088c6a18 100644 --- a/lib/rest/taskrouter/v1/workspace/worker.js +++ b/lib/rest/taskrouter/v1/workspace/worker.js @@ -432,13 +432,13 @@ WorkerList = function WorkerList(version, workspaceSid) { Object.defineProperty(WorkerListInstance, 'statistics', { - get: function statistics() { - if (!this._statistics) { - this._statistics = new WorkersStatisticsList(this._version, this._solution.workspaceSid); - } + get: function statistics() { + if (!this._statistics) { + this._statistics = new WorkersStatisticsList(this._version, this._solution.workspaceSid); + } - return this._statistics; - } + return this._statistics; + } }); /* jshint ignore:start */ @@ -584,13 +584,13 @@ WorkerInstance = function WorkerInstance(version, payload, workspaceSid, sid) { Object.defineProperty(WorkerInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkerContext(this._version, this._solution.workspaceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new WorkerContext(this._version, this._solution.workspaceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -907,70 +907,70 @@ WorkerContext.prototype.remove = function remove(callback) { Object.defineProperty(WorkerContext.prototype, 'realTimeStatistics', { - get: function() { - if (!this._realTimeStatistics) { - this._realTimeStatistics = new WorkersRealTimeStatisticsList( - this._version, - this._solution.workspaceSid - ); + get: function() { + if (!this._realTimeStatistics) { + this._realTimeStatistics = new WorkersRealTimeStatisticsList( + this._version, + this._solution.workspaceSid + ); + } + return this._realTimeStatistics; } - return this._realTimeStatistics; - } }); Object.defineProperty(WorkerContext.prototype, 'cumulativeStatistics', { - get: function() { - if (!this._cumulativeStatistics) { - this._cumulativeStatistics = new WorkersCumulativeStatisticsList( - this._version, - this._solution.workspaceSid - ); + get: function() { + if (!this._cumulativeStatistics) { + this._cumulativeStatistics = new WorkersCumulativeStatisticsList( + this._version, + this._solution.workspaceSid + ); + } + return this._cumulativeStatistics; } - return this._cumulativeStatistics; - } }); Object.defineProperty(WorkerContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new WorkerStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._statistics) { + this._statistics = new WorkerStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._statistics; } - return this._statistics; - } }); Object.defineProperty(WorkerContext.prototype, 'reservations', { - get: function() { - if (!this._reservations) { - this._reservations = new ReservationList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._reservations) { + this._reservations = new ReservationList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._reservations; } - return this._reservations; - } }); Object.defineProperty(WorkerContext.prototype, 'workerChannels', { - get: function() { - if (!this._workerChannels) { - this._workerChannels = new WorkerChannelList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._workerChannels) { + this._workerChannels = new WorkerChannelList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._workerChannels; } - return this._workerChannels; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/reservation.js b/lib/rest/taskrouter/v1/workspace/worker/reservation.js index 95c8b9f709..58d4796c44 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/reservation.js +++ b/lib/rest/taskrouter/v1/workspace/worker/reservation.js @@ -475,18 +475,18 @@ ReservationInstance = function ReservationInstance(version, payload, Object.defineProperty(ReservationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ReservationContext( - this._version, - this._solution.workspaceSid, - this._solution.workerSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new ReservationContext( + this._version, + this._solution.workspaceSid, + this._solution.workerSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js index e455b763af..87143547dc 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js @@ -479,18 +479,18 @@ WorkerChannelInstance = function WorkerChannelInstance(version, payload, Object.defineProperty(WorkerChannelInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkerChannelContext( - this._version, - this._solution.workspaceSid, - this._solution.workerSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new WorkerChannelContext( + this._version, + this._solution.workspaceSid, + this._solution.workerSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js b/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js index 6eae5bb28a..32c14528e3 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.js @@ -207,17 +207,17 @@ WorkerStatisticsInstance = function WorkerStatisticsInstance(version, payload, Object.defineProperty(WorkerStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkerStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.workerSid - ); + get: function() { + if (!this._context) { + this._context = new WorkerStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.workerSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js b/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js index f83ad22ff2..ba4d8a3433 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.js @@ -218,13 +218,13 @@ WorkersCumulativeStatisticsInstance = function Object.defineProperty(WorkersCumulativeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkersCumulativeStatisticsContext(this._version, this._solution.workspaceSid); - } + get: function() { + if (!this._context) { + this._context = new WorkersCumulativeStatisticsContext(this._version, this._solution.workspaceSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js b/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js index 6b6eee6dfc..3229f957cd 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.js @@ -194,13 +194,13 @@ WorkersRealTimeStatisticsInstance = function Object.defineProperty(WorkersRealTimeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkersRealTimeStatisticsContext(this._version, this._solution.workspaceSid); - } + get: function() { + if (!this._context) { + this._context = new WorkersRealTimeStatisticsContext(this._version, this._solution.workspaceSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js b/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js index 3208d45235..52f8e4de5b 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.js @@ -191,13 +191,13 @@ WorkersStatisticsInstance = function WorkersStatisticsInstance(version, payload, Object.defineProperty(WorkersStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkersStatisticsContext(this._version, this._solution.workspaceSid); - } + get: function() { + if (!this._context) { + this._context = new WorkersStatisticsContext(this._version, this._solution.workspaceSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workflow.js b/lib/rest/taskrouter/v1/workspace/workflow.js index dbd1e89219..04f3bc2ccb 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow.js +++ b/lib/rest/taskrouter/v1/workspace/workflow.js @@ -536,13 +536,13 @@ WorkflowInstance = function WorkflowInstance(version, payload, workspaceSid, Object.defineProperty(WorkflowInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkflowContext(this._version, this._solution.workspaceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new WorkflowContext(this._version, this._solution.workspaceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -837,44 +837,44 @@ WorkflowContext.prototype.remove = function remove(callback) { Object.defineProperty(WorkflowContext.prototype, 'statistics', { - get: function() { - if (!this._statistics) { - this._statistics = new WorkflowStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._statistics) { + this._statistics = new WorkflowStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._statistics; } - return this._statistics; - } }); Object.defineProperty(WorkflowContext.prototype, 'realTimeStatistics', { - get: function() { - if (!this._realTimeStatistics) { - this._realTimeStatistics = new WorkflowRealTimeStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._realTimeStatistics) { + this._realTimeStatistics = new WorkflowRealTimeStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._realTimeStatistics; } - return this._realTimeStatistics; - } }); Object.defineProperty(WorkflowContext.prototype, 'cumulativeStatistics', { - get: function() { - if (!this._cumulativeStatistics) { - this._cumulativeStatistics = new WorkflowCumulativeStatisticsList( - this._version, - this._solution.workspaceSid, - this._solution.sid - ); + get: function() { + if (!this._cumulativeStatistics) { + this._cumulativeStatistics = new WorkflowCumulativeStatisticsList( + this._version, + this._solution.workspaceSid, + this._solution.sid + ); + } + return this._cumulativeStatistics; } - return this._cumulativeStatistics; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js b/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js index 9e4cb31cab..e3448f4af5 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.js @@ -263,17 +263,17 @@ WorkflowCumulativeStatisticsInstance = function Object.defineProperty(WorkflowCumulativeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkflowCumulativeStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.workflowSid - ); + get: function() { + if (!this._context) { + this._context = new WorkflowCumulativeStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.workflowSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js b/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js index 8cbf742d8f..d1e13236c3 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.js @@ -219,17 +219,17 @@ WorkflowRealTimeStatisticsInstance = function Object.defineProperty(WorkflowRealTimeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkflowRealTimeStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.workflowSid - ); + get: function() { + if (!this._context) { + this._context = new WorkflowRealTimeStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.workflowSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js b/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js index 0a964825c3..edf595962d 100644 --- a/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.js @@ -209,17 +209,17 @@ WorkflowStatisticsInstance = function WorkflowStatisticsInstance(version, Object.defineProperty(WorkflowStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkflowStatisticsContext( - this._version, - this._solution.workspaceSid, - this._solution.workflowSid - ); + get: function() { + if (!this._context) { + this._context = new WorkflowStatisticsContext( + this._version, + this._solution.workspaceSid, + this._solution.workflowSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js b/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js index 685ed86682..e39b330568 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.js @@ -243,16 +243,16 @@ WorkspaceCumulativeStatisticsInstance = function Object.defineProperty(WorkspaceCumulativeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkspaceCumulativeStatisticsContext( - this._version, - this._solution.workspaceSid - ); + get: function() { + if (!this._context) { + this._context = new WorkspaceCumulativeStatisticsContext( + this._version, + this._solution.workspaceSid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js b/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js index f5fb90563e..ba7b28f259 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.js @@ -202,13 +202,13 @@ WorkspaceRealTimeStatisticsInstance = function Object.defineProperty(WorkspaceRealTimeStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkspaceRealTimeStatisticsContext(this._version, this._solution.workspaceSid); - } + get: function() { + if (!this._context) { + this._context = new WorkspaceRealTimeStatisticsContext(this._version, this._solution.workspaceSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js b/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js index 1eb739b11e..07e35dd1e9 100644 --- a/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js +++ b/lib/rest/taskrouter/v1/workspace/workspaceStatistics.js @@ -190,13 +190,13 @@ WorkspaceStatisticsInstance = function WorkspaceStatisticsInstance(version, Object.defineProperty(WorkspaceStatisticsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new WorkspaceStatisticsContext(this._version, this._solution.workspaceSid); - } + get: function() { + if (!this._context) { + this._context = new WorkspaceStatisticsContext(this._version, this._solution.workspaceSid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/V1.js b/lib/rest/trunking/V1.js index ecf690bd55..183542f754 100644 --- a/lib/rest/trunking/V1.js +++ b/lib/rest/trunking/V1.js @@ -37,10 +37,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'trunks', { - get: function() { - this._trunks = this._trunks || new TrunkList(this); - return this._trunks; - } + get: function() { + this._trunks = this._trunks || new TrunkList(this); + return this._trunks; + } }); module.exports = V1; diff --git a/lib/rest/trunking/v1/trunk.js b/lib/rest/trunking/v1/trunk.js index 0ddc845d0c..f45623587b 100644 --- a/lib/rest/trunking/v1/trunk.js +++ b/lib/rest/trunking/v1/trunk.js @@ -526,13 +526,13 @@ TrunkInstance = function TrunkInstance(version, payload, sid) { Object.defineProperty(TrunkInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TrunkContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new TrunkContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -855,52 +855,52 @@ TrunkContext.prototype.update = function update(opts, callback) { Object.defineProperty(TrunkContext.prototype, 'originationUrls', { - get: function() { - if (!this._originationUrls) { - this._originationUrls = new OriginationUrlList(this._version, this._solution.sid); + get: function() { + if (!this._originationUrls) { + this._originationUrls = new OriginationUrlList(this._version, this._solution.sid); + } + return this._originationUrls; } - return this._originationUrls; - } }); Object.defineProperty(TrunkContext.prototype, 'credentialsLists', { - get: function() { - if (!this._credentialsLists) { - this._credentialsLists = new CredentialListList(this._version, this._solution.sid); + get: function() { + if (!this._credentialsLists) { + this._credentialsLists = new CredentialListList(this._version, this._solution.sid); + } + return this._credentialsLists; } - return this._credentialsLists; - } }); Object.defineProperty(TrunkContext.prototype, 'ipAccessControlLists', { - get: function() { - if (!this._ipAccessControlLists) { - this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.sid); + get: function() { + if (!this._ipAccessControlLists) { + this._ipAccessControlLists = new IpAccessControlListList(this._version, this._solution.sid); + } + return this._ipAccessControlLists; } - return this._ipAccessControlLists; - } }); Object.defineProperty(TrunkContext.prototype, 'phoneNumbers', { - get: function() { - if (!this._phoneNumbers) { - this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + get: function() { + if (!this._phoneNumbers) { + this._phoneNumbers = new PhoneNumberList(this._version, this._solution.sid); + } + return this._phoneNumbers; } - return this._phoneNumbers; - } }); Object.defineProperty(TrunkContext.prototype, 'terminatingSipDomains', { - get: function() { - if (!this._terminatingSipDomains) { - this._terminatingSipDomains = new TerminatingSipDomainList(this._version, this._solution.sid); + get: function() { + if (!this._terminatingSipDomains) { + this._terminatingSipDomains = new TerminatingSipDomainList(this._version, this._solution.sid); + } + return this._terminatingSipDomains; } - return this._terminatingSipDomains; - } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/v1/trunk/credentialList.js b/lib/rest/trunking/v1/trunk/credentialList.js index 471ac7323e..bb2a8016fa 100644 --- a/lib/rest/trunking/v1/trunk/credentialList.js +++ b/lib/rest/trunking/v1/trunk/credentialList.js @@ -493,17 +493,17 @@ CredentialListInstance = function CredentialListInstance(version, payload, Object.defineProperty(CredentialListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CredentialListContext( - this._version, - this._solution.trunkSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new CredentialListContext( + this._version, + this._solution.trunkSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/v1/trunk/ipAccessControlList.js b/lib/rest/trunking/v1/trunk/ipAccessControlList.js index 85e3330d29..68e9407940 100644 --- a/lib/rest/trunking/v1/trunk/ipAccessControlList.js +++ b/lib/rest/trunking/v1/trunk/ipAccessControlList.js @@ -494,17 +494,17 @@ IpAccessControlListInstance = function IpAccessControlListInstance(version, Object.defineProperty(IpAccessControlListInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new IpAccessControlListContext( - this._version, - this._solution.trunkSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new IpAccessControlListContext( + this._version, + this._solution.trunkSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/v1/trunk/originationUrl.js b/lib/rest/trunking/v1/trunk/originationUrl.js index 4723bc4891..cd0bb363a7 100644 --- a/lib/rest/trunking/v1/trunk/originationUrl.js +++ b/lib/rest/trunking/v1/trunk/originationUrl.js @@ -524,17 +524,17 @@ OriginationUrlInstance = function OriginationUrlInstance(version, payload, Object.defineProperty(OriginationUrlInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new OriginationUrlContext( - this._version, - this._solution.trunkSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new OriginationUrlContext( + this._version, + this._solution.trunkSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/v1/trunk/phoneNumber.js b/lib/rest/trunking/v1/trunk/phoneNumber.js index d8d104885d..ead38ee0ea 100644 --- a/lib/rest/trunking/v1/trunk/phoneNumber.js +++ b/lib/rest/trunking/v1/trunk/phoneNumber.js @@ -545,13 +545,13 @@ PhoneNumberInstance = function PhoneNumberInstance(version, payload, trunkSid, Object.defineProperty(PhoneNumberInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PhoneNumberContext(this._version, this._solution.trunkSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new PhoneNumberContext(this._version, this._solution.trunkSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/trunking/v1/trunk/terminatingSipDomain.js b/lib/rest/trunking/v1/trunk/terminatingSipDomain.js index 960d04a6a3..d442e88ffc 100644 --- a/lib/rest/trunking/v1/trunk/terminatingSipDomain.js +++ b/lib/rest/trunking/v1/trunk/terminatingSipDomain.js @@ -523,17 +523,17 @@ TerminatingSipDomainInstance = function TerminatingSipDomainInstance(version, Object.defineProperty(TerminatingSipDomainInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new TerminatingSipDomainContext( - this._version, - this._solution.trunkSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new TerminatingSipDomainContext( + this._version, + this._solution.trunkSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/verify/V2.js b/lib/rest/verify/V2.js index 28196086d8..93166963b6 100644 --- a/lib/rest/verify/V2.js +++ b/lib/rest/verify/V2.js @@ -37,10 +37,10 @@ V2.prototype.constructor = V2; Object.defineProperty(V2.prototype, 'services', { - get: function() { - this._services = this._services || new ServiceList(this); - return this._services; - } + get: function() { + this._services = this._services || new ServiceList(this); + return this._services; + } }); module.exports = V2; diff --git a/lib/rest/verify/v2/service.js b/lib/rest/verify/v2/service.js index df8687aeaf..39414c23ae 100644 --- a/lib/rest/verify/v2/service.js +++ b/lib/rest/verify/v2/service.js @@ -530,13 +530,13 @@ ServiceInstance = function ServiceInstance(version, payload, sid) { Object.defineProperty(ServiceInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ServiceContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ServiceContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -849,42 +849,42 @@ ServiceContext.prototype.update = function update(opts, callback) { Object.defineProperty(ServiceContext.prototype, 'verifications', { - get: function() { - if (!this._verifications) { - this._verifications = new VerificationList(this._version, this._solution.sid); + get: function() { + if (!this._verifications) { + this._verifications = new VerificationList(this._version, this._solution.sid); + } + return this._verifications; } - return this._verifications; - } }); Object.defineProperty(ServiceContext.prototype, 'verificationChecks', { - get: function() { - if (!this._verificationChecks) { - this._verificationChecks = new VerificationCheckList(this._version, this._solution.sid); + get: function() { + if (!this._verificationChecks) { + this._verificationChecks = new VerificationCheckList(this._version, this._solution.sid); + } + return this._verificationChecks; } - return this._verificationChecks; - } }); Object.defineProperty(ServiceContext.prototype, 'rateLimits', { - get: function() { - if (!this._rateLimits) { - this._rateLimits = new RateLimitList(this._version, this._solution.sid); + get: function() { + if (!this._rateLimits) { + this._rateLimits = new RateLimitList(this._version, this._solution.sid); + } + return this._rateLimits; } - return this._rateLimits; - } }); Object.defineProperty(ServiceContext.prototype, 'messagingConfigurations', { - get: function() { - if (!this._messagingConfigurations) { - this._messagingConfigurations = new MessagingConfigurationList(this._version, this._solution.sid); + get: function() { + if (!this._messagingConfigurations) { + this._messagingConfigurations = new MessagingConfigurationList(this._version, this._solution.sid); + } + return this._messagingConfigurations; } - return this._messagingConfigurations; - } }); /* jshint ignore:start */ diff --git a/lib/rest/verify/v2/service/messagingConfiguration.js b/lib/rest/verify/v2/service/messagingConfiguration.js index 91516e68de..ce7db8a56c 100644 --- a/lib/rest/verify/v2/service/messagingConfiguration.js +++ b/lib/rest/verify/v2/service/messagingConfiguration.js @@ -507,17 +507,17 @@ MessagingConfigurationInstance = function Object.defineProperty(MessagingConfigurationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new MessagingConfigurationContext( - this._version, - this._solution.serviceSid, - this._solution.country - ); - } + get: function() { + if (!this._context) { + this._context = new MessagingConfigurationContext( + this._version, + this._solution.serviceSid, + this._solution.country + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/verify/v2/service/rateLimit.js b/lib/rest/verify/v2/service/rateLimit.js index e60f56bf4a..61754da545 100644 --- a/lib/rest/verify/v2/service/rateLimit.js +++ b/lib/rest/verify/v2/service/rateLimit.js @@ -501,13 +501,13 @@ RateLimitInstance = function RateLimitInstance(version, payload, serviceSid, Object.defineProperty(RateLimitInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RateLimitContext(this._version, this._solution.serviceSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RateLimitContext(this._version, this._solution.serviceSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -741,12 +741,12 @@ RateLimitContext.prototype.remove = function remove(callback) { Object.defineProperty(RateLimitContext.prototype, 'buckets', { - get: function() { - if (!this._buckets) { - this._buckets = new BucketList(this._version, this._solution.serviceSid, this._solution.sid); + get: function() { + if (!this._buckets) { + this._buckets = new BucketList(this._version, this._solution.serviceSid, this._solution.sid); + } + return this._buckets; } - return this._buckets; - } }); /* jshint ignore:start */ diff --git a/lib/rest/verify/v2/service/rateLimit/bucket.js b/lib/rest/verify/v2/service/rateLimit/bucket.js index 22f3885a1e..8429bc9442 100644 --- a/lib/rest/verify/v2/service/rateLimit/bucket.js +++ b/lib/rest/verify/v2/service/rateLimit/bucket.js @@ -512,18 +512,18 @@ BucketInstance = function BucketInstance(version, payload, serviceSid, Object.defineProperty(BucketInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new BucketContext( - this._version, - this._solution.serviceSid, - this._solution.rateLimitSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new BucketContext( + this._version, + this._solution.serviceSid, + this._solution.rateLimitSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/verify/v2/service/verification.js b/lib/rest/verify/v2/service/verification.js index 984a61ba13..d7806e1ad5 100644 --- a/lib/rest/verify/v2/service/verification.js +++ b/lib/rest/verify/v2/service/verification.js @@ -297,17 +297,17 @@ VerificationInstance = function VerificationInstance(version, payload, Object.defineProperty(VerificationInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new VerificationContext( - this._version, - this._solution.serviceSid, - this._solution.sid - ); + get: function() { + if (!this._context) { + this._context = new VerificationContext( + this._version, + this._solution.serviceSid, + this._solution.sid + ); + } + + return this._context; } - - return this._context; - } }); /* jshint ignore:start */ diff --git a/lib/rest/video/V1.js b/lib/rest/video/V1.js index 943fbc784f..a47160996c 100644 --- a/lib/rest/video/V1.js +++ b/lib/rest/video/V1.js @@ -57,50 +57,50 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'compositions', { - get: function() { - this._compositions = this._compositions || new CompositionList(this); - return this._compositions; - } + get: function() { + this._compositions = this._compositions || new CompositionList(this); + return this._compositions; + } }); Object.defineProperty(V1.prototype, 'compositionHooks', { - get: function() { - this._compositionHooks = this._compositionHooks || new CompositionHookList(this); - return this._compositionHooks; - } + get: function() { + this._compositionHooks = this._compositionHooks || new CompositionHookList(this); + return this._compositionHooks; + } }); Object.defineProperty(V1.prototype, 'compositionSettings', { - get: function() { - this._compositionSettings = this._compositionSettings || new CompositionSettingsList(this); - return this._compositionSettings; - } + get: function() { + this._compositionSettings = this._compositionSettings || new CompositionSettingsList(this); + return this._compositionSettings; + } }); Object.defineProperty(V1.prototype, 'recordings', { - get: function() { - this._recordings = this._recordings || new RecordingList(this); - return this._recordings; - } + get: function() { + this._recordings = this._recordings || new RecordingList(this); + return this._recordings; + } }); Object.defineProperty(V1.prototype, 'recordingSettings', { - get: function() { - this._recordingSettings = this._recordingSettings || new RecordingSettingsList(this); - return this._recordingSettings; - } + get: function() { + this._recordingSettings = this._recordingSettings || new RecordingSettingsList(this); + return this._recordingSettings; + } }); Object.defineProperty(V1.prototype, 'rooms', { - get: function() { - this._rooms = this._rooms || new RoomList(this); - return this._rooms; - } + get: function() { + this._rooms = this._rooms || new RoomList(this); + return this._rooms; + } }); module.exports = V1; diff --git a/lib/rest/video/v1/composition.js b/lib/rest/video/v1/composition.js index 47a993f015..89a8bdeb3a 100644 --- a/lib/rest/video/v1/composition.js +++ b/lib/rest/video/v1/composition.js @@ -578,13 +578,13 @@ CompositionInstance = function CompositionInstance(version, payload, sid) { Object.defineProperty(CompositionInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CompositionContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CompositionContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/compositionHook.js b/lib/rest/video/v1/compositionHook.js index 2fda792cce..08c9d06fbf 100644 --- a/lib/rest/video/v1/compositionHook.js +++ b/lib/rest/video/v1/compositionHook.js @@ -575,13 +575,13 @@ CompositionHookInstance = function CompositionHookInstance(version, payload, Object.defineProperty(CompositionHookInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CompositionHookContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CompositionHookContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/compositionSettings.js b/lib/rest/video/v1/compositionSettings.js index 4c24bdf71a..90f78706b1 100644 --- a/lib/rest/video/v1/compositionSettings.js +++ b/lib/rest/video/v1/compositionSettings.js @@ -208,13 +208,13 @@ CompositionSettingsInstance = function CompositionSettingsInstance(version, Object.defineProperty(CompositionSettingsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CompositionSettingsContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new CompositionSettingsContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/recording.js b/lib/rest/video/v1/recording.js index 9359c68ea5..5381b142a3 100644 --- a/lib/rest/video/v1/recording.js +++ b/lib/rest/video/v1/recording.js @@ -497,13 +497,13 @@ RecordingInstance = function RecordingInstance(version, payload, sid) { Object.defineProperty(RecordingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RecordingContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RecordingContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/recordingSettings.js b/lib/rest/video/v1/recordingSettings.js index 4c2a879832..7be2759a74 100644 --- a/lib/rest/video/v1/recordingSettings.js +++ b/lib/rest/video/v1/recordingSettings.js @@ -208,13 +208,13 @@ RecordingSettingsInstance = function RecordingSettingsInstance(version, payload) Object.defineProperty(RecordingSettingsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RecordingSettingsContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new RecordingSettingsContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/room.js b/lib/rest/video/v1/room.js index 744d77ef97..2023119901 100644 --- a/lib/rest/video/v1/room.js +++ b/lib/rest/video/v1/room.js @@ -556,13 +556,13 @@ RoomInstance = function RoomInstance(version, payload, sid) { Object.defineProperty(RoomInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoomContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoomContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -754,22 +754,22 @@ RoomContext.prototype.update = function update(opts, callback) { Object.defineProperty(RoomContext.prototype, 'recordings', { - get: function() { - if (!this._recordings) { - this._recordings = new RoomRecordingList(this._version, this._solution.sid); + get: function() { + if (!this._recordings) { + this._recordings = new RoomRecordingList(this._version, this._solution.sid); + } + return this._recordings; } - return this._recordings; - } }); Object.defineProperty(RoomContext.prototype, 'participants', { - get: function() { - if (!this._participants) { - this._participants = new ParticipantList(this._version, this._solution.sid); + get: function() { + if (!this._participants) { + this._participants = new ParticipantList(this._version, this._solution.sid); + } + return this._participants; } - return this._participants; - } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/room/recording.js b/lib/rest/video/v1/room/recording.js index 934f7851c1..36125a8580 100644 --- a/lib/rest/video/v1/room/recording.js +++ b/lib/rest/video/v1/room/recording.js @@ -493,13 +493,13 @@ RoomRecordingInstance = function RoomRecordingInstance(version, payload, Object.defineProperty(RoomRecordingInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RoomRecordingContext(this._version, this._solution.roomSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RoomRecordingContext(this._version, this._solution.roomSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/room/roomParticipant.js b/lib/rest/video/v1/room/roomParticipant.js index b12a8a7752..8304475ac1 100644 --- a/lib/rest/video/v1/room/roomParticipant.js +++ b/lib/rest/video/v1/room/roomParticipant.js @@ -489,13 +489,13 @@ ParticipantInstance = function ParticipantInstance(version, payload, roomSid, Object.defineProperty(ParticipantInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new ParticipantContext(this._version, this._solution.roomSid, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new ParticipantContext(this._version, this._solution.roomSid, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -716,44 +716,44 @@ ParticipantContext.prototype.update = function update(opts, callback) { Object.defineProperty(ParticipantContext.prototype, 'publishedTracks', { - get: function() { - if (!this._publishedTracks) { - this._publishedTracks = new PublishedTrackList( - this._version, - this._solution.roomSid, - this._solution.sid - ); + get: function() { + if (!this._publishedTracks) { + this._publishedTracks = new PublishedTrackList( + this._version, + this._solution.roomSid, + this._solution.sid + ); + } + return this._publishedTracks; } - return this._publishedTracks; - } }); Object.defineProperty(ParticipantContext.prototype, 'subscribedTracks', { - get: function() { - if (!this._subscribedTracks) { - this._subscribedTracks = new SubscribedTrackList( - this._version, - this._solution.roomSid, - this._solution.sid - ); + get: function() { + if (!this._subscribedTracks) { + this._subscribedTracks = new SubscribedTrackList( + this._version, + this._solution.roomSid, + this._solution.sid + ); + } + return this._subscribedTracks; } - return this._subscribedTracks; - } }); Object.defineProperty(ParticipantContext.prototype, 'subscribeRules', { - get: function() { - if (!this._subscribeRules) { - this._subscribeRules = new SubscribeRulesList( - this._version, - this._solution.roomSid, - this._solution.sid - ); + get: function() { + if (!this._subscribeRules) { + this._subscribeRules = new SubscribeRulesList( + this._version, + this._solution.roomSid, + this._solution.sid + ); + } + return this._subscribeRules; } - return this._subscribeRules; - } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js b/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js index dd7b380f2f..7d6fc33cb8 100644 --- a/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js +++ b/lib/rest/video/v1/room/roomParticipant/roomParticipantPublishedTrack.js @@ -464,18 +464,18 @@ PublishedTrackInstance = function PublishedTrackInstance(version, payload, Object.defineProperty(PublishedTrackInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new PublishedTrackContext( - this._version, - this._solution.roomSid, - this._solution.participantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new PublishedTrackContext( + this._version, + this._solution.roomSid, + this._solution.participantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js b/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js index 60e70507fd..4bb999c7cf 100644 --- a/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js +++ b/lib/rest/video/v1/room/roomParticipant/roomParticipantSubscribedTrack.js @@ -467,18 +467,18 @@ SubscribedTrackInstance = function SubscribedTrackInstance(version, payload, Object.defineProperty(SubscribedTrackInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SubscribedTrackContext( - this._version, - this._solution.roomSid, - this._solution.participantSid, - this._solution.sid - ); - } + get: function() { + if (!this._context) { + this._context = new SubscribedTrackContext( + this._version, + this._solution.roomSid, + this._solution.participantSid, + this._solution.sid + ); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/voice/V1.js b/lib/rest/voice/V1.js index 4836c9bbd4..995b000b8a 100644 --- a/lib/rest/voice/V1.js +++ b/lib/rest/voice/V1.js @@ -39,10 +39,10 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'dialingPermissions', { - get: function() { - this._dialingPermissions = this._dialingPermissions || new DialingPermissionsList(this); - return this._dialingPermissions; - } + get: function() { + this._dialingPermissions = this._dialingPermissions || new DialingPermissionsList(this); + return this._dialingPermissions; + } }); module.exports = V1; diff --git a/lib/rest/voice/v1/dialingPermissions.js b/lib/rest/voice/v1/dialingPermissions.js index a2765b51ab..77821382bc 100644 --- a/lib/rest/voice/v1/dialingPermissions.js +++ b/lib/rest/voice/v1/dialingPermissions.js @@ -57,35 +57,35 @@ DialingPermissionsList = function DialingPermissionsList(version) { Object.defineProperty(DialingPermissionsListInstance, 'countries', { - get: function countries() { - if (!this._countries) { - this._countries = new CountryList(this._version); - } + get: function countries() { + if (!this._countries) { + this._countries = new CountryList(this._version); + } - return this._countries; - } + return this._countries; + } }); Object.defineProperty(DialingPermissionsListInstance, 'settings', { - get: function settings() { - if (!this._settings) { - this._settings = new SettingsList(this._version); - } + get: function settings() { + if (!this._settings) { + this._settings = new SettingsList(this._version); + } - return this._settings; - } + return this._settings; + } }); Object.defineProperty(DialingPermissionsListInstance, 'bulkCountryUpdates', { - get: function bulkCountryUpdates() { - if (!this._bulkCountryUpdates) { - this._bulkCountryUpdates = new BulkCountryUpdateList(this._version); - } + get: function bulkCountryUpdates() { + if (!this._bulkCountryUpdates) { + this._bulkCountryUpdates = new BulkCountryUpdateList(this._version); + } - return this._bulkCountryUpdates; - } + return this._bulkCountryUpdates; + } }); /* jshint ignore:start */ diff --git a/lib/rest/voice/v1/dialingPermissions/country.js b/lib/rest/voice/v1/dialingPermissions/country.js index 9c734b9050..0c9bc25a8f 100644 --- a/lib/rest/voice/v1/dialingPermissions/country.js +++ b/lib/rest/voice/v1/dialingPermissions/country.js @@ -494,13 +494,13 @@ CountryInstance = function CountryInstance(version, payload, isoCode) { Object.defineProperty(CountryInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CountryContext(this._version, this._solution.isoCode); - } + get: function() { + if (!this._context) { + this._context = new CountryContext(this._version, this._solution.isoCode); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -621,15 +621,15 @@ CountryContext.prototype.fetch = function fetch(callback) { Object.defineProperty(CountryContext.prototype, 'highriskSpecialPrefixes', { - get: function() { - if (!this._highriskSpecialPrefixes) { - this._highriskSpecialPrefixes = new HighriskSpecialPrefixList( - this._version, - this._solution.isoCode - ); + get: function() { + if (!this._highriskSpecialPrefixes) { + this._highriskSpecialPrefixes = new HighriskSpecialPrefixList( + this._version, + this._solution.isoCode + ); + } + return this._highriskSpecialPrefixes; } - return this._highriskSpecialPrefixes; - } }); /* jshint ignore:start */ diff --git a/lib/rest/voice/v1/dialingPermissions/settings.js b/lib/rest/voice/v1/dialingPermissions/settings.js index 291564dd0a..5c213c6e16 100644 --- a/lib/rest/voice/v1/dialingPermissions/settings.js +++ b/lib/rest/voice/v1/dialingPermissions/settings.js @@ -188,13 +188,13 @@ SettingsInstance = function SettingsInstance(version, payload) { Object.defineProperty(SettingsInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SettingsContext(this._version); - } + get: function() { + if (!this._context) { + this._context = new SettingsContext(this._version); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/wireless/V1.js b/lib/rest/wireless/V1.js index 69573f9be9..a8a762168b 100644 --- a/lib/rest/wireless/V1.js +++ b/lib/rest/wireless/V1.js @@ -47,34 +47,34 @@ V1.prototype.constructor = V1; Object.defineProperty(V1.prototype, 'usageRecords', { - get: function() { - this._usageRecords = this._usageRecords || new UsageRecordList(this); - return this._usageRecords; - } + get: function() { + this._usageRecords = this._usageRecords || new UsageRecordList(this); + return this._usageRecords; + } }); Object.defineProperty(V1.prototype, 'commands', { - get: function() { - this._commands = this._commands || new CommandList(this); - return this._commands; - } + get: function() { + this._commands = this._commands || new CommandList(this); + return this._commands; + } }); Object.defineProperty(V1.prototype, 'ratePlans', { - get: function() { - this._ratePlans = this._ratePlans || new RatePlanList(this); - return this._ratePlans; - } + get: function() { + this._ratePlans = this._ratePlans || new RatePlanList(this); + return this._ratePlans; + } }); Object.defineProperty(V1.prototype, 'sims', { - get: function() { - this._sims = this._sims || new SimList(this); - return this._sims; - } + get: function() { + this._sims = this._sims || new SimList(this); + return this._sims; + } }); module.exports = V1; diff --git a/lib/rest/wireless/v1/command.js b/lib/rest/wireless/v1/command.js index ebdb8a8b43..cfd1dc2784 100644 --- a/lib/rest/wireless/v1/command.js +++ b/lib/rest/wireless/v1/command.js @@ -535,13 +535,13 @@ CommandInstance = function CommandInstance(version, payload, sid) { Object.defineProperty(CommandInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new CommandContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new CommandContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/wireless/v1/ratePlan.js b/lib/rest/wireless/v1/ratePlan.js index 7f4da9969d..d95ec84d4f 100644 --- a/lib/rest/wireless/v1/ratePlan.js +++ b/lib/rest/wireless/v1/ratePlan.js @@ -536,13 +536,13 @@ RatePlanInstance = function RatePlanInstance(version, payload, sid) { Object.defineProperty(RatePlanInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new RatePlanContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new RatePlanContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ diff --git a/lib/rest/wireless/v1/sim.js b/lib/rest/wireless/v1/sim.js index 02b453e3d1..614e7bfe83 100644 --- a/lib/rest/wireless/v1/sim.js +++ b/lib/rest/wireless/v1/sim.js @@ -511,13 +511,13 @@ SimInstance = function SimInstance(version, payload, sid) { Object.defineProperty(SimInstance.prototype, '_proxy', { - get: function() { - if (!this._context) { - this._context = new SimContext(this._version, this._solution.sid); - } + get: function() { + if (!this._context) { + this._context = new SimContext(this._version, this._solution.sid); + } - return this._context; - } + return this._context; + } }); /* jshint ignore:start */ @@ -838,22 +838,22 @@ SimContext.prototype.remove = function remove(callback) { Object.defineProperty(SimContext.prototype, 'usageRecords', { - get: function() { - if (!this._usageRecords) { - this._usageRecords = new UsageRecordList(this._version, this._solution.sid); + get: function() { + if (!this._usageRecords) { + this._usageRecords = new UsageRecordList(this._version, this._solution.sid); + } + return this._usageRecords; } - return this._usageRecords; - } }); Object.defineProperty(SimContext.prototype, 'dataSessions', { - get: function() { - if (!this._dataSessions) { - this._dataSessions = new DataSessionList(this._version, this._solution.sid); + get: function() { + if (!this._dataSessions) { + this._dataSessions = new DataSessionList(this._version, this._solution.sid); + } + return this._dataSessions; } - return this._dataSessions; - } }); /* jshint ignore:start */ diff --git a/spec/integration/rest/api/v2010/account/call/payment.spec.js b/spec/integration/rest/api/v2010/account/call/payment.spec.js index d9538ffdf9..4978df111d 100644 --- a/spec/integration/rest/api/v2010/account/call/payment.spec.js +++ b/spec/integration/rest/api/v2010/account/call/payment.spec.js @@ -120,7 +120,7 @@ describe('Payment', function() { 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var opts = {idempotencyKey: 'idempotency_key', statusCallback: 'https://example.com'}; var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') @@ -145,7 +145,7 @@ describe('Payment', function() { 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var opts = {idempotencyKey: 'idempotency_key', statusCallback: 'https://example.com'}; var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') @@ -170,7 +170,7 @@ describe('Payment', function() { 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Payments/PKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var opts = {idempotencyKey: 'idempotency_key', statusCallback: 'https://example.com'}; var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') diff --git a/spec/integration/rest/api/v2010/account/message.spec.js b/spec/integration/rest/api/v2010/account/message.spec.js index d3df5c3ac7..b503092e46 100644 --- a/spec/integration/rest/api/v2010/account/message.spec.js +++ b/spec/integration/rest/api/v2010/account/message.spec.js @@ -756,7 +756,7 @@ describe('Message', function() { 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var opts = {body: 'body'}; var promise = client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') diff --git a/spec/integration/rest/video/v1/room/roomParticipant/roomParticipantSubscribeRule.spec.js b/spec/integration/rest/video/v1/room/roomParticipant/roomParticipantSubscribeRule.spec.js index 2558f2cdff..e564d0c2a4 100644 --- a/spec/integration/rest/video/v1/room/roomParticipant/roomParticipantSubscribeRule.spec.js +++ b/spec/integration/rest/video/v1/room/roomParticipant/roomParticipantSubscribeRule.spec.js @@ -128,7 +128,7 @@ describe('SubscribeRules', function() { ] }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var promise = client.video.v1.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') .participants('PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') diff --git a/spec/integration/rest/voice/v1/dialingPermissions/settings.spec.js b/spec/integration/rest/voice/v1/dialingPermissions/settings.spec.js index 2613562f85..ad3141d90a 100644 --- a/spec/integration/rest/voice/v1/dialingPermissions/settings.spec.js +++ b/spec/integration/rest/voice/v1/dialingPermissions/settings.spec.js @@ -97,7 +97,7 @@ describe('Settings', function() { 'url': 'https://voice.twilio.com/v1/Settings' }); - holodeck.mock(new Response(202, body)); + holodeck.mock(new Response(200, body)); var promise = client.voice.v1.dialingPermissions .settings().update();