Class: Podio::ContractPriceItem

Inherits:
ActivePodio::Base show all
Defined in:
lib/podio/models/contract_price.rb

Instance Attribute Summary

Attributes inherited from ActivePodio::Base

#attributes

Instance Method Summary collapse

Methods inherited from ActivePodio::Base

#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, has_many, has_one, #hash, #initialize, #initialize_attributes, klass_from_string, list, member, #new_record?, output_attribute_as_json, #parent_model, #persisted?, property, #to_param

Constructor Details

This class inherits a constructor from ActivePodio::Base

Instance Method Details

#sub_totalObject



45
46
47
48
49
50
51
# File 'lib/podio/models/contract_price.rb', line 45

def sub_total
  if self.quantity
    (self.quantity*self.price).to_f
  else
    0.to_f
  end
end