Class: Google::Apis::AndroidenterpriseV1::Entitlement

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/androidenterprise_v1/classes.rb,
generated/google/apis/androidenterprise_v1/representations.rb,
generated/google/apis/androidenterprise_v1/representations.rb

Overview

The existence of an entitlement resource means that a user has the right to use a particular app on any of their devices. This might be because the app is free or because they have been allocated a license to the app from a group license purchased by the enterprise. It should always be true that a user has an app installed on one of their devices only if they have an entitlement to it. So if an entitlement is deleted, the app will be uninstalled from all devices. Similarly if the user installs an app (and is permitted to do so), or the EMM triggers an install of the app, an entitlement to that app is automatically created. If this is impossible - e.g. the enterprise has not purchased sufficient licenses - then installation fails. Note that entitlements are always user specific, not device specific; a user may have an entitlement even though they have not installed the app anywhere. Once they have an entitlement they can install the app on multiple devices. The API can be used to create an entitlement. If the app is a free app, a group license for that app is created. If it's a paid app, creating the entitlement consumes one license; it remains consumed until the entitlement is removed. Optionally an installation of the app on all the user's managed devices can be triggered at the time the entitlement is created. An entitlement cannot be created for an app if the app requires permissions that the enterprise has not yet accepted. Entitlements for paid apps that are due to purchases by the user on a non- managed profile will have "userPurchase" as entitlement reason; those entitlements cannot be removed via the API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Entitlement

Returns a new instance of Entitlement.



707
708
709
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 707

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#kindString

Identifies what kind of resource this is. Value: the fixed string " androidenterprise#entitlement". Corresponds to the JSON property kind

Returns:

  • (String)


693
694
695
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 693

def kind
  @kind
end

#product_idString

The ID of the product that the entitlement is for, e.g. "app:com.google. android.gm". Corresponds to the JSON property productId

Returns:

  • (String)


699
700
701
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 699

def product_id
  @product_id
end

#reasonString

The reason for the entitlement, e.g. "free" for free apps. This is temporary, it will be replaced by the acquisition kind field of group licenses. Corresponds to the JSON property reason

Returns:

  • (String)


705
706
707
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 705

def reason
  @reason
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



712
713
714
715
716
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 712

def update!(**args)
  @kind = args[:kind] if args.key?(:kind)
  @product_id = args[:product_id] if args.key?(:product_id)
  @reason = args[:reason] if args.key?(:reason)
end