Sha256: 3e871a9ec51e05ece2d31b9dbd8e8092504a4644c7ab228444b8783ab317e45a

Contents?: true

Size: 1.39 KB

Versions: 136

Compression:

Stored size: 1.39 KB

Contents

require_relative '../model'
module Spaceship
  class ConnectAPI
    class User
      include Spaceship::ConnectAPI::Model

      attr_accessor :username
      attr_accessor :first_name
      attr_accessor :last_name
      attr_accessor :email
      attr_accessor :preferred_currency_territory
      attr_accessor :agreed_to_terms
      attr_accessor :roles
      attr_accessor :all_apps_visible
      attr_accessor :provisioning_allowed
      attr_accessor :email_vetting_required
      attr_accessor :notifications

      attr_mapping({
        "username" => "username",
        "firstName" => "first_name",
        "lastName" => "last_name",
        "email" => "email",
        "preferredCurrencyTerritory" => "preferred_currency_territory",
        "agreedToTerms" => "agreed_to_terms",
        "roles" => "roles",
        "allAppsVisible" => "all_apps_visible",
        "provisioningAllowed" => "provisioning_allowed",
        "emailVettingRequired" => "email_vetting_required",
        "notifications" => "notifications"
      })

      def self.type
        return "users"
      end

      #
      # API
      #

      def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
        return Spaceship::ConnectAPI.get_users(filter: filter, includes: includes)
      end

      def self.find(email: nil, includes: nil)
        return all(filter: { email: email }, includes: includes)
      end
    end
  end
end

Version data entries

136 entries across 136 versions & 2 rubygems

Version Path
fastlane-2.132.0.beta.20190917200011 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.132.0.beta.20190916200055 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.132.0.beta.20190915200038 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.132.0.beta.20190914200034 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.132.0.beta.20190913200058 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.132.0.beta.20190912200052 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190911200010 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190910200104 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190909200058 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190908200041 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190907200030 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190906200026 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190905200113 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190904200040 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190903200013 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190902200022 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190901200035 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190831200041 spaceship/lib/spaceship/connect_api/models/user.rb
fastlane-2.131.0.beta.20190830200038 spaceship/lib/spaceship/connect_api/models/user.rb