diff --git a/CHANGES.md b/CHANGES.md index 9836847111..e804e5d107 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,27 @@ twilio-node changelog ===================== +[2017-07-13] Version 3.5.0 +--------------------------- +**Api** +- Update `AnnounceMethod` parameter naming for consistency + +**Notify** +- Add `ToBinding` optional parameter on Notifications resource creation. Accepted values are json strings. + +**Preview** +- Add `verification_attempts` to HostedNumberOrders. +- Add `status_callback_url` and `status_callback_method` to HostedNumberOrders. + +**Video** +- Filter recordings by date using the parameters `DateCreatedAfter` and `DateCreatedBefore`. +- Override the default time-to-live of a recording's media URL through the `Ttl` parameter (in seconds, default value is 3600). +- Add query parameters `SourceSid`, `Status`, `DateCreatedAfter` and `DateCreatedBefore` to the convenience method for retrieving Room recordings. + +**Wireless** +- Added national and international data limits to the RatePlans resource. + + [2017-06-16] Version 3.4.0 -------------------------- diff --git a/lib/rest/api/v2010/account/address.js b/lib/rest/api/v2010/account/address.js index 29dde2fda3..b504e13da2 100644 --- a/lib/rest/api/v2010/account/address.js +++ b/lib/rest/api/v2010/account/address.js @@ -7,6 +7,7 @@ var DependentPhoneNumberList = require( var Page = require('../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var AddressList; @@ -63,7 +64,7 @@ AddressList = function AddressList(version, accountSid) { * @param {string} opts.postalCode - The postal_code * @param {string} opts.isoCountry - The iso_country * @param {string} [opts.friendlyName] - The friendly_name - * @param {string} [opts.emergencyEnabled] - The emergency_enabled + * @param {boolean} [opts.emergencyEnabled] - The emergency_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed AddressInstance @@ -101,7 +102,7 @@ AddressList = function AddressList(version, accountSid) { 'PostalCode': _.get(opts, 'postalCode'), 'IsoCountry': _.get(opts, 'isoCountry'), 'FriendlyName': _.get(opts, 'friendlyName'), - 'EmergencyEnabled': _.get(opts, 'emergencyEnabled') + 'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')) }); var promise = this._version.create({ @@ -487,8 +488,8 @@ AddressPage.prototype.getInstance = function getInstance(payload) { * @property {string} sid - The sid * @property {string} street - The street * @property {string} uri - The uri - * @property {string} emergencyEnabled - The emergency_enabled - * @property {string} validated - The validated + * @property {boolean} emergencyEnabled - The emergency_enabled + * @property {boolean} validated - The validated * * @param {Twilio.Api.V2010} version - Version of the resource * @param {object} payload - The instance payload @@ -587,7 +588,7 @@ AddressInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.city] - The city * @param {string} [opts.region] - The region * @param {string} [opts.postalCode] - The postal_code - * @param {string} [opts.emergencyEnabled] - The emergency_enabled + * @param {boolean} [opts.emergencyEnabled] - The emergency_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed AddressInstance @@ -733,7 +734,7 @@ AddressContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.city] - The city * @param {string} [opts.region] - The region * @param {string} [opts.postalCode] - The postal_code - * @param {string} [opts.emergencyEnabled] - The emergency_enabled + * @param {boolean} [opts.emergencyEnabled] - The emergency_enabled * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed AddressInstance @@ -754,7 +755,7 @@ AddressContext.prototype.update = function update(opts, callback) { 'City': _.get(opts, 'city'), 'Region': _.get(opts, 'region'), 'PostalCode': _.get(opts, 'postalCode'), - 'EmergencyEnabled': _.get(opts, 'emergencyEnabled') + 'EmergencyEnabled': serialize.bool(_.get(opts, 'emergencyEnabled')) }); var promise = this._version.update({ diff --git a/lib/rest/api/v2010/account/application.js b/lib/rest/api/v2010/account/application.js index 89fc70492c..e0a2294f52 100644 --- a/lib/rest/api/v2010/account/application.js +++ b/lib/rest/api/v2010/account/application.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var ApplicationList; @@ -65,7 +66,7 @@ ApplicationList = function ApplicationList(version, accountSid) { * @param {string} [opts.statusCallback] - URL to hit with status updates * @param {string} [opts.statusCallbackMethod] - * HTTP method to use with the status callback - * @param {string} [opts.voiceCallerIdLookup] - True or False + * @param {boolean} [opts.voiceCallerIdLookup] - True or False * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS * @param {string} [opts.smsMethod] - HTTP method to use with sms_url * @param {string} [opts.smsFallbackUrl] - @@ -99,7 +100,7 @@ ApplicationList = function ApplicationList(version, accountSid) { 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'SmsUrl': _.get(opts, 'smsUrl'), 'SmsMethod': _.get(opts, 'smsMethod'), 'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'), @@ -489,7 +490,7 @@ ApplicationPage.prototype.getInstance = function getInstance(payload) { * @property {string} statusCallbackMethod - * HTTP method to use with the status callback * @property {string} uri - URI for this resource - * @property {string} voiceCallerIdLookup - True or False + * @property {boolean} voiceCallerIdLookup - True or False * @property {string} voiceFallbackMethod - * HTTP method to use with the fallback url * @property {string} voiceFallbackUrl - Fallback URL @@ -607,7 +608,7 @@ ApplicationInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.statusCallback] - URL to hit with status updates * @param {string} [opts.statusCallbackMethod] - * HTTP method to use with the status callback - * @param {string} [opts.voiceCallerIdLookup] - True or False + * @param {boolean} [opts.voiceCallerIdLookup] - True or False * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS * @param {string} [opts.smsMethod] - HTTP method to use with sms_url * @param {string} [opts.smsFallbackUrl] - @@ -747,7 +748,7 @@ ApplicationContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.statusCallback] - URL to hit with status updates * @param {string} [opts.statusCallbackMethod] - * HTTP method to use with the status callback - * @param {string} [opts.voiceCallerIdLookup] - True or False + * @param {boolean} [opts.voiceCallerIdLookup] - True or False * @param {string} [opts.smsUrl] - URL Twilio will request when receiving an SMS * @param {string} [opts.smsMethod] - HTTP method to use with sms_url * @param {string} [opts.smsFallbackUrl] - @@ -780,7 +781,7 @@ ApplicationContext.prototype.update = function update(opts, callback) { 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'SmsUrl': _.get(opts, 'smsUrl'), 'SmsMethod': _.get(opts, 'smsMethod'), 'SmsFallbackUrl': _.get(opts, 'smsFallbackUrl'), diff --git a/lib/rest/api/v2010/account/availablePhoneNumber.js b/lib/rest/api/v2010/account/availablePhoneNumber.js index 8b8173bade..25536ba432 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumber.js +++ b/lib/rest/api/v2010/account/availablePhoneNumber.js @@ -381,7 +381,7 @@ AvailablePhoneNumberCountryPage.prototype.getInstance = function * The ISO Country code to lookup phone numbers for. * @property {string} country - The country * @property {string} uri - The uri - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} subresourceUris - The subresource_uris * * @param {Twilio.Api.V2010} version - Version of the resource diff --git a/lib/rest/api/v2010/account/availablePhoneNumber/local.js b/lib/rest/api/v2010/account/availablePhoneNumber/local.js index d2c08f9072..74d7167c97 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumber/local.js +++ b/lib/rest/api/v2010/account/availablePhoneNumber/local.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var LocalList; @@ -65,16 +67,16 @@ LocalList = function LocalList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -173,16 +175,16 @@ LocalList = function LocalList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -252,16 +254,16 @@ LocalList = function LocalList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -290,13 +292,13 @@ LocalList = function LocalList(version, accountSid, countryCode) { var data = values.of({ 'AreaCode': _.get(opts, 'areaCode'), 'Contains': _.get(opts, 'contains'), - 'SmsEnabled': _.get(opts, 'smsEnabled'), - 'MmsEnabled': _.get(opts, 'mmsEnabled'), - 'VoiceEnabled': _.get(opts, 'voiceEnabled'), - 'ExcludeAllAddressRequired': _.get(opts, 'excludeAllAddressRequired'), - 'ExcludeLocalAddressRequired': _.get(opts, 'excludeLocalAddressRequired'), - 'ExcludeForeignAddressRequired': _.get(opts, 'excludeForeignAddressRequired'), - 'Beta': _.get(opts, 'beta'), + 'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')), + 'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')), + 'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')), + 'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')), + 'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')), + 'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'NearNumber': _.get(opts, 'nearNumber'), 'NearLatLong': _.get(opts, 'nearLatLong'), 'Distance': _.get(opts, 'distance'), @@ -348,16 +350,16 @@ LocalList = function LocalList(version, accountSid, countryCode) { * * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -465,7 +467,7 @@ LocalPage.prototype.getInstance = function getInstance(payload) { * @property {string} postalCode - The postal_code * @property {string} isoCountry - The iso_country * @property {string} addressRequirements - The address_requirements - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * * @param {Twilio.Api.V2010} version - Version of the resource diff --git a/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js b/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js index ba1d8a9546..96f804a40f 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js +++ b/lib/rest/api/v2010/account/availablePhoneNumber/mobile.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var MobileList; @@ -65,16 +67,16 @@ MobileList = function MobileList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -173,16 +175,16 @@ MobileList = function MobileList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -252,16 +254,16 @@ MobileList = function MobileList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -290,13 +292,13 @@ MobileList = function MobileList(version, accountSid, countryCode) { var data = values.of({ 'AreaCode': _.get(opts, 'areaCode'), 'Contains': _.get(opts, 'contains'), - 'SmsEnabled': _.get(opts, 'smsEnabled'), - 'MmsEnabled': _.get(opts, 'mmsEnabled'), - 'VoiceEnabled': _.get(opts, 'voiceEnabled'), - 'ExcludeAllAddressRequired': _.get(opts, 'excludeAllAddressRequired'), - 'ExcludeLocalAddressRequired': _.get(opts, 'excludeLocalAddressRequired'), - 'ExcludeForeignAddressRequired': _.get(opts, 'excludeForeignAddressRequired'), - 'Beta': _.get(opts, 'beta'), + 'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')), + 'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')), + 'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')), + 'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')), + 'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')), + 'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'NearNumber': _.get(opts, 'nearNumber'), 'NearLatLong': _.get(opts, 'nearLatLong'), 'Distance': _.get(opts, 'distance'), @@ -348,16 +350,16 @@ MobileList = function MobileList(version, accountSid, countryCode) { * * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -465,7 +467,7 @@ MobilePage.prototype.getInstance = function getInstance(payload) { * @property {string} postalCode - The postal_code * @property {string} isoCountry - The iso_country * @property {string} addressRequirements - The address_requirements - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * * @param {Twilio.Api.V2010} version - Version of the resource diff --git a/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js b/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js index abe276ce08..89467cfc52 100644 --- a/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js +++ b/lib/rest/api/v2010/account/availablePhoneNumber/tollFree.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var TollFreeList; @@ -65,16 +67,16 @@ TollFreeList = function TollFreeList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -173,16 +175,16 @@ TollFreeList = function TollFreeList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -252,16 +254,16 @@ TollFreeList = function TollFreeList(version, accountSid, countryCode) { * @param {object|function} opts - ... * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -290,13 +292,13 @@ TollFreeList = function TollFreeList(version, accountSid, countryCode) { var data = values.of({ 'AreaCode': _.get(opts, 'areaCode'), 'Contains': _.get(opts, 'contains'), - 'SmsEnabled': _.get(opts, 'smsEnabled'), - 'MmsEnabled': _.get(opts, 'mmsEnabled'), - 'VoiceEnabled': _.get(opts, 'voiceEnabled'), - 'ExcludeAllAddressRequired': _.get(opts, 'excludeAllAddressRequired'), - 'ExcludeLocalAddressRequired': _.get(opts, 'excludeLocalAddressRequired'), - 'ExcludeForeignAddressRequired': _.get(opts, 'excludeForeignAddressRequired'), - 'Beta': _.get(opts, 'beta'), + 'SmsEnabled': serialize.bool(_.get(opts, 'smsEnabled')), + 'MmsEnabled': serialize.bool(_.get(opts, 'mmsEnabled')), + 'VoiceEnabled': serialize.bool(_.get(opts, 'voiceEnabled')), + 'ExcludeAllAddressRequired': serialize.bool(_.get(opts, 'excludeAllAddressRequired')), + 'ExcludeLocalAddressRequired': serialize.bool(_.get(opts, 'excludeLocalAddressRequired')), + 'ExcludeForeignAddressRequired': serialize.bool(_.get(opts, 'excludeForeignAddressRequired')), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'NearNumber': _.get(opts, 'nearNumber'), 'NearLatLong': _.get(opts, 'nearLatLong'), 'Distance': _.get(opts, 'distance'), @@ -348,16 +350,16 @@ TollFreeList = function TollFreeList(version, accountSid, countryCode) { * * @param {number} [opts.areaCode] - The area_code * @param {string} [opts.contains] - The contains - * @param {string} [opts.smsEnabled] - The sms_enabled - * @param {string} [opts.mmsEnabled] - The mms_enabled - * @param {string} [opts.voiceEnabled] - The voice_enabled - * @param {string} [opts.excludeAllAddressRequired] - + * @param {boolean} [opts.smsEnabled] - The sms_enabled + * @param {boolean} [opts.mmsEnabled] - The mms_enabled + * @param {boolean} [opts.voiceEnabled] - The voice_enabled + * @param {boolean} [opts.excludeAllAddressRequired] - * The exclude_all_address_required - * @param {string} [opts.excludeLocalAddressRequired] - + * @param {boolean} [opts.excludeLocalAddressRequired] - * The exclude_local_address_required - * @param {string} [opts.excludeForeignAddressRequired] - + * @param {boolean} [opts.excludeForeignAddressRequired] - * The exclude_foreign_address_required - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.nearNumber] - The near_number * @param {string} [opts.nearLatLong] - The near_lat_long * @param {number} [opts.distance] - The distance @@ -465,7 +467,7 @@ TollFreePage.prototype.getInstance = function getInstance(payload) { * @property {string} postalCode - The postal_code * @property {string} isoCountry - The iso_country * @property {string} addressRequirements - The address_requirements - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * * @param {Twilio.Api.V2010} version - Version of the resource diff --git a/lib/rest/api/v2010/account/call.js b/lib/rest/api/v2010/account/call.js index 67d26703d7..da26dcc731 100644 --- a/lib/rest/api/v2010/account/call.js +++ b/lib/rest/api/v2010/account/call.js @@ -77,7 +77,7 @@ CallList = function CallList(version, accountSid) { * @param {string} [opts.ifMachine] - * Action to take if a machine has answered the call * @param {number} [opts.timeout] - Number of seconds to wait for an answer - * @param {string} [opts.record] - Whether or not to record the Call + * @param {boolean} [opts.record] - Whether or not to record the Call * @param {string} [opts.recordingChannels] - The recording_channels * @param {string} [opts.recordingStatusCallback] - The recording_status_callback * @param {string} [opts.recordingStatusCallbackMethod] - @@ -122,7 +122,7 @@ CallList = function CallList(version, accountSid) { 'SendDigits': _.get(opts, 'sendDigits'), 'IfMachine': _.get(opts, 'ifMachine'), 'Timeout': _.get(opts, 'timeout'), - 'Record': _.get(opts, 'record'), + 'Record': serialize.bool(_.get(opts, 'record')), 'RecordingChannels': _.get(opts, 'recordingChannels'), 'RecordingStatusCallback': _.get(opts, 'recordingStatusCallback'), 'RecordingStatusCallbackMethod': _.get(opts, 'recordingStatusCallbackMethod'), diff --git a/lib/rest/api/v2010/account/call/feedbackSummary.js b/lib/rest/api/v2010/account/call/feedbackSummary.js index 979d171708..ef8a352d18 100644 --- a/lib/rest/api/v2010/account/call/feedbackSummary.js +++ b/lib/rest/api/v2010/account/call/feedbackSummary.js @@ -59,7 +59,7 @@ FeedbackSummaryList = function FeedbackSummaryList(version, accountSid) { * @param {object} opts - ... * @param {Date} opts.startDate - The start_date * @param {Date} opts.endDate - The end_date - * @param {string} [opts.includeSubaccounts] - The include_subaccounts + * @param {boolean} [opts.includeSubaccounts] - The include_subaccounts * @param {string} [opts.statusCallback] - The status_callback * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {function} [callback] - Callback to handle processed record @@ -82,7 +82,7 @@ FeedbackSummaryList = function FeedbackSummaryList(version, accountSid) { var data = values.of({ 'StartDate': serialize.iso8601Date(_.get(opts, 'startDate')), 'EndDate': serialize.iso8601Date(_.get(opts, 'endDate')), - 'IncludeSubaccounts': _.get(opts, 'includeSubaccounts'), + 'IncludeSubaccounts': serialize.bool(_.get(opts, 'includeSubaccounts')), 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod') }); @@ -195,7 +195,7 @@ FeedbackSummaryPage.prototype.getInstance = function getInstance(payload) { * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {Date} endDate - The end_date - * @property {string} includeSubaccounts - The include_subaccounts + * @property {boolean} includeSubaccounts - The include_subaccounts * @property {string} issues - The issues * @property {number} qualityScoreAverage - The quality_score_average * @property {number} qualityScoreMedian - The quality_score_median diff --git a/lib/rest/api/v2010/account/call/recording.js b/lib/rest/api/v2010/account/call/recording.js index ab185f69e6..91043ef428 100644 --- a/lib/rest/api/v2010/account/call/recording.js +++ b/lib/rest/api/v2010/account/call/recording.js @@ -405,6 +405,8 @@ RecordingPage.prototype.getInstance = function getInstance(payload) { * @property {string} sid - The sid * @property {number} price - The price * @property {string} uri - The uri + * @property {string} encryptionType - The encryption_type + * @property {string} encryptionDetails - The encryption_details * * @param {Twilio.Api.V2010} version - Version of the resource * @param {object} payload - The instance payload @@ -427,6 +429,8 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid, this.sid = payload.sid; // jshint ignore:line this.price = deserialize.decimal(payload.price); // jshint ignore:line this.uri = payload.uri; // jshint ignore:line + this.encryptionType = payload.encryption_type; // jshint ignore:line + this.encryptionDetails = payload.encryption_details; // jshint ignore:line // Context this._context = undefined; diff --git a/lib/rest/api/v2010/account/conference/participant.js b/lib/rest/api/v2010/account/conference/participant.js index f9fdf6c42b..08f1172139 100644 --- a/lib/rest/api/v2010/account/conference/participant.js +++ b/lib/rest/api/v2010/account/conference/participant.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var ParticipantList; @@ -63,14 +65,14 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {string|list} [opts.statusCallbackEvent] - The status_callback_event * @param {number} [opts.timeout] - The timeout - * @param {string} [opts.record] - The record - * @param {string} [opts.muted] - The muted + * @param {boolean} [opts.record] - The record + * @param {boolean} [opts.muted] - The muted * @param {string} [opts.beep] - The beep - * @param {string} [opts.startConferenceOnEnter] - The start_conference_on_enter - * @param {string} [opts.endConferenceOnExit] - The end_conference_on_exit + * @param {boolean} [opts.startConferenceOnEnter] - The start_conference_on_enter + * @param {boolean} [opts.endConferenceOnExit] - The end_conference_on_exit * @param {string} [opts.waitUrl] - The wait_url * @param {string} [opts.waitMethod] - The wait_method - * @param {string} [opts.earlyMedia] - The early_media + * @param {boolean} [opts.earlyMedia] - The early_media * @param {number} [opts.maxParticipants] - The max_participants * @param {string} [opts.conferenceRecord] - The conference_record * @param {string} [opts.conferenceTrim] - The conference_trim @@ -114,14 +116,14 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'StatusCallbackEvent': _.get(opts, 'statusCallbackEvent'), 'Timeout': _.get(opts, 'timeout'), - 'Record': _.get(opts, 'record'), - 'Muted': _.get(opts, 'muted'), + 'Record': serialize.bool(_.get(opts, 'record')), + 'Muted': serialize.bool(_.get(opts, 'muted')), 'Beep': _.get(opts, 'beep'), - 'StartConferenceOnEnter': _.get(opts, 'startConferenceOnEnter'), - 'EndConferenceOnExit': _.get(opts, 'endConferenceOnExit'), + 'StartConferenceOnEnter': serialize.bool(_.get(opts, 'startConferenceOnEnter')), + 'EndConferenceOnExit': serialize.bool(_.get(opts, 'endConferenceOnExit')), 'WaitUrl': _.get(opts, 'waitUrl'), 'WaitMethod': _.get(opts, 'waitMethod'), - 'EarlyMedia': _.get(opts, 'earlyMedia'), + 'EarlyMedia': serialize.bool(_.get(opts, 'earlyMedia')), 'MaxParticipants': _.get(opts, 'maxParticipants'), 'ConferenceRecord': _.get(opts, 'conferenceRecord'), 'ConferenceTrim': _.get(opts, 'conferenceTrim'), @@ -181,8 +183,8 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.muted] - Filter by muted participants - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Filter by muted participants + * @param {boolean} [opts.hold] - The hold * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -271,8 +273,8 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.muted] - Filter by muted participants - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Filter by muted participants + * @param {boolean} [opts.hold] - The hold * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -332,8 +334,8 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.muted] - Filter by muted participants - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Filter by muted participants + * @param {boolean} [opts.hold] - The hold * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -352,8 +354,8 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { var deferred = Q.defer(); var data = values.of({ - 'Muted': _.get(opts, 'muted'), - 'Hold': _.get(opts, 'hold'), + 'Muted': serialize.bool(_.get(opts, 'muted')), + 'Hold': serialize.bool(_.get(opts, 'hold')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -395,8 +397,8 @@ ParticipantList = function ParticipantList(version, accountSid, conferenceSid) { * @memberof Twilio.Api.V2010.AccountContext.ConferenceContext.ParticipantList * @instance * - * @param {string} [opts.muted] - Filter by muted participants - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Filter by muted participants + * @param {boolean} [opts.hold] - The hold * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * @@ -513,11 +515,11 @@ ParticipantPage.prototype.getInstance = function getInstance(payload) { * A string that uniquely identifies this conference * @property {Date} dateCreated - The date this resource was created * @property {Date} dateUpdated - The date this resource was last updated - * @property {string} endConferenceOnExit - + * @property {boolean} endConferenceOnExit - * Indicates if the endConferenceOnExit was set - * @property {string} muted - Indicates if the participant is muted - * @property {string} hold - The hold - * @property {string} startConferenceOnEnter - + * @property {boolean} muted - Indicates if the participant is muted + * @property {boolean} hold - The hold + * @property {boolean} startConferenceOnEnter - * Indicates if the startConferenceOnEnter attribute was set * @property {participant.status} status - The status * @property {string} uri - The URI for this resource @@ -597,12 +599,12 @@ ParticipantInstance.prototype.fetch = function fetch(callback) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.muted] - Indicates if the participant should be muted - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Indicates if the participant should be muted + * @param {boolean} [opts.hold] - The hold * @param {string} [opts.holdUrl] - The hold_url * @param {string} [opts.holdMethod] - The hold_method * @param {string} [opts.announceUrl] - The announce_url - * @param {string} [opts.announceUrlMethod] - The announce_url_method + * @param {string} [opts.announceMethod] - The announce_method * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed ParticipantInstance @@ -706,12 +708,12 @@ ParticipantContext.prototype.fetch = function fetch(callback) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.muted] - Indicates if the participant should be muted - * @param {string} [opts.hold] - The hold + * @param {boolean} [opts.muted] - Indicates if the participant should be muted + * @param {boolean} [opts.hold] - The hold * @param {string} [opts.holdUrl] - The hold_url * @param {string} [opts.holdMethod] - The hold_method * @param {string} [opts.announceUrl] - The announce_url - * @param {string} [opts.announceUrlMethod] - The announce_url_method + * @param {string} [opts.announceMethod] - The announce_method * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed ParticipantInstance @@ -726,12 +728,12 @@ ParticipantContext.prototype.update = function update(opts, callback) { var deferred = Q.defer(); var data = values.of({ - 'Muted': _.get(opts, 'muted'), - 'Hold': _.get(opts, 'hold'), + 'Muted': serialize.bool(_.get(opts, 'muted')), + 'Hold': serialize.bool(_.get(opts, 'hold')), 'HoldUrl': _.get(opts, 'holdUrl'), 'HoldMethod': _.get(opts, 'holdMethod'), 'AnnounceUrl': _.get(opts, 'announceUrl'), - 'AnnounceUrlMethod': _.get(opts, 'announceUrlMethod') + 'AnnounceMethod': _.get(opts, 'announceMethod') }); var promise = this._version.update({ diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber.js b/lib/rest/api/v2010/account/incomingPhoneNumber.js index 331eb75352..8d84e2eecb 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber.js @@ -8,6 +8,7 @@ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var TollFreeList = require('./incomingPhoneNumber/tollFree').TollFreeList; var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var IncomingPhoneNumberList; @@ -71,7 +72,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - Include new phone numbers + * @param {boolean} [opts.beta] - Include new phone numbers * @param {string} [opts.friendlyName] - Filter by friendly name * @param {string} [opts.phoneNumber] - Filter by incoming phone number * @param {string} [opts.origin] - The origin @@ -163,7 +164,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - Include new phone numbers + * @param {boolean} [opts.beta] - Include new phone numbers * @param {string} [opts.friendlyName] - Filter by friendly name * @param {string} [opts.phoneNumber] - Filter by incoming phone number * @param {string} [opts.origin] - The origin @@ -226,7 +227,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - Include new phone numbers + * @param {boolean} [opts.beta] - Include new phone numbers * @param {string} [opts.friendlyName] - Filter by friendly name * @param {string} [opts.phoneNumber] - Filter by incoming phone number * @param {string} [opts.origin] - The origin @@ -248,7 +249,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) var deferred = Q.defer(); var data = values.of({ - 'Beta': _.get(opts, 'beta'), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'FriendlyName': _.get(opts, 'friendlyName'), 'PhoneNumber': _.get(opts, 'phoneNumber'), 'Origin': _.get(opts, 'origin'), @@ -293,7 +294,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberList * @instance * - * @param {string} [opts.beta] - Include new phone numbers + * @param {boolean} [opts.beta] - Include new phone numbers * @param {string} [opts.friendlyName] - Filter by friendly name * @param {string} [opts.phoneNumber] - Filter by incoming phone number * @param {string} [opts.origin] - The origin @@ -357,7 +358,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) * HTTP method twilio will use with status callback * @param {string} [opts.voiceApplicationSid] - * The unique sid of the application to handle this number - * @param {string} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID + * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url * @param {string} [opts.voiceFallbackUrl] - * URL Twilio will request when an error occurs in TwiML @@ -395,7 +396,7 @@ IncomingPhoneNumberList = function IncomingPhoneNumberList(version, accountSid) 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'), 'VoiceMethod': _.get(opts, 'voiceMethod'), @@ -553,7 +554,7 @@ IncomingPhoneNumberPage.prototype.getInstance = function getInstance(payload) { * @property {incoming_phone_number.address_requirement} addressRequirements - * Indicates if the customer requires an address * @property {string} apiVersion - The Twilio REST API version to use - * @property {string} beta - Indicates if the phone number is a beta number + * @property {boolean} beta - Indicates if the phone number is a beta number * @property {string} capabilities - * Indicate if a phone can receive calls or messages * @property {Date} dateCreated - The date this resource was created @@ -577,7 +578,7 @@ IncomingPhoneNumberPage.prototype.getInstance = function getInstance(payload) { * @property {string} uri - The URI for this resource * @property {string} voiceApplicationSid - * The unique sid of the application to handle this number - * @property {string} voiceCallerIdLookup - Look up the caller's caller-ID + * @property {boolean} voiceCallerIdLookup - Look up the caller's caller-ID * @property {string} voiceFallbackMethod - HTTP method used with fallback_url * @property {string} voiceFallbackUrl - * URL Twilio will request when an error occurs in TwiML @@ -676,7 +677,7 @@ Object.defineProperty(IncomingPhoneNumberInstance.prototype, * HTTP method twilio will use with status callback * @param {string} [opts.voiceApplicationSid] - * The unique sid of the application to handle this number - * @param {string} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID + * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url * @param {string} [opts.voiceFallbackUrl] - * URL Twilio will request when an error occurs in TwiML @@ -780,7 +781,7 @@ IncomingPhoneNumberContext = function IncomingPhoneNumberContext(version, * HTTP method twilio will use with status callback * @param {string} [opts.voiceApplicationSid] - * The unique sid of the application to handle this number - * @param {string} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID + * @param {boolean} [opts.voiceCallerIdLookup] - Look up the caller's caller-ID * @param {string} [opts.voiceFallbackMethod] - HTTP method used with fallback_url * @param {string} [opts.voiceFallbackUrl] - * URL Twilio will request when an error occurs in TwiML @@ -814,7 +815,7 @@ IncomingPhoneNumberContext.prototype.update = function update(opts, callback) { 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'), 'VoiceMethod': _.get(opts, 'voiceMethod'), diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/local.js b/lib/rest/api/v2010/account/incomingPhoneNumber/local.js index 98950d15a7..ad4b8b75ea 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/local.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/local.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var LocalList; @@ -60,7 +62,7 @@ LocalList = function LocalList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -152,7 +154,7 @@ LocalList = function LocalList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -215,7 +217,7 @@ LocalList = function LocalList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -237,7 +239,7 @@ LocalList = function LocalList(version, accountSid) { var deferred = Q.defer(); var data = values.of({ - 'Beta': _.get(opts, 'beta'), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'FriendlyName': _.get(opts, 'friendlyName'), 'PhoneNumber': _.get(opts, 'phoneNumber'), 'Origin': _.get(opts, 'origin'), @@ -282,7 +284,7 @@ LocalList = function LocalList(version, accountSid) { * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.LocalList * @instance * - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -340,7 +342,7 @@ LocalList = function LocalList(version, accountSid) { * @param {string} [opts.statusCallback] - The status_callback * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {string} [opts.voiceApplicationSid] - The voice_application_sid - * @param {string} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup + * @param {boolean} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup * @param {string} [opts.voiceFallbackMethod] - The voice_fallback_method * @param {string} [opts.voiceFallbackUrl] - The voice_fallback_url * @param {string} [opts.voiceMethod] - The voice_method @@ -371,7 +373,7 @@ LocalList = function LocalList(version, accountSid) { 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'), 'VoiceMethod': _.get(opts, 'voiceMethod'), @@ -460,7 +462,7 @@ LocalPage.prototype.getInstance = function getInstance(payload) { * @property {local.address_requirement} addressRequirements - * The address_requirements * @property {string} apiVersion - The api_version - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated @@ -478,7 +480,7 @@ LocalPage.prototype.getInstance = function getInstance(payload) { * @property {string} trunkSid - The trunk_sid * @property {string} uri - The uri * @property {string} voiceApplicationSid - The voice_application_sid - * @property {string} voiceCallerIdLookup - The voice_caller_id_lookup + * @property {boolean} voiceCallerIdLookup - The voice_caller_id_lookup * @property {string} voiceFallbackMethod - The voice_fallback_method * @property {string} voiceFallbackUrl - The voice_fallback_url * @property {string} voiceMethod - The voice_method diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js b/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js index 618191785f..171338a8da 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var MobileList; @@ -60,7 +62,7 @@ MobileList = function MobileList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -152,7 +154,7 @@ MobileList = function MobileList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -215,7 +217,7 @@ MobileList = function MobileList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -237,7 +239,7 @@ MobileList = function MobileList(version, accountSid) { var deferred = Q.defer(); var data = values.of({ - 'Beta': _.get(opts, 'beta'), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'FriendlyName': _.get(opts, 'friendlyName'), 'PhoneNumber': _.get(opts, 'phoneNumber'), 'Origin': _.get(opts, 'origin'), @@ -282,7 +284,7 @@ MobileList = function MobileList(version, accountSid) { * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.MobileList * @instance * - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -340,7 +342,7 @@ MobileList = function MobileList(version, accountSid) { * @param {string} [opts.statusCallback] - The status_callback * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {string} [opts.voiceApplicationSid] - The voice_application_sid - * @param {string} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup + * @param {boolean} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup * @param {string} [opts.voiceFallbackMethod] - The voice_fallback_method * @param {string} [opts.voiceFallbackUrl] - The voice_fallback_url * @param {string} [opts.voiceMethod] - The voice_method @@ -371,7 +373,7 @@ MobileList = function MobileList(version, accountSid) { 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'), 'VoiceMethod': _.get(opts, 'voiceMethod'), @@ -460,7 +462,7 @@ MobilePage.prototype.getInstance = function getInstance(payload) { * @property {mobile.address_requirement} addressRequirements - * The address_requirements * @property {string} apiVersion - The api_version - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated @@ -478,7 +480,7 @@ MobilePage.prototype.getInstance = function getInstance(payload) { * @property {string} trunkSid - The trunk_sid * @property {string} uri - The uri * @property {string} voiceApplicationSid - The voice_application_sid - * @property {string} voiceCallerIdLookup - The voice_caller_id_lookup + * @property {boolean} voiceCallerIdLookup - The voice_caller_id_lookup * @property {string} voiceFallbackMethod - The voice_fallback_method * @property {string} voiceFallbackUrl - The voice_fallback_url * @property {string} voiceMethod - The voice_method diff --git a/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js b/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js index ea45b2ef7b..f4b9df5888 100644 --- a/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js +++ b/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var TollFreeList; @@ -60,7 +62,7 @@ TollFreeList = function TollFreeList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -152,7 +154,7 @@ TollFreeList = function TollFreeList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -215,7 +217,7 @@ TollFreeList = function TollFreeList(version, accountSid) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -237,7 +239,7 @@ TollFreeList = function TollFreeList(version, accountSid) { var deferred = Q.defer(); var data = values.of({ - 'Beta': _.get(opts, 'beta'), + 'Beta': serialize.bool(_.get(opts, 'beta')), 'FriendlyName': _.get(opts, 'friendlyName'), 'PhoneNumber': _.get(opts, 'phoneNumber'), 'Origin': _.get(opts, 'origin'), @@ -282,7 +284,7 @@ TollFreeList = function TollFreeList(version, accountSid) { * @memberof Twilio.Api.V2010.AccountContext.IncomingPhoneNumberContext.TollFreeList * @instance * - * @param {string} [opts.beta] - The beta + * @param {boolean} [opts.beta] - The beta * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.phoneNumber] - The phone_number * @param {string} [opts.origin] - The origin @@ -340,7 +342,7 @@ TollFreeList = function TollFreeList(version, accountSid) { * @param {string} [opts.statusCallback] - The status_callback * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {string} [opts.voiceApplicationSid] - The voice_application_sid - * @param {string} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup + * @param {boolean} [opts.voiceCallerIdLookup] - The voice_caller_id_lookup * @param {string} [opts.voiceFallbackMethod] - The voice_fallback_method * @param {string} [opts.voiceFallbackUrl] - The voice_fallback_url * @param {string} [opts.voiceMethod] - The voice_method @@ -371,7 +373,7 @@ TollFreeList = function TollFreeList(version, accountSid) { 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'VoiceApplicationSid': _.get(opts, 'voiceApplicationSid'), - 'VoiceCallerIdLookup': _.get(opts, 'voiceCallerIdLookup'), + 'VoiceCallerIdLookup': serialize.bool(_.get(opts, 'voiceCallerIdLookup')), 'VoiceFallbackMethod': _.get(opts, 'voiceFallbackMethod'), 'VoiceFallbackUrl': _.get(opts, 'voiceFallbackUrl'), 'VoiceMethod': _.get(opts, 'voiceMethod'), @@ -460,7 +462,7 @@ TollFreePage.prototype.getInstance = function getInstance(payload) { * @property {toll_free.address_requirement} addressRequirements - * The address_requirements * @property {string} apiVersion - The api_version - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated @@ -478,7 +480,7 @@ TollFreePage.prototype.getInstance = function getInstance(payload) { * @property {string} trunkSid - The trunk_sid * @property {string} uri - The uri * @property {string} voiceApplicationSid - The voice_application_sid - * @property {string} voiceCallerIdLookup - The voice_caller_id_lookup + * @property {boolean} voiceCallerIdLookup - The voice_caller_id_lookup * @property {string} voiceFallbackMethod - The voice_fallback_method * @property {string} voiceFallbackUrl - The voice_fallback_url * @property {string} voiceMethod - The voice_method diff --git a/lib/rest/api/v2010/account/message.js b/lib/rest/api/v2010/account/message.js index e5b27e5116..660d1171aa 100644 --- a/lib/rest/api/v2010/account/message.js +++ b/lib/rest/api/v2010/account/message.js @@ -62,7 +62,7 @@ MessageList = function MessageList(version, accountSid) { * URL Twilio will request when the status changes * @param {string} [opts.applicationSid] - The application to use for callbacks * @param {number} [opts.maxPrice] - The max_price - * @param {string} [opts.provideFeedback] - The provide_feedback + * @param {boolean} [opts.provideFeedback] - The provide_feedback * @param {number} [opts.validityPeriod] - The validity_period * @param {string} [opts.from] - The phone number that initiated the message * @param {string} [opts.messagingServiceSid] - The messaging_service_sid @@ -91,7 +91,7 @@ MessageList = function MessageList(version, accountSid) { 'StatusCallback': _.get(opts, 'statusCallback'), 'ApplicationSid': _.get(opts, 'applicationSid'), 'MaxPrice': _.get(opts, 'maxPrice'), - 'ProvideFeedback': _.get(opts, 'provideFeedback'), + 'ProvideFeedback': serialize.bool(_.get(opts, 'provideFeedback')), 'ValidityPeriod': _.get(opts, 'validityPeriod') }); @@ -496,7 +496,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} priceUnit - The currency in which Price is measured * @property {string} sid - A string that uniquely identifies this message * @property {message.status} status - The status of this message - * @property {string} subresourceUris - The subresource_uris + * @property {string} subresourceUris - The URI for any subresources * @property {string} to - The phone number that received the message * @property {string} uri - The URI for this resource * diff --git a/lib/rest/api/v2010/account/recording.js b/lib/rest/api/v2010/account/recording.js index c6afcf6d62..065590d731 100644 --- a/lib/rest/api/v2010/account/recording.js +++ b/lib/rest/api/v2010/account/recording.js @@ -412,6 +412,9 @@ RecordingPage.prototype.getInstance = function getInstance(payload) { * @property {number} channels - The channels * @property {recording.source} source - The source * @property {string} uri - The URI for this resource + * @property {string} encryptionType - + * The type of encryption used for this resource. + * @property {string} encryptionDetails - The encryption_details * * @param {Twilio.Api.V2010} version - Version of the resource * @param {object} payload - The instance payload @@ -437,6 +440,8 @@ RecordingInstance = function RecordingInstance(version, payload, accountSid, this.channels = deserialize.integer(payload.channels); // jshint ignore:line this.source = payload.source; // jshint ignore:line this.uri = payload.uri; // jshint ignore:line + this.encryptionType = payload.encryption_type; // jshint ignore:line + this.encryptionDetails = payload.encryption_details; // jshint ignore:line // Context this._context = undefined; diff --git a/lib/rest/chat/v1/credential.js b/lib/rest/chat/v1/credential.js index 9a44b0e1a6..3ded9747f8 100644 --- a/lib/rest/chat/v1/credential.js +++ b/lib/rest/chat/v1/credential.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var CredentialList; @@ -306,7 +307,7 @@ CredentialList = function CredentialList(version) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -328,7 +329,7 @@ CredentialList = function CredentialList(version) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); @@ -508,7 +509,7 @@ CredentialInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -610,7 +611,7 @@ CredentialContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -630,7 +631,7 @@ CredentialContext.prototype.update = function update(opts, callback) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); diff --git a/lib/rest/chat/v1/service.js b/lib/rest/chat/v1/service.js index 10f14fbc8d..a9e9b1c32b 100644 --- a/lib/rest/chat/v1/service.js +++ b/lib/rest/chat/v1/service.js @@ -8,6 +8,7 @@ var RoleList = require('./service/role').RoleList; var UserList = require('./service/user').UserList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var ServiceList; @@ -431,8 +432,8 @@ ServicePage.prototype.getInstance = function getInstance(payload) { * @property {string} defaultChannelRoleSid - The default_channel_role_sid * @property {string} defaultChannelCreatorRoleSid - * The default_channel_creator_role_sid - * @property {string} readStatusEnabled - The read_status_enabled - * @property {string} reachabilityEnabled - The reachability_enabled + * @property {boolean} readStatusEnabled - The read_status_enabled + * @property {boolean} reachabilityEnabled - The reachability_enabled * @property {number} typingIndicatorTimeout - The typing_indicator_timeout * @property {number} consumptionReportInterval - The consumption_report_interval * @property {string} limits - The limits @@ -545,24 +546,24 @@ ServiceInstance.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -841,24 +842,24 @@ ServiceContext.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -981,17 +982,17 @@ ServiceContext.prototype.update = function update(opts, callback) { 'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'), 'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'), 'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'), - 'ReadStatusEnabled': _.get(opts, 'readStatusEnabled'), - 'ReachabilityEnabled': _.get(opts, 'reachabilityEnabled'), + 'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')), + 'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')), 'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'), 'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'), - 'Notifications.NewMessage.Enabled': _.get(opts, 'notifications.newMessage.enabled'), + 'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')), 'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'), - 'Notifications.AddedToChannel.Enabled': _.get(opts, 'notifications.addedToChannel.enabled'), + 'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')), 'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'), - 'Notifications.RemovedFromChannel.Enabled': _.get(opts, 'notifications.removedFromChannel.enabled'), + 'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')), 'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'), - 'Notifications.InvitedToChannel.Enabled': _.get(opts, 'notifications.invitedToChannel.enabled'), + 'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')), 'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'), 'PreWebhookUrl': _.get(opts, 'preWebhookUrl'), 'PostWebhookUrl': _.get(opts, 'postWebhookUrl'), diff --git a/lib/rest/chat/v1/service/channel/message.js b/lib/rest/chat/v1/service/channel/message.js index 21e28151a8..e9754c7c48 100644 --- a/lib/rest/chat/v1/service/channel/message.js +++ b/lib/rest/chat/v1/service/channel/message.js @@ -451,7 +451,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} channelSid - The channel_sid * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated - * @property {string} wasEdited - The was_edited + * @property {boolean} wasEdited - The was_edited * @property {string} from - The from * @property {string} body - The body * @property {number} index - The index diff --git a/lib/rest/chat/v1/service/user.js b/lib/rest/chat/v1/service/user.js index 5c812fdc3f..c05564f8bd 100644 --- a/lib/rest/chat/v1/service/user.js +++ b/lib/rest/chat/v1/service/user.js @@ -439,8 +439,8 @@ UserPage.prototype.getInstance = function getInstance(payload) { * @property {string} friendlyName - The friendly_name * @property {string} roleSid - The role_sid * @property {string} identity - The identity - * @property {string} isOnline - The is_online - * @property {string} isNotifiable - The is_notifiable + * @property {boolean} isOnline - The is_online + * @property {boolean} isNotifiable - The is_notifiable * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {number} joinedChannelsCount - The joined_channels_count diff --git a/lib/rest/chat/v2/credential.js b/lib/rest/chat/v2/credential.js index c6647d6247..7332eb0bd3 100644 --- a/lib/rest/chat/v2/credential.js +++ b/lib/rest/chat/v2/credential.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var CredentialList; @@ -306,7 +307,7 @@ CredentialList = function CredentialList(version) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -328,7 +329,7 @@ CredentialList = function CredentialList(version) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); @@ -508,7 +509,7 @@ CredentialInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -610,7 +611,7 @@ CredentialContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -630,7 +631,7 @@ CredentialContext.prototype.update = function update(opts, callback) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); diff --git a/lib/rest/chat/v2/service.js b/lib/rest/chat/v2/service.js index 46a93f6dbc..2f1b19c3be 100644 --- a/lib/rest/chat/v2/service.js +++ b/lib/rest/chat/v2/service.js @@ -8,6 +8,7 @@ var RoleList = require('./service/role').RoleList; var UserList = require('./service/user').UserList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var ServiceList; @@ -431,8 +432,8 @@ ServicePage.prototype.getInstance = function getInstance(payload) { * @property {string} defaultChannelRoleSid - The default_channel_role_sid * @property {string} defaultChannelCreatorRoleSid - * The default_channel_creator_role_sid - * @property {string} readStatusEnabled - The read_status_enabled - * @property {string} reachabilityEnabled - The reachability_enabled + * @property {boolean} readStatusEnabled - The read_status_enabled + * @property {boolean} reachabilityEnabled - The reachability_enabled * @property {number} typingIndicatorTimeout - The typing_indicator_timeout * @property {number} consumptionReportInterval - The consumption_report_interval * @property {string} limits - The limits @@ -543,32 +544,32 @@ ServiceInstance.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template * @param {string} [opts.notifications.newMessage.sound] - * The notifications.new_message.sound - * @param {string} [opts.notifications.newMessage.badgeCountEnabled] - + * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] - * The notifications.new_message.badge_count_enabled - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template * @param {string} [opts.notifications.addedToChannel.sound] - * The notifications.added_to_channel.sound - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template * @param {string} [opts.notifications.removedFromChannel.sound] - * The notifications.removed_from_channel.sound - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -754,32 +755,32 @@ ServiceContext.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template * @param {string} [opts.notifications.newMessage.sound] - * The notifications.new_message.sound - * @param {string} [opts.notifications.newMessage.badgeCountEnabled] - + * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] - * The notifications.new_message.badge_count_enabled - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template * @param {string} [opts.notifications.addedToChannel.sound] - * The notifications.added_to_channel.sound - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template * @param {string} [opts.notifications.removedFromChannel.sound] - * The notifications.removed_from_channel.sound - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -809,21 +810,21 @@ ServiceContext.prototype.update = function update(opts, callback) { 'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'), 'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'), 'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'), - 'ReadStatusEnabled': _.get(opts, 'readStatusEnabled'), - 'ReachabilityEnabled': _.get(opts, 'reachabilityEnabled'), + 'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')), + 'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')), 'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'), 'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'), - 'Notifications.NewMessage.Enabled': _.get(opts, 'notifications.newMessage.enabled'), + 'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')), 'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'), 'Notifications.NewMessage.Sound': _.get(opts, 'notifications.newMessage.sound'), - 'Notifications.NewMessage.BadgeCountEnabled': _.get(opts, 'notifications.newMessage.badgeCountEnabled'), - 'Notifications.AddedToChannel.Enabled': _.get(opts, 'notifications.addedToChannel.enabled'), + 'Notifications.NewMessage.BadgeCountEnabled': serialize.bool(_.get(opts, 'notifications.newMessage.badgeCountEnabled')), + 'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')), 'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'), 'Notifications.AddedToChannel.Sound': _.get(opts, 'notifications.addedToChannel.sound'), - 'Notifications.RemovedFromChannel.Enabled': _.get(opts, 'notifications.removedFromChannel.enabled'), + 'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')), 'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'), 'Notifications.RemovedFromChannel.Sound': _.get(opts, 'notifications.removedFromChannel.sound'), - 'Notifications.InvitedToChannel.Enabled': _.get(opts, 'notifications.invitedToChannel.enabled'), + 'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')), 'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'), 'Notifications.InvitedToChannel.Sound': _.get(opts, 'notifications.invitedToChannel.sound'), 'PreWebhookUrl': _.get(opts, 'preWebhookUrl'), diff --git a/lib/rest/chat/v2/service/channel/message.js b/lib/rest/chat/v2/service/channel/message.js index 26ee2b97d7..eb54425aa2 100644 --- a/lib/rest/chat/v2/service/channel/message.js +++ b/lib/rest/chat/v2/service/channel/message.js @@ -451,7 +451,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} channelSid - The channel_sid * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated - * @property {string} wasEdited - The was_edited + * @property {boolean} wasEdited - The was_edited * @property {string} from - The from * @property {string} body - The body * @property {number} index - The index diff --git a/lib/rest/chat/v2/service/user.js b/lib/rest/chat/v2/service/user.js index b12402ce11..90c01e8d71 100644 --- a/lib/rest/chat/v2/service/user.js +++ b/lib/rest/chat/v2/service/user.js @@ -439,8 +439,8 @@ UserPage.prototype.getInstance = function getInstance(payload) { * @property {string} friendlyName - The friendly_name * @property {string} roleSid - The role_sid * @property {string} identity - The identity - * @property {string} isOnline - The is_online - * @property {string} isNotifiable - The is_notifiable + * @property {boolean} isOnline - The is_online + * @property {boolean} isNotifiable - The is_notifiable * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {number} joinedChannelsCount - The joined_channels_count diff --git a/lib/rest/ipMessaging/v1/credential.js b/lib/rest/ipMessaging/v1/credential.js index b271b26f1a..b569af50dc 100644 --- a/lib/rest/ipMessaging/v1/credential.js +++ b/lib/rest/ipMessaging/v1/credential.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var CredentialList; @@ -306,7 +307,7 @@ CredentialList = function CredentialList(version) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -328,7 +329,7 @@ CredentialList = function CredentialList(version) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); @@ -508,7 +509,7 @@ CredentialInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -610,7 +611,7 @@ CredentialContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -630,7 +631,7 @@ CredentialContext.prototype.update = function update(opts, callback) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); diff --git a/lib/rest/ipMessaging/v1/service.js b/lib/rest/ipMessaging/v1/service.js index 08f4ebbc50..46ee2e2cf9 100644 --- a/lib/rest/ipMessaging/v1/service.js +++ b/lib/rest/ipMessaging/v1/service.js @@ -8,6 +8,7 @@ var RoleList = require('./service/role').RoleList; var UserList = require('./service/user').UserList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var ServiceList; @@ -431,8 +432,8 @@ ServicePage.prototype.getInstance = function getInstance(payload) { * @property {string} defaultChannelRoleSid - The default_channel_role_sid * @property {string} defaultChannelCreatorRoleSid - * The default_channel_creator_role_sid - * @property {string} readStatusEnabled - The read_status_enabled - * @property {string} reachabilityEnabled - The reachability_enabled + * @property {boolean} readStatusEnabled - The read_status_enabled + * @property {boolean} reachabilityEnabled - The reachability_enabled * @property {number} typingIndicatorTimeout - The typing_indicator_timeout * @property {number} consumptionReportInterval - The consumption_report_interval * @property {string} limits - The limits @@ -545,24 +546,24 @@ ServiceInstance.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -841,24 +842,24 @@ ServiceContext.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -981,17 +982,17 @@ ServiceContext.prototype.update = function update(opts, callback) { 'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'), 'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'), 'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'), - 'ReadStatusEnabled': _.get(opts, 'readStatusEnabled'), - 'ReachabilityEnabled': _.get(opts, 'reachabilityEnabled'), + 'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')), + 'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')), 'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'), 'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'), - 'Notifications.NewMessage.Enabled': _.get(opts, 'notifications.newMessage.enabled'), + 'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')), 'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'), - 'Notifications.AddedToChannel.Enabled': _.get(opts, 'notifications.addedToChannel.enabled'), + 'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')), 'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'), - 'Notifications.RemovedFromChannel.Enabled': _.get(opts, 'notifications.removedFromChannel.enabled'), + 'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')), 'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'), - 'Notifications.InvitedToChannel.Enabled': _.get(opts, 'notifications.invitedToChannel.enabled'), + 'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')), 'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'), 'PreWebhookUrl': _.get(opts, 'preWebhookUrl'), 'PostWebhookUrl': _.get(opts, 'postWebhookUrl'), diff --git a/lib/rest/ipMessaging/v1/service/channel/message.js b/lib/rest/ipMessaging/v1/service/channel/message.js index a864fe1674..3ea063d3f2 100644 --- a/lib/rest/ipMessaging/v1/service/channel/message.js +++ b/lib/rest/ipMessaging/v1/service/channel/message.js @@ -451,7 +451,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} channelSid - The channel_sid * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated - * @property {string} wasEdited - The was_edited + * @property {boolean} wasEdited - The was_edited * @property {string} from - The from * @property {string} body - The body * @property {number} index - The index diff --git a/lib/rest/ipMessaging/v1/service/user.js b/lib/rest/ipMessaging/v1/service/user.js index c08e187d11..05e491418e 100644 --- a/lib/rest/ipMessaging/v1/service/user.js +++ b/lib/rest/ipMessaging/v1/service/user.js @@ -439,8 +439,8 @@ UserPage.prototype.getInstance = function getInstance(payload) { * @property {string} friendlyName - The friendly_name * @property {string} roleSid - The role_sid * @property {string} identity - The identity - * @property {string} isOnline - The is_online - * @property {string} isNotifiable - The is_notifiable + * @property {boolean} isOnline - The is_online + * @property {boolean} isNotifiable - The is_notifiable * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {number} joinedChannelsCount - The joined_channels_count diff --git a/lib/rest/ipMessaging/v2/credential.js b/lib/rest/ipMessaging/v2/credential.js index 9ece625b58..aa21c70ff2 100644 --- a/lib/rest/ipMessaging/v2/credential.js +++ b/lib/rest/ipMessaging/v2/credential.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var CredentialList; @@ -306,7 +307,7 @@ CredentialList = function CredentialList(version) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -328,7 +329,7 @@ CredentialList = function CredentialList(version) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); @@ -508,7 +509,7 @@ CredentialInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -610,7 +611,7 @@ CredentialContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.certificate] - The certificate * @param {string} [opts.privateKey] - The private_key - * @param {string} [opts.sandbox] - The sandbox + * @param {boolean} [opts.sandbox] - The sandbox * @param {string} [opts.apiKey] - The api_key * @param {string} [opts.secret] - The secret * @param {function} [callback] - Callback to handle processed record @@ -630,7 +631,7 @@ CredentialContext.prototype.update = function update(opts, callback) { 'FriendlyName': _.get(opts, 'friendlyName'), 'Certificate': _.get(opts, 'certificate'), 'PrivateKey': _.get(opts, 'privateKey'), - 'Sandbox': _.get(opts, 'sandbox'), + 'Sandbox': serialize.bool(_.get(opts, 'sandbox')), 'ApiKey': _.get(opts, 'apiKey'), 'Secret': _.get(opts, 'secret') }); diff --git a/lib/rest/ipMessaging/v2/service.js b/lib/rest/ipMessaging/v2/service.js index 855207ee93..f1ab6c4792 100644 --- a/lib/rest/ipMessaging/v2/service.js +++ b/lib/rest/ipMessaging/v2/service.js @@ -8,6 +8,7 @@ var RoleList = require('./service/role').RoleList; var UserList = require('./service/user').UserList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var ServiceList; @@ -431,8 +432,8 @@ ServicePage.prototype.getInstance = function getInstance(payload) { * @property {string} defaultChannelRoleSid - The default_channel_role_sid * @property {string} defaultChannelCreatorRoleSid - * The default_channel_creator_role_sid - * @property {string} readStatusEnabled - The read_status_enabled - * @property {string} reachabilityEnabled - The reachability_enabled + * @property {boolean} readStatusEnabled - The read_status_enabled + * @property {boolean} reachabilityEnabled - The reachability_enabled * @property {number} typingIndicatorTimeout - The typing_indicator_timeout * @property {number} consumptionReportInterval - The consumption_report_interval * @property {string} limits - The limits @@ -543,32 +544,32 @@ ServiceInstance.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template * @param {string} [opts.notifications.newMessage.sound] - * The notifications.new_message.sound - * @param {string} [opts.notifications.newMessage.badgeCountEnabled] - + * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] - * The notifications.new_message.badge_count_enabled - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template * @param {string} [opts.notifications.addedToChannel.sound] - * The notifications.added_to_channel.sound - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template * @param {string} [opts.notifications.removedFromChannel.sound] - * The notifications.removed_from_channel.sound - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -754,32 +755,32 @@ ServiceContext.prototype.remove = function remove(callback) { * @param {string} [opts.defaultChannelRoleSid] - The default_channel_role_sid * @param {string} [opts.defaultChannelCreatorRoleSid] - * The default_channel_creator_role_sid - * @param {string} [opts.readStatusEnabled] - The read_status_enabled - * @param {string} [opts.reachabilityEnabled] - The reachability_enabled + * @param {boolean} [opts.readStatusEnabled] - The read_status_enabled + * @param {boolean} [opts.reachabilityEnabled] - The reachability_enabled * @param {number} [opts.typingIndicatorTimeout] - The typing_indicator_timeout * @param {number} [opts.consumptionReportInterval] - * The consumption_report_interval - * @param {string} [opts.notifications.newMessage.enabled] - + * @param {boolean} [opts.notifications.newMessage.enabled] - * The notifications.new_message.enabled * @param {string} [opts.notifications.newMessage.template] - * The notifications.new_message.template * @param {string} [opts.notifications.newMessage.sound] - * The notifications.new_message.sound - * @param {string} [opts.notifications.newMessage.badgeCountEnabled] - + * @param {boolean} [opts.notifications.newMessage.badgeCountEnabled] - * The notifications.new_message.badge_count_enabled - * @param {string} [opts.notifications.addedToChannel.enabled] - + * @param {boolean} [opts.notifications.addedToChannel.enabled] - * The notifications.added_to_channel.enabled * @param {string} [opts.notifications.addedToChannel.template] - * The notifications.added_to_channel.template * @param {string} [opts.notifications.addedToChannel.sound] - * The notifications.added_to_channel.sound - * @param {string} [opts.notifications.removedFromChannel.enabled] - + * @param {boolean} [opts.notifications.removedFromChannel.enabled] - * The notifications.removed_from_channel.enabled * @param {string} [opts.notifications.removedFromChannel.template] - * The notifications.removed_from_channel.template * @param {string} [opts.notifications.removedFromChannel.sound] - * The notifications.removed_from_channel.sound - * @param {string} [opts.notifications.invitedToChannel.enabled] - + * @param {boolean} [opts.notifications.invitedToChannel.enabled] - * The notifications.invited_to_channel.enabled * @param {string} [opts.notifications.invitedToChannel.template] - * The notifications.invited_to_channel.template @@ -809,21 +810,21 @@ ServiceContext.prototype.update = function update(opts, callback) { 'DefaultServiceRoleSid': _.get(opts, 'defaultServiceRoleSid'), 'DefaultChannelRoleSid': _.get(opts, 'defaultChannelRoleSid'), 'DefaultChannelCreatorRoleSid': _.get(opts, 'defaultChannelCreatorRoleSid'), - 'ReadStatusEnabled': _.get(opts, 'readStatusEnabled'), - 'ReachabilityEnabled': _.get(opts, 'reachabilityEnabled'), + 'ReadStatusEnabled': serialize.bool(_.get(opts, 'readStatusEnabled')), + 'ReachabilityEnabled': serialize.bool(_.get(opts, 'reachabilityEnabled')), 'TypingIndicatorTimeout': _.get(opts, 'typingIndicatorTimeout'), 'ConsumptionReportInterval': _.get(opts, 'consumptionReportInterval'), - 'Notifications.NewMessage.Enabled': _.get(opts, 'notifications.newMessage.enabled'), + 'Notifications.NewMessage.Enabled': serialize.bool(_.get(opts, 'notifications.newMessage.enabled')), 'Notifications.NewMessage.Template': _.get(opts, 'notifications.newMessage.template'), 'Notifications.NewMessage.Sound': _.get(opts, 'notifications.newMessage.sound'), - 'Notifications.NewMessage.BadgeCountEnabled': _.get(opts, 'notifications.newMessage.badgeCountEnabled'), - 'Notifications.AddedToChannel.Enabled': _.get(opts, 'notifications.addedToChannel.enabled'), + 'Notifications.NewMessage.BadgeCountEnabled': serialize.bool(_.get(opts, 'notifications.newMessage.badgeCountEnabled')), + 'Notifications.AddedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.addedToChannel.enabled')), 'Notifications.AddedToChannel.Template': _.get(opts, 'notifications.addedToChannel.template'), 'Notifications.AddedToChannel.Sound': _.get(opts, 'notifications.addedToChannel.sound'), - 'Notifications.RemovedFromChannel.Enabled': _.get(opts, 'notifications.removedFromChannel.enabled'), + 'Notifications.RemovedFromChannel.Enabled': serialize.bool(_.get(opts, 'notifications.removedFromChannel.enabled')), 'Notifications.RemovedFromChannel.Template': _.get(opts, 'notifications.removedFromChannel.template'), 'Notifications.RemovedFromChannel.Sound': _.get(opts, 'notifications.removedFromChannel.sound'), - 'Notifications.InvitedToChannel.Enabled': _.get(opts, 'notifications.invitedToChannel.enabled'), + 'Notifications.InvitedToChannel.Enabled': serialize.bool(_.get(opts, 'notifications.invitedToChannel.enabled')), 'Notifications.InvitedToChannel.Template': _.get(opts, 'notifications.invitedToChannel.template'), 'Notifications.InvitedToChannel.Sound': _.get(opts, 'notifications.invitedToChannel.sound'), 'PreWebhookUrl': _.get(opts, 'preWebhookUrl'), diff --git a/lib/rest/ipMessaging/v2/service/channel/message.js b/lib/rest/ipMessaging/v2/service/channel/message.js index 5463b0c88c..60755735aa 100644 --- a/lib/rest/ipMessaging/v2/service/channel/message.js +++ b/lib/rest/ipMessaging/v2/service/channel/message.js @@ -451,7 +451,7 @@ MessagePage.prototype.getInstance = function getInstance(payload) { * @property {string} channelSid - The channel_sid * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated - * @property {string} wasEdited - The was_edited + * @property {boolean} wasEdited - The was_edited * @property {string} from - The from * @property {string} body - The body * @property {number} index - The index diff --git a/lib/rest/ipMessaging/v2/service/user.js b/lib/rest/ipMessaging/v2/service/user.js index 4855aa108e..3251174e36 100644 --- a/lib/rest/ipMessaging/v2/service/user.js +++ b/lib/rest/ipMessaging/v2/service/user.js @@ -439,8 +439,8 @@ UserPage.prototype.getInstance = function getInstance(payload) { * @property {string} friendlyName - The friendly_name * @property {string} roleSid - The role_sid * @property {string} identity - The identity - * @property {string} isOnline - The is_online - * @property {string} isNotifiable - The is_notifiable + * @property {boolean} isOnline - The is_online + * @property {boolean} isNotifiable - The is_notifiable * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {number} joinedChannelsCount - The joined_channels_count diff --git a/lib/rest/taskrouter/v1/workspace.js b/lib/rest/taskrouter/v1/workspace.js index bc53e013fd..55956d8a68 100644 --- a/lib/rest/taskrouter/v1/workspace.js +++ b/lib/rest/taskrouter/v1/workspace.js @@ -14,6 +14,7 @@ var WorkspaceStatisticsList = require( './workspace/workspaceStatistics').WorkspaceStatisticsList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var WorkspaceList; @@ -323,7 +324,7 @@ WorkspaceList = function WorkspaceList(version) { * @param {string} opts.friendlyName - The friendly_name * @param {string} [opts.eventCallbackUrl] - The event_callback_url * @param {string} [opts.eventsFilter] - The events_filter - * @param {string} [opts.multiTaskEnabled] - The multi_task_enabled + * @param {boolean} [opts.multiTaskEnabled] - The multi_task_enabled * @param {string} [opts.template] - The template * @param {workspace.queue_order} [opts.prioritizeQueueOrder] - * The prioritize_queue_order @@ -345,7 +346,7 @@ WorkspaceList = function WorkspaceList(version) { 'FriendlyName': _.get(opts, 'friendlyName'), 'EventCallbackUrl': _.get(opts, 'eventCallbackUrl'), 'EventsFilter': _.get(opts, 'eventsFilter'), - 'MultiTaskEnabled': _.get(opts, 'multiTaskEnabled'), + 'MultiTaskEnabled': serialize.bool(_.get(opts, 'multiTaskEnabled')), 'Template': _.get(opts, 'template'), 'PrioritizeQueueOrder': _.get(opts, 'prioritizeQueueOrder') }); @@ -456,7 +457,7 @@ WorkspacePage.prototype.getInstance = function getInstance(payload) { * @property {string} eventCallbackUrl - The event_callback_url * @property {string} eventsFilter - The events_filter * @property {string} friendlyName - The friendly_name - * @property {string} multiTaskEnabled - The multi_task_enabled + * @property {boolean} multiTaskEnabled - The multi_task_enabled * @property {string} sid - The sid * @property {string} timeoutActivityName - The timeout_activity_name * @property {string} timeoutActivitySid - The timeout_activity_sid @@ -541,7 +542,7 @@ WorkspaceInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.eventCallbackUrl] - The event_callback_url * @param {string} [opts.eventsFilter] - The events_filter * @param {string} [opts.friendlyName] - The friendly_name - * @param {string} [opts.multiTaskEnabled] - The multi_task_enabled + * @param {boolean} [opts.multiTaskEnabled] - The multi_task_enabled * @param {string} [opts.timeoutActivitySid] - The timeout_activity_sid * @param {workspace.queue_order} [opts.prioritizeQueueOrder] - * The prioritize_queue_order @@ -792,7 +793,7 @@ WorkspaceContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.eventCallbackUrl] - The event_callback_url * @param {string} [opts.eventsFilter] - The events_filter * @param {string} [opts.friendlyName] - The friendly_name - * @param {string} [opts.multiTaskEnabled] - The multi_task_enabled + * @param {boolean} [opts.multiTaskEnabled] - The multi_task_enabled * @param {string} [opts.timeoutActivitySid] - The timeout_activity_sid * @param {workspace.queue_order} [opts.prioritizeQueueOrder] - * The prioritize_queue_order @@ -814,7 +815,7 @@ WorkspaceContext.prototype.update = function update(opts, callback) { 'EventCallbackUrl': _.get(opts, 'eventCallbackUrl'), 'EventsFilter': _.get(opts, 'eventsFilter'), 'FriendlyName': _.get(opts, 'friendlyName'), - 'MultiTaskEnabled': _.get(opts, 'multiTaskEnabled'), + 'MultiTaskEnabled': serialize.bool(_.get(opts, 'multiTaskEnabled')), 'TimeoutActivitySid': _.get(opts, 'timeoutActivitySid'), 'PrioritizeQueueOrder': _.get(opts, 'prioritizeQueueOrder') }); diff --git a/lib/rest/taskrouter/v1/workspace/activity.js b/lib/rest/taskrouter/v1/workspace/activity.js index 22d18169a4..642a4575ad 100644 --- a/lib/rest/taskrouter/v1/workspace/activity.js +++ b/lib/rest/taskrouter/v1/workspace/activity.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var ActivityList; @@ -320,7 +321,7 @@ ActivityList = function ActivityList(version, workspaceSid) { * * @param {object} opts - ... * @param {string} opts.friendlyName - The friendly_name - * @param {string} [opts.available] - The available + * @param {boolean} [opts.available] - The available * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed ActivityInstance @@ -337,7 +338,7 @@ ActivityList = function ActivityList(version, workspaceSid) { var deferred = Q.defer(); var data = values.of({ 'FriendlyName': _.get(opts, 'friendlyName'), - 'Available': _.get(opts, 'available') + 'Available': serialize.bool(_.get(opts, 'available')) }); var promise = this._version.create({ @@ -442,7 +443,7 @@ ActivityPage.prototype.getInstance = function getInstance(payload) { * @description Initialize the ActivityContext * * @property {string} accountSid - The account_sid - * @property {string} available - The available + * @property {boolean} available - The available * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {string} friendlyName - The friendly_name diff --git a/lib/rest/taskrouter/v1/workspace/task.js b/lib/rest/taskrouter/v1/workspace/task.js index 31bdb10322..441d814699 100644 --- a/lib/rest/taskrouter/v1/workspace/task.js +++ b/lib/rest/taskrouter/v1/workspace/task.js @@ -6,6 +6,7 @@ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var ReservationList = require('./task/reservation').ReservationList; var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var TaskList; @@ -70,7 +71,7 @@ TaskList = function TaskList(version, workspaceSid) { * @param {string} [opts.taskQueueName] - The task_queue_name * @param {string} [opts.evaluateTaskAttributes] - The evaluate_task_attributes * @param {string} [opts.ordering] - The ordering - * @param {string} [opts.hasAddons] - The has_addons + * @param {boolean} [opts.hasAddons] - The has_addons * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -167,7 +168,7 @@ TaskList = function TaskList(version, workspaceSid) { * @param {string} [opts.taskQueueName] - The task_queue_name * @param {string} [opts.evaluateTaskAttributes] - The evaluate_task_attributes * @param {string} [opts.ordering] - The ordering - * @param {string} [opts.hasAddons] - The has_addons + * @param {boolean} [opts.hasAddons] - The has_addons * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -235,7 +236,7 @@ TaskList = function TaskList(version, workspaceSid) { * @param {string} [opts.taskQueueName] - The task_queue_name * @param {string} [opts.evaluateTaskAttributes] - The evaluate_task_attributes * @param {string} [opts.ordering] - The ordering - * @param {string} [opts.hasAddons] - The has_addons + * @param {boolean} [opts.hasAddons] - The has_addons * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -262,7 +263,7 @@ TaskList = function TaskList(version, workspaceSid) { 'TaskQueueName': _.get(opts, 'taskQueueName'), 'EvaluateTaskAttributes': _.get(opts, 'evaluateTaskAttributes'), 'Ordering': _.get(opts, 'ordering'), - 'HasAddons': _.get(opts, 'hasAddons'), + 'HasAddons': serialize.bool(_.get(opts, 'hasAddons')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -312,7 +313,7 @@ TaskList = function TaskList(version, workspaceSid) { * @param {string} [opts.taskQueueName] - The task_queue_name * @param {string} [opts.evaluateTaskAttributes] - The evaluate_task_attributes * @param {string} [opts.ordering] - The ordering - * @param {string} [opts.hasAddons] - The has_addons + * @param {boolean} [opts.hasAddons] - The has_addons * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/taskrouter/v1/workspace/task/reservation.js b/lib/rest/taskrouter/v1/workspace/task/reservation.js index 37c8e7f51b..f1d7649eb9 100644 --- a/lib/rest/taskrouter/v1/workspace/task/reservation.js +++ b/lib/rest/taskrouter/v1/workspace/task/reservation.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var ReservationList; @@ -489,9 +491,9 @@ ReservationInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.callTo] - The call_to * @param {string} [opts.callUrl] - The call_url * @param {string} [opts.callStatusCallbackUrl] - The call_status_callback_url - * @param {string} [opts.callAccept] - The call_accept + * @param {boolean} [opts.callAccept] - The call_accept * @param {string} [opts.redirectCallSid] - The redirect_call_sid - * @param {string} [opts.redirectAccept] - The redirect_accept + * @param {boolean} [opts.redirectAccept] - The redirect_accept * @param {string} [opts.redirectUrl] - The redirect_url * @param {function} [callback] - Callback to handle processed record * @@ -596,9 +598,9 @@ ReservationContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.callTo] - The call_to * @param {string} [opts.callUrl] - The call_url * @param {string} [opts.callStatusCallbackUrl] - The call_status_callback_url - * @param {string} [opts.callAccept] - The call_accept + * @param {boolean} [opts.callAccept] - The call_accept * @param {string} [opts.redirectCallSid] - The redirect_call_sid - * @param {string} [opts.redirectAccept] - The redirect_accept + * @param {boolean} [opts.redirectAccept] - The redirect_accept * @param {string} [opts.redirectUrl] - The redirect_url * @param {function} [callback] - Callback to handle processed record * @@ -629,9 +631,9 @@ ReservationContext.prototype.update = function update(opts, callback) { 'CallTo': _.get(opts, 'callTo'), 'CallUrl': _.get(opts, 'callUrl'), 'CallStatusCallbackUrl': _.get(opts, 'callStatusCallbackUrl'), - 'CallAccept': _.get(opts, 'callAccept'), + 'CallAccept': serialize.bool(_.get(opts, 'callAccept')), 'RedirectCallSid': _.get(opts, 'redirectCallSid'), - 'RedirectAccept': _.get(opts, 'redirectAccept'), + 'RedirectAccept': serialize.bool(_.get(opts, 'redirectAccept')), 'RedirectUrl': _.get(opts, 'redirectUrl') }); diff --git a/lib/rest/taskrouter/v1/workspace/worker.js b/lib/rest/taskrouter/v1/workspace/worker.js index c9a188b207..27b557471e 100644 --- a/lib/rest/taskrouter/v1/workspace/worker.js +++ b/lib/rest/taskrouter/v1/workspace/worker.js @@ -496,7 +496,7 @@ WorkerPage.prototype.getInstance = function getInstance(payload) { * @property {string} activityName - The activity_name * @property {string} activitySid - The activity_sid * @property {string} attributes - The attributes - * @property {string} available - The available + * @property {boolean} available - The available * @property {Date} dateCreated - The date_created * @property {Date} dateStatusChanged - The date_status_changed * @property {Date} dateUpdated - The date_updated diff --git a/lib/rest/taskrouter/v1/workspace/worker/reservation.js b/lib/rest/taskrouter/v1/workspace/worker/reservation.js index cff4d0ca09..59a00f82aa 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/reservation.js +++ b/lib/rest/taskrouter/v1/workspace/worker/reservation.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var ReservationList; @@ -489,9 +491,9 @@ ReservationInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.callTo] - The call_to * @param {string} [opts.callUrl] - The call_url * @param {string} [opts.callStatusCallbackUrl] - The call_status_callback_url - * @param {string} [opts.callAccept] - The call_accept + * @param {boolean} [opts.callAccept] - The call_accept * @param {string} [opts.redirectCallSid] - The redirect_call_sid - * @param {string} [opts.redirectAccept] - The redirect_accept + * @param {boolean} [opts.redirectAccept] - The redirect_accept * @param {string} [opts.redirectUrl] - The redirect_url * @param {function} [callback] - Callback to handle processed record * @@ -596,9 +598,9 @@ ReservationContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.callTo] - The call_to * @param {string} [opts.callUrl] - The call_url * @param {string} [opts.callStatusCallbackUrl] - The call_status_callback_url - * @param {string} [opts.callAccept] - The call_accept + * @param {boolean} [opts.callAccept] - The call_accept * @param {string} [opts.redirectCallSid] - The redirect_call_sid - * @param {string} [opts.redirectAccept] - The redirect_accept + * @param {boolean} [opts.redirectAccept] - The redirect_accept * @param {string} [opts.redirectUrl] - The redirect_url * @param {function} [callback] - Callback to handle processed record * @@ -629,9 +631,9 @@ ReservationContext.prototype.update = function update(opts, callback) { 'CallTo': _.get(opts, 'callTo'), 'CallUrl': _.get(opts, 'callUrl'), 'CallStatusCallbackUrl': _.get(opts, 'callStatusCallbackUrl'), - 'CallAccept': _.get(opts, 'callAccept'), + 'CallAccept': serialize.bool(_.get(opts, 'callAccept')), 'RedirectCallSid': _.get(opts, 'redirectCallSid'), - 'RedirectAccept': _.get(opts, 'redirectAccept'), + 'RedirectAccept': serialize.bool(_.get(opts, 'redirectAccept')), 'RedirectUrl': _.get(opts, 'redirectUrl') }); diff --git a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js index 1dbe06b963..dddbe5a8a4 100644 --- a/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js +++ b/lib/rest/taskrouter/v1/workspace/worker/workerChannel.js @@ -5,6 +5,8 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require( + '../../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../../base/values'); /* jshint ignore:line */ var WorkerChannelList; @@ -378,7 +380,7 @@ WorkerChannelPage.prototype.getInstance = function getInstance(payload) { * * @property {string} accountSid - The account_sid * @property {number} assignedTasks - The assigned_tasks - * @property {string} available - The available + * @property {boolean} available - The available * @property {number} availableCapacityPercentage - * The available_capacity_percentage * @property {number} configuredCapacity - The configured_capacity @@ -472,7 +474,7 @@ WorkerChannelInstance.prototype.fetch = function fetch(callback) { * * @param {object|function} opts - ... * @param {number} [opts.capacity] - The capacity - * @param {string} [opts.available] - The available + * @param {boolean} [opts.available] - The available * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed WorkerChannelInstance @@ -560,7 +562,7 @@ WorkerChannelContext.prototype.fetch = function fetch(callback) { * * @param {object|function} opts - ... * @param {number} [opts.capacity] - The capacity - * @param {string} [opts.available] - The available + * @param {boolean} [opts.available] - The available * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed WorkerChannelInstance @@ -576,7 +578,7 @@ WorkerChannelContext.prototype.update = function update(opts, callback) { var deferred = Q.defer(); var data = values.of({ 'Capacity': _.get(opts, 'capacity'), - 'Available': _.get(opts, 'available') + 'Available': serialize.bool(_.get(opts, 'available')) }); var promise = this._version.update({ diff --git a/lib/rest/trunking/v1/trunk.js b/lib/rest/trunking/v1/trunk.js index 799550b88e..dc1a327260 100644 --- a/lib/rest/trunking/v1/trunk.js +++ b/lib/rest/trunking/v1/trunk.js @@ -10,6 +10,7 @@ var Page = require('../../../base/Page'); /* jshint ignore:line */ var PhoneNumberList = require('./trunk/phoneNumber').PhoneNumberList; var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var TrunkList; @@ -61,7 +62,7 @@ TrunkList = function TrunkList(version) { * @param {string} [opts.disasterRecoveryUrl] - The disaster_recovery_url * @param {string} [opts.disasterRecoveryMethod] - The disaster_recovery_method * @param {string} [opts.recording] - The recording - * @param {string} [opts.secure] - The secure + * @param {boolean} [opts.secure] - The secure * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -81,7 +82,7 @@ TrunkList = function TrunkList(version) { 'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'), 'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'), 'Recording': _.get(opts, 'recording'), - 'Secure': _.get(opts, 'secure') + 'Secure': serialize.bool(_.get(opts, 'secure')) }); var promise = this._version.create({ @@ -438,7 +439,7 @@ TrunkPage.prototype.getInstance = function getInstance(payload) { * @property {string} disasterRecoveryMethod - The disaster_recovery_method * @property {string} disasterRecoveryUrl - The disaster_recovery_url * @property {string} friendlyName - The friendly_name - * @property {string} secure - The secure + * @property {boolean} secure - The secure * @property {string} recording - The recording * @property {string} authType - The auth_type * @property {string} authTypeSet - The auth_type_set @@ -541,7 +542,7 @@ TrunkInstance.prototype.remove = function remove(callback) { * @param {string} [opts.disasterRecoveryUrl] - The disaster_recovery_url * @param {string} [opts.disasterRecoveryMethod] - The disaster_recovery_method * @param {string} [opts.recording] - The recording - * @param {string} [opts.secure] - The secure + * @param {boolean} [opts.secure] - The secure * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -736,7 +737,7 @@ TrunkContext.prototype.remove = function remove(callback) { * @param {string} [opts.disasterRecoveryUrl] - The disaster_recovery_url * @param {string} [opts.disasterRecoveryMethod] - The disaster_recovery_method * @param {string} [opts.recording] - The recording - * @param {string} [opts.secure] - The secure + * @param {boolean} [opts.secure] - The secure * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed TrunkInstance @@ -756,7 +757,7 @@ TrunkContext.prototype.update = function update(opts, callback) { 'DisasterRecoveryUrl': _.get(opts, 'disasterRecoveryUrl'), 'DisasterRecoveryMethod': _.get(opts, 'disasterRecoveryMethod'), 'Recording': _.get(opts, 'recording'), - 'Secure': _.get(opts, 'secure') + 'Secure': serialize.bool(_.get(opts, 'secure')) }); var promise = this._version.update({ diff --git a/lib/rest/trunking/v1/trunk/originationUrl.js b/lib/rest/trunking/v1/trunk/originationUrl.js index b88b0535cb..0a56d9b932 100644 --- a/lib/rest/trunking/v1/trunk/originationUrl.js +++ b/lib/rest/trunking/v1/trunk/originationUrl.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var OriginationUrlList; @@ -56,7 +57,7 @@ OriginationUrlList = function OriginationUrlList(version, trunkSid) { * @param {object} opts - ... * @param {number} opts.weight - The weight * @param {number} opts.priority - The priority - * @param {string} opts.enabled - The enabled + * @param {boolean} opts.enabled - The enabled * @param {string} opts.friendlyName - The friendly_name * @param {string} opts.sipUrl - The sip_url * @param {function} [callback] - Callback to handle processed record @@ -88,7 +89,7 @@ OriginationUrlList = function OriginationUrlList(version, trunkSid) { var data = values.of({ 'Weight': _.get(opts, 'weight'), 'Priority': _.get(opts, 'priority'), - 'Enabled': _.get(opts, 'enabled'), + 'Enabled': serialize.bool(_.get(opts, 'enabled')), 'FriendlyName': _.get(opts, 'friendlyName'), 'SipUrl': _.get(opts, 'sipUrl') }); @@ -449,7 +450,7 @@ OriginationUrlPage.prototype.getInstance = function getInstance(payload) { * @property {string} sid - The sid * @property {string} trunkSid - The trunk_sid * @property {number} weight - The weight - * @property {string} enabled - The enabled + * @property {boolean} enabled - The enabled * @property {string} sipUrl - The sip_url * @property {string} friendlyName - The friendly_name * @property {number} priority - The priority @@ -548,7 +549,7 @@ OriginationUrlInstance.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {number} [opts.weight] - The weight * @param {number} [opts.priority] - The priority - * @param {string} [opts.enabled] - The enabled + * @param {boolean} [opts.enabled] - The enabled * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.sipUrl] - The sip_url * @param {function} [callback] - Callback to handle processed record @@ -670,7 +671,7 @@ OriginationUrlContext.prototype.remove = function remove(callback) { * @param {object|function} opts - ... * @param {number} [opts.weight] - The weight * @param {number} [opts.priority] - The priority - * @param {string} [opts.enabled] - The enabled + * @param {boolean} [opts.enabled] - The enabled * @param {string} [opts.friendlyName] - The friendly_name * @param {string} [opts.sipUrl] - The sip_url * @param {function} [callback] - Callback to handle processed record @@ -689,7 +690,7 @@ OriginationUrlContext.prototype.update = function update(opts, callback) { var data = values.of({ 'Weight': _.get(opts, 'weight'), 'Priority': _.get(opts, 'priority'), - 'Enabled': _.get(opts, 'enabled'), + 'Enabled': serialize.bool(_.get(opts, 'enabled')), 'FriendlyName': _.get(opts, 'friendlyName'), 'SipUrl': _.get(opts, 'sipUrl') }); diff --git a/lib/rest/trunking/v1/trunk/phoneNumber.js b/lib/rest/trunking/v1/trunk/phoneNumber.js index ac8169e904..82e06ce7bc 100644 --- a/lib/rest/trunking/v1/trunk/phoneNumber.js +++ b/lib/rest/trunking/v1/trunk/phoneNumber.js @@ -429,7 +429,7 @@ PhoneNumberPage.prototype.getInstance = function getInstance(payload) { * @property {phone_number.address_requirement} addressRequirements - * The address_requirements * @property {string} apiVersion - The api_version - * @property {string} beta - The beta + * @property {boolean} beta - The beta * @property {string} capabilities - The capabilities * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated @@ -447,7 +447,7 @@ PhoneNumberPage.prototype.getInstance = function getInstance(payload) { * @property {string} trunkSid - The trunk_sid * @property {string} url - The url * @property {string} voiceApplicationSid - The voice_application_sid - * @property {string} voiceCallerIdLookup - The voice_caller_id_lookup + * @property {boolean} voiceCallerIdLookup - The voice_caller_id_lookup * @property {string} voiceFallbackMethod - The voice_fallback_method * @property {string} voiceFallbackUrl - The voice_fallback_url * @property {string} voiceMethod - The voice_method diff --git a/lib/rest/video/v1/recording.js b/lib/rest/video/v1/recording.js index 140e0595dc..bbbd048ebd 100644 --- a/lib/rest/video/v1/recording.js +++ b/lib/rest/video/v1/recording.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../base/values'); /* jshint ignore:line */ var RecordingList; @@ -61,6 +62,8 @@ RecordingList = function RecordingList(version) { * @param {recording.status} [opts.status] - The status * @param {string} [opts.sourceSid] - The source_sid * @param {string|list} [opts.groupingSid] - The grouping_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -152,6 +155,8 @@ RecordingList = function RecordingList(version) { * @param {recording.status} [opts.status] - The status * @param {string} [opts.sourceSid] - The source_sid * @param {string|list} [opts.groupingSid] - The grouping_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -214,6 +219,8 @@ RecordingList = function RecordingList(version) { * @param {recording.status} [opts.status] - The status * @param {string} [opts.sourceSid] - The source_sid * @param {string|list} [opts.groupingSid] - The grouping_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -235,6 +242,8 @@ RecordingList = function RecordingList(version) { 'Status': _.get(opts, 'status'), 'SourceSid': _.get(opts, 'sourceSid'), 'GroupingSid': _.get(opts, 'groupingSid'), + 'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')), + 'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -279,6 +288,8 @@ RecordingList = function RecordingList(version) { * @param {recording.status} [opts.status] - The status * @param {string} [opts.sourceSid] - The source_sid * @param {string|list} [opts.groupingSid] - The grouping_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/lib/rest/video/v1/room.js b/lib/rest/video/v1/room.js index 973b284ab7..43721a2f82 100644 --- a/lib/rest/video/v1/room.js +++ b/lib/rest/video/v1/room.js @@ -53,13 +53,13 @@ RoomList = function RoomList(version) { * @instance * * @param {object|function} opts - ... - * @param {string} [opts.enableTurn] - The enable_turn + * @param {boolean} [opts.enableTurn] - The enable_turn * @param {room.room_type} [opts.type] - The type * @param {string} [opts.uniqueName] - The unique_name * @param {string} [opts.statusCallback] - The status_callback * @param {string} [opts.statusCallbackMethod] - The status_callback_method * @param {number} [opts.maxParticipants] - The max_participants - * @param {string} [opts.recordParticipantsOnConnect] - + * @param {boolean} [opts.recordParticipantsOnConnect] - * The record_participants_on_connect * @param {function} [callback] - Callback to handle processed record * @@ -75,13 +75,13 @@ RoomList = function RoomList(version) { var deferred = Q.defer(); var data = values.of({ - 'EnableTurn': _.get(opts, 'enableTurn'), + 'EnableTurn': serialize.bool(_.get(opts, 'enableTurn')), 'Type': _.get(opts, 'type'), 'UniqueName': _.get(opts, 'uniqueName'), 'StatusCallback': _.get(opts, 'statusCallback'), 'StatusCallbackMethod': _.get(opts, 'statusCallbackMethod'), 'MaxParticipants': _.get(opts, 'maxParticipants'), - 'RecordParticipantsOnConnect': _.get(opts, 'recordParticipantsOnConnect') + 'RecordParticipantsOnConnect': serialize.bool(_.get(opts, 'recordParticipantsOnConnect')) }); var promise = this._version.create({ @@ -462,7 +462,7 @@ RoomPage.prototype.getInstance = function getInstance(payload) { * @property {Date} dateCreated - The date_created * @property {Date} dateUpdated - The date_updated * @property {string} accountSid - The account_sid - * @property {string} enableTurn - The enable_turn + * @property {boolean} enableTurn - The enable_turn * @property {string} uniqueName - The unique_name * @property {string} statusCallback - The status_callback * @property {string} statusCallbackMethod - The status_callback_method @@ -470,7 +470,7 @@ RoomPage.prototype.getInstance = function getInstance(payload) { * @property {number} duration - The duration * @property {room.room_type} type - The type * @property {number} maxParticipants - The max_participants - * @property {string} recordParticipantsOnConnect - + * @property {boolean} recordParticipantsOnConnect - * The record_participants_on_connect * @property {string} url - The url * @property {string} links - The links diff --git a/lib/rest/video/v1/room/recording.js b/lib/rest/video/v1/room/recording.js index cf11b1cebb..67f0cd97c8 100644 --- a/lib/rest/video/v1/room/recording.js +++ b/lib/rest/video/v1/room/recording.js @@ -5,6 +5,7 @@ var _ = require('lodash'); /* jshint ignore:line */ var Page = require('../../../../base/Page'); /* jshint ignore:line */ var deserialize = require( '../../../../base/deserialize'); /* jshint ignore:line */ +var serialize = require('../../../../base/serialize'); /* jshint ignore:line */ var values = require('../../../../base/values'); /* jshint ignore:line */ var RoomRecordingList; @@ -61,6 +62,10 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) { * @instance * * @param {object|function} opts - ... + * @param {room_recording.status} [opts.status] - The status + * @param {string} [opts.sourceSid] - The source_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -149,6 +154,10 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) { * @instance * * @param {object|function} opts - ... + * @param {room_recording.status} [opts.status] - The status + * @param {string} [opts.sourceSid] - The source_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -208,6 +217,10 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) { * @instance * * @param {object|function} opts - ... + * @param {room_recording.status} [opts.status] - The status + * @param {string} [opts.sourceSid] - The source_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -218,10 +231,18 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) { */ /* jshint ignore:end */ RoomRecordingListInstance.page = function page(opts, callback) { + if (_.isFunction(opts)) { + callback = opts; + opts = {}; + } opts = opts || {}; var deferred = Q.defer(); var data = values.of({ + 'Status': _.get(opts, 'status'), + 'SourceSid': _.get(opts, 'sourceSid'), + 'DateCreatedAfter': serialize.iso8601DateTime(_.get(opts, 'dateCreatedAfter')), + 'DateCreatedBefore': serialize.iso8601DateTime(_.get(opts, 'dateCreatedBefore')), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize @@ -263,6 +284,10 @@ RoomRecordingList = function RoomRecordingList(version, roomSid) { * @memberof Twilio.Video.V1.RoomContext.RoomRecordingList * @instance * + * @param {room_recording.status} [opts.status] - The status + * @param {string} [opts.sourceSid] - The source_sid + * @param {Date} [opts.dateCreatedAfter] - The date_created_after + * @param {Date} [opts.dateCreatedBefore] - The date_created_before * @param {string} [targetUrl] - API-generated URL for the requested results page * @param {function} [callback] - Callback to handle list of records * diff --git a/spec/integration/rest/api/v2010/account/call/recording.spec.js b/spec/integration/rest/api/v2010/account/call/recording.spec.js index a85fac8fa3..0dd2a1d68a 100644 --- a/spec/integration/rest/api/v2010/account/call/recording.spec.js +++ b/spec/integration/rest/api/v2010/account/call/recording.spec.js @@ -59,7 +59,13 @@ describe('Recording', function() { 'duration': '6', 'price': null, 'sid': 'REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', + 'encryption_type': 'public-key', + 'encryption_details': { + 'encryption_public_key_sid': 'CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'encryption_cek': 'OV4h6zrsxMIW7h0Zfqwfn6TI2GCNl54KALlg8wn8YB8KYZhXt6HlgvBWAmQTlfYVeLWydMiCewY0YkDDT1xmNe5huEo9vjuKBS5OmYK4CZkSx1NVv3XOGrZHpd2Pl/5WJHVhUK//AUO87uh5qnUP2E0KoLh1nyCLeGcEkXU0RfpPn/6nxjof/n6m6OzZOyeIRK4Oed5+rEtjqFDfqT0EVKjs6JAxv+f0DCc1xYRHl2yV8bahUPVKs+bHYdy4PVszFKa76M/Uae4jFA9Lv233JqWcxj+K2UoghuGhAFbV/JQIIswY2CBYI8JlVSifSqNEl9vvsTJ8bkVMm3MKbG2P7Q==', + 'encryption_iv': '8I2hhNIYNTrwxfHk' + } }); holodeck.mock(new Response(200, body)); @@ -168,7 +174,13 @@ describe('Recording', function() { 'duration': '6', 'price': null, 'sid': 'REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', + 'encryption_type': 'public-key', + 'encryption_details': { + 'encryption_public_key_sid': 'CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'encryption_cek': 'OV4h6zrsxMIW7h0Zfqwfn6TI2GCNl54KALlg8wn8YB8KYZhXt6HlgvBWAmQTlfYVeLWydMiCewY0YkDDT1xmNe5huEo9vjuKBS5OmYK4CZkSx1NVv3XOGrZHpd2Pl/5WJHVhUK//AUO87uh5qnUP2E0KoLh1nyCLeGcEkXU0RfpPn/6nxjof/n6m6OzZOyeIRK4Oed5+rEtjqFDfqT0EVKjs6JAxv+f0DCc1xYRHl2yV8bahUPVKs+bHYdy4PVszFKa76M/Uae4jFA9Lv233JqWcxj+K2UoghuGhAFbV/JQIIswY2CBYI8JlVSifSqNEl9vvsTJ8bkVMm3MKbG2P7Q==', + 'encryption_iv': '8I2hhNIYNTrwxfHk' + } } ], 'start': 0, diff --git a/spec/integration/rest/api/v2010/account/key.spec.js b/spec/integration/rest/api/v2010/account/key.spec.js index 67453922e4..5643ba16d8 100644 --- a/spec/integration/rest/api/v2010/account/key.spec.js +++ b/spec/integration/rest/api/v2010/account/key.spec.js @@ -193,7 +193,7 @@ describe('Key', function() { } ], 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', - 'end': 3, + 'end': 0, 'previous_page_uri': null, 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', 'page_size': 50, @@ -220,7 +220,7 @@ describe('Key', function() { var body = JSON.stringify({ 'keys': [], 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', - 'end': 3, + 'end': 0, 'previous_page_uri': null, 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', 'page_size': 50, diff --git a/spec/integration/rest/api/v2010/account/recording.spec.js b/spec/integration/rest/api/v2010/account/recording.spec.js index 4208a197dc..f6115fb8ef 100644 --- a/spec/integration/rest/api/v2010/account/recording.spec.js +++ b/spec/integration/rest/api/v2010/account/recording.spec.js @@ -61,7 +61,13 @@ describe('Recording', function() { 'status': 'completed', 'channels': 1, 'source': 'Trunking', - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', + 'encryption_type': 'public-key', + 'encryption_details': { + 'encryption_public_key_sid': 'CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'encryption_cek': 'OV4h6zrsxMIW7h0Zfqwfn6TI2GCNl54KALlg8wn8YB8KYZhXt6HlgvBWAmQTlfYVeLWydMiCewY0YkDDT1xmNe5huEo9vjuKBS5OmYK4CZkSx1NVv3XOGrZHpd2Pl/5WJHVhUK//AUO87uh5qnUP2E0KoLh1nyCLeGcEkXU0RfpPn/6nxjof/n6m6OzZOyeIRK4Oed5+rEtjqFDfqT0EVKjs6JAxv+f0DCc1xYRHl2yV8bahUPVKs+bHYdy4PVszFKa76M/Uae4jFA9Lv233JqWcxj+K2UoghuGhAFbV/JQIIswY2CBYI8JlVSifSqNEl9vvsTJ8bkVMm3MKbG2P7Q==', + 'encryption_iv': '8I2hhNIYNTrwxfHk' + } }); holodeck.mock(new Response(200, body)); @@ -168,7 +174,13 @@ describe('Recording', function() { 'status': 'completed', 'channels': 1, 'source': 'Trunking', - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/REaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', + 'encryption_type': 'public-key', + 'encryption_details': { + 'encryption_public_key_sid': 'CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'encryption_cek': 'OV4h6zrsxMIW7h0Zfqwfn6TI2GCNl54KALlg8wn8YB8KYZhXt6HlgvBWAmQTlfYVeLWydMiCewY0YkDDT1xmNe5huEo9vjuKBS5OmYK4CZkSx1NVv3XOGrZHpd2Pl/5WJHVhUK//AUO87uh5qnUP2E0KoLh1nyCLeGcEkXU0RfpPn/6nxjof/n6m6OzZOyeIRK4Oed5+rEtjqFDfqT0EVKjs6JAxv+f0DCc1xYRHl2yV8bahUPVKs+bHYdy4PVszFKa76M/Uae4jFA9Lv233JqWcxj+K2UoghuGhAFbV/JQIIswY2CBYI8JlVSifSqNEl9vvsTJ8bkVMm3MKbG2P7Q==', + 'encryption_iv': '8I2hhNIYNTrwxfHk' + } } ], 'start': 0, diff --git a/spec/integration/rest/api/v2010/account/signingKey.spec.js b/spec/integration/rest/api/v2010/account/signingKey.spec.js index 8d02efece1..a0740ac5dd 100644 --- a/spec/integration/rest/api/v2010/account/signingKey.spec.js +++ b/spec/integration/rest/api/v2010/account/signingKey.spec.js @@ -192,10 +192,10 @@ describe('SigningKey', function() { 'date_updated': 'Mon, 13 Jun 2016 22:50:08 +0000' } ], - 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', - 'end': 3, + 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0', + 'end': 0, 'previous_page_uri': null, - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0', 'page_size': 50, 'start': 0, 'next_page_uri': null, @@ -219,10 +219,10 @@ describe('SigningKey', function() { function() { var body = JSON.stringify({ 'signing_keys': [], - 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', - 'end': 3, + 'first_page_uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0', + 'end': 0, 'previous_page_uri': null, - 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Keys.json?PageSize=50&Page=0', + 'uri': '/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SigningKeys.json?PageSize=50&Page=0', 'page_size': 50, 'start': 0, 'next_page_uri': null, diff --git a/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js b/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js index 246d632656..32960de338 100644 --- a/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js +++ b/spec/integration/rest/trunking/v1/trunk/originationUrl.spec.js @@ -9,6 +9,8 @@ var Response = require( var RestException = require( '../../../../../../lib/base/RestException'); /* jshint ignore:line */ var Twilio = require('../../../../../../lib'); /* jshint ignore:line */ +var serialize = require( + '../../../../../../lib/base/serialize'); /* jshint ignore:line */ var client; @@ -145,7 +147,7 @@ describe('OriginationUrl', function() { var values = { Weight: 1, Priority: 1, - Enabled: true, + Enabled: serialize.bool(true), FriendlyName: 'friendlyName', SipUrl: 'https://example.com', }; diff --git a/spec/integration/rest/video/v1/recording.spec.js b/spec/integration/rest/video/v1/recording.spec.js index dc3a34b94a..f200acf31c 100644 --- a/spec/integration/rest/video/v1/recording.spec.js +++ b/spec/integration/rest/video/v1/recording.spec.js @@ -125,6 +125,54 @@ describe('Recording', function() { promise.done(); } ); + it('should generate valid read_results response', + function() { + var body = JSON.stringify({ + 'recordings': [ + { + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'status': 'completed', + 'date_created': '2015-07-30T20:00:00Z', + 'sid': 'RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'source_sid': 'MTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'size': 23, + 'type': 'audio', + 'duration': 10, + 'container_format': 'mka', + 'codec': 'OPUS', + 'grouping_sids': { + 'room_sid': 'RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'participant_sid': 'PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + }, + 'url': 'https://video.twilio.com/v1/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'media': 'https://video.twilio.com/v1/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media' + } + } + ], + 'meta': { + 'page': 0, + 'page_size': 50, + 'first_page_url': 'https://video.twilio.com/v1/Recordings?PageSize=50&Page=0', + 'previous_page_url': null, + 'url': 'https://video.twilio.com/v1/Recordings?PageSize=50&Page=0', + 'next_page_url': null, + 'key': 'recordings' + } + }); + + holodeck.mock(new Response(200, body)); + + var promise = client.video.v1.recordings.list(); + promise = promise.then(function(response) { + expect(response).toBeDefined(); + }, function() { + throw new Error('failed'); + }); + + promise.done(); + } + ); it('should generate valid remove request', function() { holodeck.mock(new Response(500, '{}')); diff --git a/spec/integration/rest/video/v1/room/recording.spec.js b/spec/integration/rest/video/v1/room/recording.spec.js index 107ef5c873..9f9a002409 100644 --- a/spec/integration/rest/video/v1/room/recording.spec.js +++ b/spec/integration/rest/video/v1/room/recording.spec.js @@ -144,13 +144,14 @@ describe('RoomRecording', function() { 'date_created': '2015-07-30T20:00:00Z', 'sid': 'RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'source_sid': 'MTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'size': 0, + 'size': 23, 'type': 'audio', - 'duration': 0, + 'duration': 10, 'container_format': 'mka', 'codec': 'OPUS', 'grouping_sids': { - 'room_sid': 'RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + 'room_sid': 'RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'participant_sid': 'PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'room_sid': 'RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',