Class: JSS::ManagementHistory::MacAppStoreApp

Inherits:
Object
  • Object
show all
Includes:
HashLike
Defined in:
lib/jss/api_object/management_history/mac_app_store_app.rb

Overview

MacAppStoreApp - an app store app deployed to a Computer

This should only be instantiated by the ManagementHistory.app_store_app_history method when mixed in to Computers.

That method will return an array of these objects.

NOTE: some attributes will be nil for some statuses (e.g. no size data if not installed)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#deployed_epochInteger (readonly)

a unix epoch timestamp with milliseconds

Returns:

  • (Integer)

    If :pending, when was it first deployed as



# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 37

#last_update_epochInteger (readonly) Also known as: last_push_epoch

install it, as a unix epoch timestamp with milliseconds

Returns:

  • (Integer)

    If :pending, when as the last attempt to



45
# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 45

alias last_push_epoch last_update_epoch

#nameString (readonly)

Returns the name of the app.

Returns:

  • (String)

    the name of the app.



# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 28

#size_mbInteger (readonly)

Returns If :installed, its size in Mb.

Returns:

  • (Integer)

    If :installed, its size in Mb



# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 47

#statusSymbol (readonly)

Returns :installed, :pending, or :failed.

Returns:

  • (Symbol)

    :installed, :pending, or :failed



# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 34

#versionString (readonly)

Returns The version of the app.

Returns:

  • (String)

    The version of the app



# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 31

Instance Method Details

#[](attr) ⇒ Object Originally defined in module HashLike

#deployedTime

Returns If :pending, when was it first deployed as as a ruby Time object.

Returns:

  • (Time)

    If :pending, when was it first deployed as as a ruby Time object



53
54
55
# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 53

def deployed
  JSS.epoch_to_time @deployed_epoch if @deployed_epoch
end

#last_updateTime Also known as: last_push

Returns If :pending, when as the last attempt to install it, as a ruby Time object.

Returns:

  • (Time)

    If :pending, when as the last attempt to install it, as a ruby Time object



61
62
63
# File 'lib/jss/api_object/management_history/mac_app_store_app.rb', line 61

def last_update
  JSS.epoch_to_time @last_update_epoch if @last_update_epoch
end