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

fix: regenerating with the path parameter fix #550

Merged
merged 2 commits into from
Mar 2, 2021
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
9 changes: 5 additions & 4 deletions lib/twilio-ruby/rest/api/v2010.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def initialize(domain)
# @return [Twilio::REST::Api::V2010::AccountList]
def accounts(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@accounts ||= AccountList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@accounts ||= AccountList.new self
else
AccountContext.new(self, sid)
AccountContext.new(self, sid)
end
end

Expand Down
9 changes: 5 additions & 4 deletions lib/twilio-ruby/rest/autopilot/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def initialize(domain)
# @return [Twilio::REST::Autopilot::V1::AssistantList]
def assistants(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@assistants ||= AssistantList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@assistants ||= AssistantList.new self
else
AssistantContext.new(self, sid)
AssistantContext.new(self, sid)
end
end

Expand Down
18 changes: 10 additions & 8 deletions lib/twilio-ruby/rest/bulkexports/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def initialize(domain)
# @return [Twilio::REST::Bulkexports::V1::ExportList]
def exports(resource_type=:unset)
if resource_type.nil?
raise ArgumentError, 'resource_type cannot be nil'
elsif resource_type == :unset
@exports ||= ExportList.new self
raise ArgumentError, 'resource_type cannot be nil'
end
if resource_type == :unset
@exports ||= ExportList.new self
else
ExportContext.new(self, resource_type)
ExportContext.new(self, resource_type)
end
end

Expand All @@ -41,11 +42,12 @@ def exports(resource_type=:unset)
# @return [Twilio::REST::Bulkexports::V1::ExportConfigurationList]
def export_configuration(resource_type=:unset)
if resource_type.nil?
raise ArgumentError, 'resource_type cannot be nil'
elsif resource_type == :unset
@export_configuration ||= ExportConfigurationList.new self
raise ArgumentError, 'resource_type cannot be nil'
end
if resource_type == :unset
@export_configuration ||= ExportConfigurationList.new self
else
ExportConfigurationContext.new(self, resource_type)
ExportConfigurationContext.new(self, resource_type)
end
end

Expand Down
18 changes: 10 additions & 8 deletions lib/twilio-ruby/rest/chat/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ def initialize(domain)
# @return [Twilio::REST::Chat::V1::CredentialList]
def credentials(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@credentials ||= CredentialList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@credentials ||= CredentialList.new self
else
CredentialContext.new(self, sid)
CredentialContext.new(self, sid)
end
end

Expand All @@ -41,11 +42,12 @@ def credentials(sid=:unset)
# @return [Twilio::REST::Chat::V1::ServiceList]
def services(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@services ||= ServiceList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@services ||= ServiceList.new self
else
ServiceContext.new(self, sid)
ServiceContext.new(self, sid)
end
end

Expand Down
18 changes: 10 additions & 8 deletions lib/twilio-ruby/rest/chat/v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ def initialize(domain)
# @return [Twilio::REST::Chat::V2::CredentialList]
def credentials(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@credentials ||= CredentialList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@credentials ||= CredentialList.new self
else
CredentialContext.new(self, sid)
CredentialContext.new(self, sid)
end
end

Expand All @@ -39,11 +40,12 @@ def credentials(sid=:unset)
# @return [Twilio::REST::Chat::V2::ServiceList]
def services(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@services ||= ServiceList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@services ||= ServiceList.new self
else
ServiceContext.new(self, sid)
ServiceContext.new(self, sid)
end
end

Expand Down
45 changes: 25 additions & 20 deletions lib/twilio-ruby/rest/conversations/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ def configuration
# @return [Twilio::REST::Conversations::V1::ConversationList]
def conversations(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@conversations ||= ConversationList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@conversations ||= ConversationList.new self
else
ConversationContext.new(self, sid)
ConversationContext.new(self, sid)
end
end

Expand All @@ -51,11 +52,12 @@ def conversations(sid=:unset)
# @return [Twilio::REST::Conversations::V1::CredentialList]
def credentials(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@credentials ||= CredentialList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@credentials ||= CredentialList.new self
else
CredentialContext.new(self, sid)
CredentialContext.new(self, sid)
end
end

Expand All @@ -65,11 +67,12 @@ def credentials(sid=:unset)
# @return [Twilio::REST::Conversations::V1::RoleList]
def roles(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@roles ||= RoleList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@roles ||= RoleList.new self
else
RoleContext.new(self, sid)
RoleContext.new(self, sid)
end
end

Expand All @@ -80,11 +83,12 @@ def roles(sid=:unset)
# @return [Twilio::REST::Conversations::V1::ServiceList]
def services(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@services ||= ServiceList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@services ||= ServiceList.new self
else
ServiceContext.new(self, sid)
ServiceContext.new(self, sid)
end
end

Expand All @@ -95,11 +99,12 @@ def services(sid=:unset)
# @return [Twilio::REST::Conversations::V1::UserList]
def users(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@users ||= UserList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@users ||= UserList.new self
else
UserContext.new(self, sid)
UserContext.new(self, sid)
end
end

Expand Down
36 changes: 20 additions & 16 deletions lib/twilio-ruby/rest/events/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def initialize(domain)
# @return [Twilio::REST::Events::V1::EventTypeList]
def event_types(type=:unset)
if type.nil?
raise ArgumentError, 'type cannot be nil'
elsif type == :unset
@event_types ||= EventTypeList.new self
raise ArgumentError, 'type cannot be nil'
end
if type == :unset
@event_types ||= EventTypeList.new self
else
EventTypeContext.new(self, type)
EventTypeContext.new(self, type)
end
end

Expand All @@ -42,11 +43,12 @@ def event_types(type=:unset)
# @return [Twilio::REST::Events::V1::SchemaList]
def schemas(id=:unset)
if id.nil?
raise ArgumentError, 'id cannot be nil'
elsif id == :unset
@schemas ||= SchemaList.new self
raise ArgumentError, 'id cannot be nil'
end
if id == :unset
@schemas ||= SchemaList.new self
else
SchemaContext.new(self, id)
SchemaContext.new(self, id)
end
end

Expand All @@ -56,11 +58,12 @@ def schemas(id=:unset)
# @return [Twilio::REST::Events::V1::SinkList]
def sinks(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@sinks ||= SinkList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@sinks ||= SinkList.new self
else
SinkContext.new(self, sid)
SinkContext.new(self, sid)
end
end

Expand All @@ -71,11 +74,12 @@ def sinks(sid=:unset)
# @return [Twilio::REST::Events::V1::SubscriptionList]
def subscriptions(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@subscriptions ||= SubscriptionList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@subscriptions ||= SubscriptionList.new self
else
SubscriptionContext.new(self, sid)
SubscriptionContext.new(self, sid)
end
end

Expand Down
9 changes: 5 additions & 4 deletions lib/twilio-ruby/rest/fax/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ def initialize(domain)
# @return [Twilio::REST::Fax::V1::FaxList]
def faxes(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@faxes ||= FaxList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@faxes ||= FaxList.new self
else
FaxContext.new(self, sid)
FaxContext.new(self, sid)
end
end

Expand Down
27 changes: 15 additions & 12 deletions lib/twilio-ruby/rest/flex_api/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ def initialize(domain)
# @return [Twilio::REST::Flex_api::V1::ChannelList]
def channel(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@channel ||= ChannelList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@channel ||= ChannelList.new self
else
ChannelContext.new(self, sid)
ChannelContext.new(self, sid)
end
end

Expand All @@ -47,11 +48,12 @@ def configuration
# @return [Twilio::REST::Flex_api::V1::FlexFlowList]
def flex_flow(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@flex_flow ||= FlexFlowList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@flex_flow ||= FlexFlowList.new self
else
FlexFlowContext.new(self, sid)
FlexFlowContext.new(self, sid)
end
end

Expand All @@ -61,11 +63,12 @@ def flex_flow(sid=:unset)
# @return [Twilio::REST::Flex_api::V1::WebChannelList]
def web_channel(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@web_channel ||= WebChannelList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@web_channel ||= WebChannelList.new self
else
WebChannelContext.new(self, sid)
WebChannelContext.new(self, sid)
end
end

Expand Down
18 changes: 10 additions & 8 deletions lib/twilio-ruby/rest/insights/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ def initialize(domain)
# @return [Twilio::REST::Insights::V1::CallList]
def calls(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
elsif sid == :unset
@calls ||= CallList.new self
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@calls ||= CallList.new self
else
CallContext.new(self, sid)
CallContext.new(self, sid)
end
end

Expand All @@ -39,11 +40,12 @@ def calls(sid=:unset)
# @return [Twilio::REST::Insights::V1::RoomList]
def rooms(room_sid=:unset)
if room_sid.nil?
raise ArgumentError, 'room_sid cannot be nil'
elsif room_sid == :unset
@rooms ||= RoomList.new self
raise ArgumentError, 'room_sid cannot be nil'
end
if room_sid == :unset
@rooms ||= RoomList.new self
else
RoomContext.new(self, room_sid)
RoomContext.new(self, room_sid)
end
end

Expand Down
Loading