lib/twilio-ruby/rest/accounts.rb in twilio-ruby-4.13.0 vs lib/twilio-ruby/rest/accounts.rb in twilio-ruby-5.0.0.alpha1
- old
+ new
@@ -1,16 +1,42 @@
+##
+# This code was generated by
+# \ / _ _ _| _ _
+# | (_)\/(_)(_|\/| |(/_ v1.0.0
+# / /
+
module Twilio
module REST
- class Accounts < ListResource; end
+ class Accounts < Domain
+ ##
+ # Initialize the Accounts Domain
+ def initialize(twilio)
+ super
- class Account < InstanceResource
- def initialize(path, client, params={})
- super path, client, params
- resource :sandbox, :available_phone_numbers, :incoming_phone_numbers,
- :calls, :outgoing_caller_ids, :conferences, :sms, :recordings,
- :transcriptions, :notifications, :applications, :connect_apps,
- :authorized_connect_apps, :queues, :usage, :messages, :media, :sip,
- :tokens, :addresses, :keys
+ @base_url = 'https://accounts.twilio.com'
+ @host = 'accounts.twilio.com'
+ @port = 443
+
+ # Versions
+ @v1 = nil
end
+
+ ##
+ # Version v1 of accounts
+ def v1
+ @v1 ||= V1.new self
+ end
+
+ ##
+ # @return [Twilio::REST::Accounts::V1::CredentialInstance]
+ def credentials
+ self.v1.credentials()
+ end
+
+ ##
+ # Provide a user friendly representation
+ def to_s
+ '#<Twilio::REST::Accounts>'
+ end
end
end
-end
+end
\ No newline at end of file