Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update resources after sorting #493

Merged
merged 1 commit into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/rest/Authy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var V1 = require('./authy/V1'); /* jshint ignore:line */
* @constructor Twilio.Authy
*
* @property {Twilio.Authy.V1} v1 - v1 version
* @property {Twilio.Authy.V1.ServiceList} services - services resource
* @property {Twilio.Authy.V1.FormList} forms - forms resource
* @property {Twilio.Authy.V1.ServiceList} services - services resource
*
* @param {Twilio} twilio - The twilio client
*/
Expand All @@ -46,16 +46,16 @@ Object.defineProperty(Authy.prototype,
});

Object.defineProperty(Authy.prototype,
'services', {
'forms', {
get: function() {
return this.v1.services;
return this.v1.forms;
}
});

Object.defineProperty(Authy.prototype,
'forms', {
'services', {
get: function() {
return this.v1.forms;
return this.v1.services;
}
});

Expand Down
20 changes: 10 additions & 10 deletions lib/rest/FlexApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ var V1 = require('./flexApi/V1'); /* jshint ignore:line */
* @constructor Twilio.FlexApi
*
* @property {Twilio.FlexApi.V1} v1 - v1 version
* @property {Twilio.FlexApi.V1.FlexFlowList} flexFlow - flexFlow resource
* @property {Twilio.FlexApi.V1.ChannelList} channel - channel resource
* @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
* @property {Twilio.FlexApi.V1.ConfigurationList} configuration -
* configuration resource
* @property {Twilio.FlexApi.V1.FlexFlowList} flexFlow - flexFlow resource
* @property {Twilio.FlexApi.V1.WebChannelList} webChannel - webChannel resource
*
* @param {Twilio} twilio - The twilio client
*/
Expand All @@ -49,30 +49,30 @@ Object.defineProperty(FlexApi.prototype,
});

Object.defineProperty(FlexApi.prototype,
'flexFlow', {
'channel', {
get: function() {
return this.v1.flexFlow;
return this.v1.channel;
}
});

Object.defineProperty(FlexApi.prototype,
'channel', {
'configuration', {
get: function() {
return this.v1.channel;
return this.v1.configuration;
}
});

Object.defineProperty(FlexApi.prototype,
'webChannel', {
'flexFlow', {
get: function() {
return this.v1.webChannel;
return this.v1.flexFlow;
}
});

Object.defineProperty(FlexApi.prototype,
'configuration', {
'webChannel', {
get: function() {
return this.v1.configuration;
return this.v1.webChannel;
}
});

Expand Down
10 changes: 5 additions & 5 deletions lib/rest/Messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var V1 = require('./messaging/V1'); /* jshint ignore:line */
* @constructor Twilio.Messaging
*
* @property {Twilio.Messaging.V1} v1 - v1 version
* @property {Twilio.Messaging.V1.SessionList} sessions - sessions resource
* @property {Twilio.Messaging.V1.ServiceList} services - services resource
* @property {Twilio.Messaging.V1.SessionList} sessions - sessions resource
* @property {Twilio.Messaging.V1.WebhookList} webhooks - webhooks resource
*
* @param {Twilio} twilio - The twilio client
Expand All @@ -47,16 +47,16 @@ Object.defineProperty(Messaging.prototype,
});

Object.defineProperty(Messaging.prototype,
'sessions', {
'services', {
get: function() {
return this.v1.sessions;
return this.v1.services;
}
});

Object.defineProperty(Messaging.prototype,
'services', {
'sessions', {
get: function() {
return this.v1.services;
return this.v1.sessions;
}
});

Expand Down
34 changes: 17 additions & 17 deletions lib/rest/Preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
* authorizationDocuments resource
* @property {Twilio.Preview.HostedNumbers.HostedNumberOrderList} hostedNumberOrders -
* hostedNumberOrders resource
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
* @property {Twilio.Preview.Marketplace.AvailableAddOnList} availableAddOns -
* availableAddOns resource
* @property {Twilio.Preview.Marketplace.InstalledAddOnList} installedAddOns -
* installedAddOns resource
* @property {Twilio.Preview.Sync.ServiceList} services - services resource
* @property {Twilio.Preview.Understand.AssistantList} assistants -
* assistants resource
Expand All @@ -60,12 +60,12 @@ var Wireless = require('./preview/Wireless'); /* jshint ignore:line */
* @property {Twilio.Preview.Wireless.SimList} sims - sims resource
* @property {Twilio.Preview.TrustedComms.BrandedCallList} brandedCalls -
* brandedCalls resource
* @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource
* @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -
* currentCalls resource
* @property {Twilio.Preview.TrustedComms.DeviceList} devices - devices resource
* @property {Twilio.Preview.TrustedComms.PhoneCallList} phoneCalls -
* phoneCalls resource
* @property {Twilio.Preview.TrustedComms.CurrentCallList} currentCalls -
* currentCalls resource
* @property {Twilio.Preview.TrustedComms.CpsList} cps - cps resource
*
* @param {Twilio} twilio - The twilio client
*/
Expand Down Expand Up @@ -196,16 +196,16 @@ Object.defineProperty(Preview.prototype,
});

Object.defineProperty(Preview.prototype,
'installedAddOns', {
'availableAddOns', {
get: function() {
return this.marketplace.installedAddOns;
return this.marketplace.availableAddOns;
}
});

Object.defineProperty(Preview.prototype,
'availableAddOns', {
'installedAddOns', {
get: function() {
return this.marketplace.availableAddOns;
return this.marketplace.installedAddOns;
}
});

Expand Down Expand Up @@ -252,30 +252,30 @@ Object.defineProperty(Preview.prototype,
});

Object.defineProperty(Preview.prototype,
'devices', {
'cps', {
get: function() {
return this.trusted_comms.devices;
return this.trusted_comms.cps;
}
});

Object.defineProperty(Preview.prototype,
'phoneCalls', {
'currentCalls', {
get: function() {
return this.trusted_comms.phoneCalls;
return this.trusted_comms.currentCalls;
}
});

Object.defineProperty(Preview.prototype,
'currentCalls', {
'devices', {
get: function() {
return this.trusted_comms.currentCalls;
return this.trusted_comms.devices;
}
});

Object.defineProperty(Preview.prototype,
'cps', {
'phoneCalls', {
get: function() {
return this.trusted_comms.cps;
return this.trusted_comms.phoneCalls;
}
});

Expand Down
16 changes: 8 additions & 8 deletions lib/rest/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ var V1 = require('./video/V1'); /* jshint ignore:line */
* @constructor Twilio.Video
*
* @property {Twilio.Video.V1} v1 - v1 version
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
* @property {Twilio.Video.V1.CompositionHookList} compositionHooks -
* compositionHooks resource
* @property {Twilio.Video.V1.CompositionSettingsList} compositionSettings -
* compositionSettings resource
* @property {Twilio.Video.V1.RecordingList} recordings - recordings resource
* @property {Twilio.Video.V1.RecordingSettingsList} recordingSettings -
* recordingSettings resource
* @property {Twilio.Video.V1.CompositionList} compositions - compositions resource
* @property {Twilio.Video.V1.RoomList} rooms - rooms resource
*
* @param {Twilio} twilio - The twilio client
Expand All @@ -52,6 +52,13 @@ Object.defineProperty(Video.prototype,
}
});

Object.defineProperty(Video.prototype,
'compositions', {
get: function() {
return this.v1.compositions;
}
});

Object.defineProperty(Video.prototype,
'compositionHooks', {
get: function() {
Expand Down Expand Up @@ -80,13 +87,6 @@ Object.defineProperty(Video.prototype,
}
});

Object.defineProperty(Video.prototype,
'compositions', {
get: function() {
return this.v1.compositions;
}
});

Object.defineProperty(Video.prototype,
'rooms', {
get: function() {
Expand Down
16 changes: 8 additions & 8 deletions lib/rest/Wireless.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ var V1 = require('./wireless/V1'); /* jshint ignore:line */
* @constructor Twilio.Wireless
*
* @property {Twilio.Wireless.V1} v1 - v1 version
* @property {Twilio.Wireless.V1.CommandList} commands - commands resource
* @property {Twilio.Wireless.V1.RatePlanList} ratePlans - ratePlans resource
* @property {Twilio.Wireless.V1.UsageRecordList} usageRecords -
* usageRecords resource
* @property {Twilio.Wireless.V1.CommandList} commands - commands resource
* @property {Twilio.Wireless.V1.RatePlanList} ratePlans - ratePlans resource
* @property {Twilio.Wireless.V1.SimList} sims - sims resource
*
* @param {Twilio} twilio - The twilio client
Expand All @@ -49,23 +49,23 @@ Object.defineProperty(Wireless.prototype,
});

Object.defineProperty(Wireless.prototype,
'commands', {
'usageRecords', {
get: function() {
return this.v1.commands;
return this.v1.usageRecords;
}
});

Object.defineProperty(Wireless.prototype,
'ratePlans', {
'commands', {
get: function() {
return this.v1.ratePlans;
return this.v1.commands;
}
});

Object.defineProperty(Wireless.prototype,
'usageRecords', {
'ratePlans', {
get: function() {
return this.v1.usageRecords;
return this.v1.ratePlans;
}
});

Expand Down
16 changes: 8 additions & 8 deletions lib/rest/authy/V1.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ var Version = require('../../base/Version'); /* jshint ignore:line */
*
* @constructor Twilio.Authy.V1
*
* @property {Twilio.Authy.V1.ServiceList} services - services resource
* @property {Twilio.Authy.V1.FormList} forms - forms resource
* @property {Twilio.Authy.V1.ServiceList} services - services resource
*
* @param {Twilio.Authy} domain - The twilio domain
*/
Expand All @@ -31,26 +31,26 @@ function V1(domain) {
Version.prototype.constructor.call(this, domain, 'v1');

// Resources
this._services = undefined;
this._forms = undefined;
this._services = undefined;
}

_.extend(V1.prototype, Version.prototype);
V1.prototype.constructor = V1;

Object.defineProperty(V1.prototype,
'services', {
'forms', {
get: function() {
this._services = this._services || new ServiceList(this);
return this._services;
this._forms = this._forms || new FormList(this);
return this._forms;
}
});

Object.defineProperty(V1.prototype,
'forms', {
'services', {
get: function() {
this._forms = this._forms || new FormList(this);
return this._forms;
this._services = this._services || new ServiceList(this);
return this._services;
}
});

Expand Down
Loading