lib/twilio-ruby/rest/api/v2010/account/conference.rb in twilio-ruby-5.0.0.rc9 vs lib/twilio-ruby/rest/api/v2010/account/conference.rb in twilio-ruby-5.0.0.rc10

- old
+ new

@@ -13,11 +13,10 @@ ## # Initialize the ConferenceList # @param [Version] version Version that contains the resource # @param [String] account_sid The unique id of the Account] responsible for # creating this conference. - # @return [ConferenceList] ConferenceList def initialize(version, account_sid: nil) super(version) # Path Solution @@ -45,11 +44,10 @@ # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when not set will use # the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the # limit with the most efficient page size, i.e. min(limit, 1000) - # @return [Array] Array of up to limit results def list(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, limit: nil, page_size: nil) self.stream( date_created_before: date_created_before, date_created: date_created, @@ -82,11 +80,10 @@ # guarantees to never return more than limit. Default is no limit # @param [Integer] page_size Number of records to fetch per request, when not set will use # the default value of 50 records. If no page_size is defined # but a limit is defined, stream() will attempt to read the # limit with the most efficient page size, i.e. min(limit, 1000) - # @return [Enumerable] Enumerable that will yield up to limit results def stream(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) page = self.page( @@ -150,11 +147,10 @@ # @param [conference.Status] status A string representing the status of the # conference. May be `init`, `in-progress`, or `completed`. # @param [String] page_token PageToken provided by the API # @param [Integer] page_number Page Number, this value is simply for client state # @param [Integer] page_size Number of records to return, defaults to 50 - # @return [Page] Page of ConferenceInstance def page(date_created_before: nil, date_created: nil, date_created_after: nil, date_updated_before: nil, date_updated: nil, date_updated_after: nil, friendly_name: nil, status: nil, page_token: nil, page_number: nil, page_size: nil) params = { 'DateCreated<' => Twilio.serialize_iso8601(date_created_before), 'DateCreated' => Twilio.serialize_iso8601(date_created), @@ -189,11 +185,10 @@ # @param [Version] version Version that contains the resource # @param [Response] response Response from the API # @param [Hash] solution Path solution for the resource # @param [String] account_sid The unique id of the Account] responsible for # creating this conference. - # @return [ConferencePage] ConferencePage def initialize(version, response, solution) super(version, response) # Path Solution @@ -201,17 +196,16 @@ end ## # Build an instance of ConferenceInstance # @param [Hash] payload Payload response from the API - # @return [ConferenceInstance] ConferenceInstance def get_instance(payload) return ConferenceInstance.new( @version, payload, - account_sid: @solution['account_sid'], + account_sid: @solution[:account_sid], ) end ## # Provide a user friendly representation @@ -224,11 +218,10 @@ ## # Initialize the ConferenceContext # @param [Version] version Version that contains the resource # @param [String] account_sid The account_sid # @param [String] sid The conference Sid that uniquely identifies this resource - # @return [ConferenceContext] ConferenceContext def initialize(version, account_sid, sid) super(version) # Path Solution @@ -255,12 +248,12 @@ ) return ConferenceInstance.new( @version, payload, - account_sid: @solution['account_sid'], - sid: @solution['sid'], + account_sid: @solution[:account_sid], + sid: @solution[:sid], ) end ## # Access the participants @@ -300,11 +293,10 @@ # @param [Version] version Version that contains the resource # @param [Hash] payload payload that contains response from Twilio # @param [String] account_sid The unique id of the Account] responsible for # creating this conference. # @param [String] sid The conference Sid that uniquely identifies this resource - # @return [ConferenceInstance] ConferenceInstance def initialize(version, payload, account_sid: nil, sid: nil) super(version) # Marshaled Properties @@ -329,11 +321,10 @@ ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @param [Version] version Version that contains the resource - # @return [ConferenceContext] ConferenceContext for this ConferenceInstance def context unless @instance_context @instance_context = ConferenceContext.new( @version, @@ -378,24 +369,24 @@ ## # Fetch a ConferenceInstance # @return [ConferenceInstance] Fetched ConferenceInstance def fetch - @context.fetch() + context.fetch end ## # Access the participants # @return [participants] participants def participants - @context.participants + context.participants end ## # Provide a user friendly representation def to_s - context = @params.map{|k, v| "#{k}: #{v}"}.join(" ") - "<Twilio.Api.V2010.ConferenceInstance #{context}>" + values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") + "<Twilio.Api.V2010.ConferenceInstance #{values}>" end end end end end \ No newline at end of file