From 1b1f1fb808533f024b6c94e37d5f46bfb6202140 Mon Sep 17 00:00:00 2001 From: Sam Harrison Date: Tue, 22 Oct 2019 16:48:11 -0700 Subject: [PATCH] Update resources after sorting --- lib/twilio-ruby/rest/authy.rb | 16 ++++---- lib/twilio-ruby/rest/authy/v1.rb | 30 +++++++------- lib/twilio-ruby/rest/flex_api.rb | 30 +++++++------- lib/twilio-ruby/rest/flex_api/v1.rb | 40 +++++++++---------- lib/twilio-ruby/rest/messaging.rb | 18 ++++----- lib/twilio-ruby/rest/messaging/v1.rb | 26 ++++++------ lib/twilio-ruby/rest/preview.rb | 40 +++++++++---------- lib/twilio-ruby/rest/preview/marketplace.rb | 26 ++++++------ lib/twilio-ruby/rest/preview/trusted_comms.rb | 28 ++++++------- lib/twilio-ruby/rest/video.rb | 18 ++++----- lib/twilio-ruby/rest/video/v1.rb | 30 +++++++------- lib/twilio-ruby/rest/wireless.rb | 12 +++--- lib/twilio-ruby/rest/wireless/v1.rb | 14 +++---- 13 files changed, 164 insertions(+), 164 deletions(-) diff --git a/lib/twilio-ruby/rest/authy.rb b/lib/twilio-ruby/rest/authy.rb index 1f9ab5d5d..695326930 100644 --- a/lib/twilio-ruby/rest/authy.rb +++ b/lib/twilio-ruby/rest/authy.rb @@ -28,14 +28,6 @@ def v1 @v1 ||= V1.new self end - ## - # @param [String] sid A 34 character string that uniquely identifies this Service. - # @return [Twilio::REST::Authy::V1::ServiceInstance] if sid was passed. - # @return [Twilio::REST::Authy::V1::ServiceList] - def services(sid=:unset) - self.v1.services(sid) - end - ## # @param [form.FormTypes] form_type The Type of this Form. One of `form-app-push`, # `form-sms` or `form-totp`. @@ -45,6 +37,14 @@ def forms(form_type=:unset) self.v1.forms(form_type) end + ## + # @param [String] sid A 34 character string that uniquely identifies this Service. + # @return [Twilio::REST::Authy::V1::ServiceInstance] if sid was passed. + # @return [Twilio::REST::Authy::V1::ServiceList] + def services(sid=:unset) + self.v1.services(sid) + end + ## # Provide a user friendly representation def to_s diff --git a/lib/twilio-ruby/rest/authy/v1.rb b/lib/twilio-ruby/rest/authy/v1.rb index 9eb5840dc..bb61a9124 100644 --- a/lib/twilio-ruby/rest/authy/v1.rb +++ b/lib/twilio-ruby/rest/authy/v1.rb @@ -15,22 +15,8 @@ class V1 < Version def initialize(domain) super @version = 'v1' - @services = nil @forms = nil - end - - ## - # @param [String] sid A 34 character string that uniquely identifies this Service. - # @return [Twilio::REST::Authy::V1::ServiceContext] if sid was passed. - # @return [Twilio::REST::Authy::V1::ServiceList] - def services(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @services ||= ServiceList.new self - else - ServiceContext.new(self, sid) - end + @services = nil end ## @@ -48,6 +34,20 @@ def forms(form_type=:unset) end end + ## + # @param [String] sid A 34 character string that uniquely identifies this Service. + # @return [Twilio::REST::Authy::V1::ServiceContext] if sid was passed. + # @return [Twilio::REST::Authy::V1::ServiceList] + def services(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset + @services ||= ServiceList.new self + else + ServiceContext.new(self, sid) + end + end + ## # Provide a user friendly representation def to_s diff --git a/lib/twilio-ruby/rest/flex_api.rb b/lib/twilio-ruby/rest/flex_api.rb index 190dd6536..fc76038bd 100644 --- a/lib/twilio-ruby/rest/flex_api.rb +++ b/lib/twilio-ruby/rest/flex_api.rb @@ -28,15 +28,6 @@ def v1 @v1 ||= V1.new self end - ## - # @param [String] sid The unique string that we created to identify the FlexFlow - # resource. - # @return [Twilio::REST::Flex_api::V1::FlexFlowInstance] if sid was passed. - # @return [Twilio::REST::Flex_api::V1::FlexFlowList] - def flex_flow(sid=:unset) - self.v1.flex_flow(sid) - end - ## # @param [String] sid The unique string that we created to identify the Channel # resource. @@ -46,6 +37,21 @@ def channel(sid=:unset) self.v1.channel(sid) end + ## + # @return [Twilio::REST::Flex_api::V1::ConfigurationInstance] + def configuration + self.v1.configuration() + end + + ## + # @param [String] sid The unique string that we created to identify the FlexFlow + # resource. + # @return [Twilio::REST::Flex_api::V1::FlexFlowInstance] if sid was passed. + # @return [Twilio::REST::Flex_api::V1::FlexFlowList] + def flex_flow(sid=:unset) + self.v1.flex_flow(sid) + end + ## # @param [String] sid The unique string that we created to identify the WebChannel # resource. @@ -55,12 +61,6 @@ def web_channel(sid=:unset) self.v1.web_channel(sid) end - ## - # @return [Twilio::REST::Flex_api::V1::ConfigurationInstance] - def configuration - self.v1.configuration() - end - ## # Provide a user friendly representation def to_s diff --git a/lib/twilio-ruby/rest/flex_api/v1.rb b/lib/twilio-ruby/rest/flex_api/v1.rb index bb94f7d83..e88728c1d 100644 --- a/lib/twilio-ruby/rest/flex_api/v1.rb +++ b/lib/twilio-ruby/rest/flex_api/v1.rb @@ -15,37 +15,43 @@ class V1 < Version def initialize(domain) super @version = 'v1' - @flex_flow = nil @channel = nil - @web_channel = nil @configuration = nil + @flex_flow = nil + @web_channel = nil end ## - # @param [String] sid The SID of the FlexFlow resource to fetch. - # @return [Twilio::REST::Flex_api::V1::FlexFlowContext] if sid was passed. - # @return [Twilio::REST::Flex_api::V1::FlexFlowList] - def flex_flow(sid=:unset) + # @param [String] sid The SID of the Flex chat channel resource to fetch. + # @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed. + # @return [Twilio::REST::Flex_api::V1::ChannelList] + def channel(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @flex_flow ||= FlexFlowList.new self + @channel ||= ChannelList.new self else - FlexFlowContext.new(self, sid) + ChannelContext.new(self, sid) end end ## - # @param [String] sid The SID of the Flex chat channel resource to fetch. - # @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed. - # @return [Twilio::REST::Flex_api::V1::ChannelList] - def channel(sid=:unset) + # @return [Twilio::REST::Flex_api::V1::ConfigurationContext] + def configuration + @configuration ||= ConfigurationContext.new self + end + + ## + # @param [String] sid The SID of the FlexFlow resource to fetch. + # @return [Twilio::REST::Flex_api::V1::FlexFlowContext] if sid was passed. + # @return [Twilio::REST::Flex_api::V1::FlexFlowList] + def flex_flow(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @channel ||= ChannelList.new self + @flex_flow ||= FlexFlowList.new self else - ChannelContext.new(self, sid) + FlexFlowContext.new(self, sid) end end @@ -63,12 +69,6 @@ def web_channel(sid=:unset) end end - ## - # @return [Twilio::REST::Flex_api::V1::ConfigurationContext] - def configuration - @configuration ||= ConfigurationContext.new self - end - ## # Provide a user friendly representation def to_s diff --git a/lib/twilio-ruby/rest/messaging.rb b/lib/twilio-ruby/rest/messaging.rb index c2ad74718..e28f68715 100644 --- a/lib/twilio-ruby/rest/messaging.rb +++ b/lib/twilio-ruby/rest/messaging.rb @@ -28,15 +28,6 @@ def v1 @v1 ||= V1.new self end - ## - # @param [String] sid The unique string that we created to identify the Session - # resource. - # @return [Twilio::REST::Messaging::V1::SessionInstance] if sid was passed. - # @return [Twilio::REST::Messaging::V1::SessionList] - def sessions(sid=:unset) - self.v1.sessions(sid) - end - ## # @param [String] sid The unique string that we created to identify the Service # resource. @@ -46,6 +37,15 @@ def services(sid=:unset) self.v1.services(sid) end + ## + # @param [String] sid The unique string that we created to identify the Session + # resource. + # @return [Twilio::REST::Messaging::V1::SessionInstance] if sid was passed. + # @return [Twilio::REST::Messaging::V1::SessionList] + def sessions(sid=:unset) + self.v1.sessions(sid) + end + ## # @return [Twilio::REST::Messaging::V1::WebhookInstance] def webhooks diff --git a/lib/twilio-ruby/rest/messaging/v1.rb b/lib/twilio-ruby/rest/messaging/v1.rb index 5ff8c5edd..457147fb9 100644 --- a/lib/twilio-ruby/rest/messaging/v1.rb +++ b/lib/twilio-ruby/rest/messaging/v1.rb @@ -15,36 +15,36 @@ class V1 < Version def initialize(domain) super @version = 'v1' - @sessions = nil @services = nil + @sessions = nil @webhooks = nil end ## - # @param [String] sid The SID of the Session resource to fetch. - # @return [Twilio::REST::Messaging::V1::SessionContext] if sid was passed. - # @return [Twilio::REST::Messaging::V1::SessionList] - def sessions(sid=:unset) + # @param [String] sid The SID of the Service resource to fetch. + # @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed. + # @return [Twilio::REST::Messaging::V1::ServiceList] + def services(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @sessions ||= SessionList.new self + @services ||= ServiceList.new self else - SessionContext.new(self, sid) + ServiceContext.new(self, sid) end end ## - # @param [String] sid The SID of the Service resource to fetch. - # @return [Twilio::REST::Messaging::V1::ServiceContext] if sid was passed. - # @return [Twilio::REST::Messaging::V1::ServiceList] - def services(sid=:unset) + # @param [String] sid The SID of the Session resource to fetch. + # @return [Twilio::REST::Messaging::V1::SessionContext] if sid was passed. + # @return [Twilio::REST::Messaging::V1::SessionList] + def sessions(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @services ||= ServiceList.new self + @sessions ||= SessionList.new self else - ServiceContext.new(self, sid) + SessionContext.new(self, sid) end end diff --git a/lib/twilio-ruby/rest/preview.rb b/lib/twilio-ruby/rest/preview.rb index ed7a4d641..d3e6aa835 100644 --- a/lib/twilio-ruby/rest/preview.rb +++ b/lib/twilio-ruby/rest/preview.rb @@ -127,6 +127,14 @@ def hosted_number_orders(sid=:unset) self.hosted_numbers.hosted_number_orders(sid) end + ## + # @param [String] sid A 34 character string that uniquely identifies this Add-on. + # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed. + # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList] + def available_add_ons(sid=:unset) + self.marketplace.available_add_ons(sid) + end + ## # @param [String] sid 34 character string that uniquely identifies the Add-on. # This Sid can also be found in the Console on that specific Add-ons page as the @@ -137,14 +145,6 @@ def installed_add_ons(sid=:unset) self.marketplace.installed_add_ons(sid) end - ## - # @param [String] sid A 34 character string that uniquely identifies this Add-on. - # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed. - # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList] - def available_add_ons(sid=:unset) - self.marketplace.available_add_ons(sid) - end - ## # @param [String] sid The sid # @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed. @@ -193,15 +193,9 @@ def branded_calls end ## - # @return [Twilio::REST::Preview::TrustedComms::DeviceInstance] - def devices - self.trusted_comms.devices() - end - - ## - # @return [Twilio::REST::Preview::TrustedComms::PhoneCallInstance] - def phone_calls - self.trusted_comms.phone_calls() + # @return [Twilio::REST::Preview::TrustedComms::CpsInstance] + def cps + self.trusted_comms.cps() end ## @@ -211,9 +205,15 @@ def current_calls end ## - # @return [Twilio::REST::Preview::TrustedComms::CpsInstance] - def cps - self.trusted_comms.cps() + # @return [Twilio::REST::Preview::TrustedComms::DeviceInstance] + def devices + self.trusted_comms.devices() + end + + ## + # @return [Twilio::REST::Preview::TrustedComms::PhoneCallInstance] + def phone_calls + self.trusted_comms.phone_calls() end ## diff --git a/lib/twilio-ruby/rest/preview/marketplace.rb b/lib/twilio-ruby/rest/preview/marketplace.rb index b6205cdbe..72554ae2e 100644 --- a/lib/twilio-ruby/rest/preview/marketplace.rb +++ b/lib/twilio-ruby/rest/preview/marketplace.rb @@ -15,37 +15,37 @@ class Marketplace < Version def initialize(domain) super @version = 'marketplace' - @installed_add_ons = nil @available_add_ons = nil + @installed_add_ons = nil end ## - # @param [String] sid The Installed Add-on Sid that uniquely identifies this + # @param [String] sid The Available Add-on Sid that uniquely identifies this # resource - # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed. - # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList] - def installed_add_ons(sid=:unset) + # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed. + # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList] + def available_add_ons(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @installed_add_ons ||= InstalledAddOnList.new self + @available_add_ons ||= AvailableAddOnList.new self else - InstalledAddOnContext.new(self, sid) + AvailableAddOnContext.new(self, sid) end end ## - # @param [String] sid The Available Add-on Sid that uniquely identifies this + # @param [String] sid The Installed Add-on Sid that uniquely identifies this # resource - # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed. - # @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList] - def available_add_ons(sid=:unset) + # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed. + # @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList] + def installed_add_ons(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' elsif sid == :unset - @available_add_ons ||= AvailableAddOnList.new self + @installed_add_ons ||= InstalledAddOnList.new self else - AvailableAddOnContext.new(self, sid) + InstalledAddOnContext.new(self, sid) end end diff --git a/lib/twilio-ruby/rest/preview/trusted_comms.rb b/lib/twilio-ruby/rest/preview/trusted_comms.rb index 384239d13..bf66db1d8 100644 --- a/lib/twilio-ruby/rest/preview/trusted_comms.rb +++ b/lib/twilio-ruby/rest/preview/trusted_comms.rb @@ -16,10 +16,10 @@ def initialize(domain) super @version = 'TrustedComms' @branded_calls = nil + @cps = nil + @current_calls = nil @devices = nil @phone_calls = nil - @current_calls = nil - @cps = nil end ## @@ -29,15 +29,9 @@ def branded_calls end ## - # @return [Twilio::REST::Preview::TrustedComms::DeviceContext] - def devices - @devices ||= DeviceList.new self - end - - ## - # @return [Twilio::REST::Preview::TrustedComms::PhoneCallContext] - def phone_calls - @phone_calls ||= PhoneCallList.new self + # @return [Twilio::REST::Preview::TrustedComms::CpsContext] + def cps + @cps ||= CpsContext.new self end ## @@ -47,9 +41,15 @@ def current_calls end ## - # @return [Twilio::REST::Preview::TrustedComms::CpsContext] - def cps - @cps ||= CpsContext.new self + # @return [Twilio::REST::Preview::TrustedComms::DeviceContext] + def devices + @devices ||= DeviceList.new self + end + + ## + # @return [Twilio::REST::Preview::TrustedComms::PhoneCallContext] + def phone_calls + @phone_calls ||= PhoneCallList.new self end ## diff --git a/lib/twilio-ruby/rest/video.rb b/lib/twilio-ruby/rest/video.rb index aa35f40a7..dfd2f4390 100644 --- a/lib/twilio-ruby/rest/video.rb +++ b/lib/twilio-ruby/rest/video.rb @@ -28,6 +28,15 @@ def v1 @v1 ||= V1.new self end + ## + # @param [String] sid The unique string that we created to identify the + # Composition resource. + # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed. + # @return [Twilio::REST::Video::V1::CompositionList] + def compositions(sid=:unset) + self.v1.compositions(sid) + end + ## # @param [String] sid The unique string that we created to identify the # CompositionHook resource. @@ -58,15 +67,6 @@ def recording_settings self.v1.recording_settings() end - ## - # @param [String] sid The unique string that we created to identify the - # Composition resource. - # @return [Twilio::REST::Video::V1::CompositionInstance] if sid was passed. - # @return [Twilio::REST::Video::V1::CompositionList] - def compositions(sid=:unset) - self.v1.compositions(sid) - end - ## # @param [String] sid The unique string that we created to identify the Room # resource. diff --git a/lib/twilio-ruby/rest/video/v1.rb b/lib/twilio-ruby/rest/video/v1.rb index 43559c2b5..9f75fd6e6 100644 --- a/lib/twilio-ruby/rest/video/v1.rb +++ b/lib/twilio-ruby/rest/video/v1.rb @@ -15,14 +15,28 @@ class V1 < Version def initialize(domain) super @version = 'v1' + @compositions = nil @composition_hooks = nil @composition_settings = nil @recordings = nil @recording_settings = nil - @compositions = nil @rooms = nil end + ## + # @param [String] sid The SID of the Composition resource to fetch. + # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed. + # @return [Twilio::REST::Video::V1::CompositionList] + def compositions(sid=:unset) + if sid.nil? + raise ArgumentError, 'sid cannot be nil' + elsif sid == :unset + @compositions ||= CompositionList.new self + else + CompositionContext.new(self, sid) + end + end + ## # @param [String] sid The SID of the CompositionHook resource to fetch. # @return [Twilio::REST::Video::V1::CompositionHookContext] if sid was passed. @@ -63,20 +77,6 @@ def recording_settings @recording_settings ||= RecordingSettingsContext.new self end - ## - # @param [String] sid The SID of the Composition resource to fetch. - # @return [Twilio::REST::Video::V1::CompositionContext] if sid was passed. - # @return [Twilio::REST::Video::V1::CompositionList] - def compositions(sid=:unset) - if sid.nil? - raise ArgumentError, 'sid cannot be nil' - elsif sid == :unset - @compositions ||= CompositionList.new self - else - CompositionContext.new(self, sid) - end - end - ## # @param [String] sid The SID of the Room resource to fetch. # @return [Twilio::REST::Video::V1::RoomContext] if sid was passed. diff --git a/lib/twilio-ruby/rest/wireless.rb b/lib/twilio-ruby/rest/wireless.rb index dfdc35513..5c33ea48d 100644 --- a/lib/twilio-ruby/rest/wireless.rb +++ b/lib/twilio-ruby/rest/wireless.rb @@ -28,6 +28,12 @@ def v1 @v1 ||= V1.new self end + ## + # @return [Twilio::REST::Wireless::V1::UsageRecordInstance] + def usage_records + self.v1.usage_records() + end + ## # @param [String] sid The unique string that we created to identify the Command # resource. @@ -46,12 +52,6 @@ def rate_plans(sid=:unset) self.v1.rate_plans(sid) end - ## - # @return [Twilio::REST::Wireless::V1::UsageRecordInstance] - def usage_records - self.v1.usage_records() - end - ## # @param [String] sid The unique string that we created to identify the Sim # resource. diff --git a/lib/twilio-ruby/rest/wireless/v1.rb b/lib/twilio-ruby/rest/wireless/v1.rb index d538bed62..52d26770d 100644 --- a/lib/twilio-ruby/rest/wireless/v1.rb +++ b/lib/twilio-ruby/rest/wireless/v1.rb @@ -15,12 +15,18 @@ class V1 < Version def initialize(domain) super @version = 'v1' + @usage_records = nil @commands = nil @rate_plans = nil - @usage_records = nil @sims = nil end + ## + # @return [Twilio::REST::Wireless::V1::UsageRecordContext] + def usage_records + @usage_records ||= UsageRecordList.new self + end + ## # @param [String] sid The SID of the Command resource to fetch. # @return [Twilio::REST::Wireless::V1::CommandContext] if sid was passed. @@ -49,12 +55,6 @@ def rate_plans(sid=:unset) end end - ## - # @return [Twilio::REST::Wireless::V1::UsageRecordContext] - def usage_records - @usage_records ||= UsageRecordList.new self - end - ## # @param [String] sid The SID of the Sim resource to fetch. # @return [Twilio::REST::Wireless::V1::SimContext] if sid was passed.