class ConnectorKit::User

Simple model class for representing Users in the App Store Connect API

Attributes

all_apps_visible[R]
first_name[R]
last_name[R]
roles[R]
username[R]

Public Class Methods

new(options) click to toggle source
Calls superclass method ConnectorKit::Model::new
# File lib/connector_kit/models/user.rb, line 8
def initialize(options)
  super(options)

  attrs = options['attributes']
  @first_name = attrs['firstName']
  @last_name = attrs['lastName']
  @username = attrs['username']
  @all_apps_visible = attrs['allAppsVisible']
  @roles = attrs['roles'].map { |role| role.downcase.to_sym }
end

Public Instance Methods

full_name() click to toggle source
# File lib/connector_kit/models/user.rb, line 19
def full_name
  "#{@first_name} #{@last_name}"
end