lib/twilio-ruby/rest/pricing/v1.rb in twilio-ruby-5.0.0.rc24 vs lib/twilio-ruby/rest/pricing/v1.rb in twilio-ruby-5.0.0.rc25
- old
+ new
@@ -17,26 +17,32 @@
@phone_numbers = nil
@voice = nil
end
def messaging(sid=:unset)
- if sid == :unset
+ if sid.nil?
+ raise ArgumentError, 'sid cannot be nil'
+ elsif sid == :unset
@messaging ||= MessagingList.new self
else
MessagingContext.new(self, sid)
end
end
def phone_numbers(sid=:unset)
- if sid == :unset
+ if sid.nil?
+ raise ArgumentError, 'sid cannot be nil'
+ elsif sid == :unset
@phone_numbers ||= PhoneNumberList.new self
else
PhoneNumberContext.new(self, sid)
end
end
def voice(sid=:unset)
- if sid == :unset
+ if sid.nil?
+ raise ArgumentError, 'sid cannot be nil'
+ elsif sid == :unset
@voice ||= VoiceList.new self
else
VoiceContext.new(self, sid)
end
end
\ No newline at end of file