Method: Jamf::Purchasable#parse_purchasing
- Defined in:
- lib/jamf/api/classic/api_objects/purchasable.rb
#parse_purchasing ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Call this during initialization of objects that have a Purchasing subset and the purchasing attribute will be populated from @init_data
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/jamf/api/classic/api_objects/purchasable.rb', line 254 def parse_purchasing return unless @init_data[:purchasing] @purchasing = @init_data[:purchasing] @lease_expires = JSS.epoch_to_time @purchasing[:lease_expires_epoch] @po_date = JSS.epoch_to_time @purchasing[:po_date_epoch] @warranty_expires = JSS.epoch_to_time @purchasing[:warranty_expires_epoch] @applecare_id = @purchasing[:applecare_id] @is_leased = @purchasing[:is_leased] @is_purchased = @purchasing[:is_purchased] @life_expectancy = @purchasing[:life_expectancy] @po_number = @purchasing[:po_number] @purchase_price = @purchasing[:purchase_price].to_f if @purchasing[:purchase_price] @purchasing_account = @purchasing[:purchasing_account] @purchasing_contact = @purchasing[:purchasing_contact] @vendor = @purchasing[:vendor] end |