Sha256: 0c02aabde63753c4a08c5d250b5721d382cd595046bec54be6400b3015f9decd

Contents?: true

Size: 1.59 KB

Versions: 14

Compression:

Stored size: 1.59 KB

Contents

# bandwidth
#
# This file was automatically generated by APIMATIC v2.0
# ( https://apimatic.io ).

module Bandwidth
  # AccountsParticipantsResponse Model.
  class AccountsParticipantsResponse < BaseModel
    SKIP = Object.new
    private_constant :SKIP

    # A participant object
    # @return [Participant]
    attr_accessor :participant

    # Auth token for the returned participant
    # This should be passed to the participant so that they can connect to the
    # platform
    # @return [String]
    attr_accessor :token

    # A mapping from model property names to API property names.
    def self.names
      @_hash = {} if @_hash.nil?
      @_hash['participant'] = 'participant'
      @_hash['token'] = 'token'
      @_hash
    end

    # An array for optional fields
    def optionals
      %w[
        participant
        token
      ]
    end

    # An array for nullable fields
    def nullables
      []
    end

    def initialize(participant = nil,
                   token = nil)
      @participant = participant unless participant == SKIP
      @token = token unless token == SKIP
    end

    # Creates an instance of the object from a hash.
    def self.from_hash(hash)
      return nil unless hash

      # Extract variables from the hash.
      participant = Participant.from_hash(hash['participant']) if hash['participant']
      token = hash.key?('token') ? hash['token'] : SKIP

      # Create object from extracted values.
      AccountsParticipantsResponse.new(participant,
                                       token)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
bandwidth-sdk-10.5.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-10.4.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-10.3.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-10.2.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-10.1.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-10.0.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.4.1 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.4.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.3.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.2.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.1.2 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.1.1 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.1.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb
bandwidth-sdk-9.0.0 lib/bandwidth/web_rtc_lib/web_rtc/models/accounts_participants_response.rb