class Beaver::ExternalAccount
ExternalAccount
Model.
Attributes
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Float]
TODO: Write general description for this method @return [Float]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [Boolean]
TODO: Write general description for this method @return [Integer]
TODO: Write general description for this method @return [String]
TODO: Write general description for this method @return [String]
Public Class Methods
Creates an instance of the object from a hash.
# File lib/beaver/models/external_account.rb, line 103 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_type = hash['account_type'] is_partner_account = hash['is_partner_account'] connections = hash['connections'] create_time = hash['create_time'] feedback_average_score = hash['feedback_average_score'] feedback_score_percent_positive = hash['feedback_score_percent_positive'] feedback_scores_provided = hash['feedback_scores_provided'] followers = hash['followers'] following = hash['following'] modify_time = hash['modify_time'] uri = hash['uri'] user_id = hash['user_id'] # Create object from extracted values. ExternalAccount.new(account_type, is_partner_account, connections, create_time, feedback_average_score, feedback_score_percent_positive, feedback_scores_provided, followers, following, modify_time, uri, user_id) end
A mapping from model property names to API property names.
# File lib/beaver/models/external_account.rb, line 58 def self.names @_hash = {} if @_hash.nil? @_hash['account_type'] = 'account_type' @_hash['connections'] = 'connections' @_hash['create_time'] = 'create_time' @_hash['feedback_average_score'] = 'feedback_average_score' @_hash['feedback_score_percent_positive'] = 'feedback_score_percent_positive' @_hash['feedback_scores_provided'] = 'feedback_scores_provided' @_hash['followers'] = 'followers' @_hash['following'] = 'following' @_hash['is_partner_account'] = 'is_partner_account' @_hash['modify_time'] = 'modify_time' @_hash['uri'] = 'uri' @_hash['user_id'] = 'user_id' @_hash end
# File lib/beaver/models/external_account.rb, line 76 def initialize(account_type = nil, is_partner_account = nil, connections = nil, create_time = nil, feedback_average_score = nil, feedback_score_percent_positive = nil, feedback_scores_provided = nil, followers = nil, following = nil, modify_time = nil, uri = nil, user_id = nil) @account_type = account_type @connections = connections @create_time = create_time @feedback_average_score = feedback_average_score @feedback_score_percent_positive = feedback_score_percent_positive @feedback_scores_provided = feedback_scores_provided @followers = followers @following = following @is_partner_account = is_partner_account @modify_time = modify_time @uri = uri @user_id = user_id end