lib/economic/debtor.rb in rconomic-0.4 vs lib/economic/debtor.rb in rconomic-0.4.1
- old
+ new
@@ -23,14 +23,14 @@
# debtor.ci_number = '12345678'
# debtor.term_of_payment_handle = { :id => 1 }
# debtor.layout_handle = { :id => 16 }
# debtor.save
class Debtor < Entity
- has_properties :handle, :number, :debtor_group_handle, :name, :vat_zone, :currency_handle, :price_group_handle, :is_accessible, :ean, :public_entry_number, :email, :telephone_and_fax_number, :website, :address, :postal_code, :city, :country, :credit_maximum, :vat_number, :county, :ci_number, :term_of_payment_handle, :layout_handle, :attention_handle, :your_reference_handle, :our_reference_handle, :balance
+ has_properties :number, :debtor_group_handle, :name, :vat_zone, :currency_handle, :price_group_handle, :is_accessible, :ean, :public_entry_number, :email, :telephone_and_fax_number, :website, :address, :postal_code, :city, :country, :credit_maximum, :vat_number, :county, :ci_number, :term_of_payment_handle, :layout_handle, :attention_handle, :your_reference_handle, :our_reference_handle, :balance
def handle
- Handle.new({:number => @number})
+ @handle ||= Handle.new({:number => @number})
end
# Returns the Debtors contacts
def contacts
@contacts ||= DebtorContactProxy.new(self)
@@ -77,6 +77,6 @@
return data
end
end
-end
\ No newline at end of file
+end