Skip to content

Update resources after sorting #480

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

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
16 changes: 8 additions & 8 deletions lib/twilio-ruby/rest/authy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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
Expand Down
30 changes: 15 additions & 15 deletions lib/twilio-ruby/rest/authy/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

##
Expand All @@ -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
Expand Down
30 changes: 15 additions & 15 deletions lib/twilio-ruby/rest/flex_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
Expand Down
40 changes: 20 additions & 20 deletions lib/twilio-ruby/rest/flex_api/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
18 changes: 9 additions & 9 deletions lib/twilio-ruby/rest/messaging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
26 changes: 13 additions & 13 deletions lib/twilio-ruby/rest/messaging/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
40 changes: 20 additions & 20 deletions lib/twilio-ruby/rest/preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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

##
Expand All @@ -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

##
Expand Down
26 changes: 13 additions & 13 deletions lib/twilio-ruby/rest/preview/marketplace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading