Class: JustimmoClient::V1::RealtyPrice
Instance Method Summary
collapse
Methods included from Utils
#autoload_dir, #translate
Methods included from Logging
default_logger, #logger, rails_logger
Instance Method Details
#additional ⇒ Object
TODO: add more additional costs
65
66
67
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 65
def additional
[operating_cost].map(&:to_f).sum
end
|
#commission ⇒ String
15
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 15
attribute :commission, String
|
#currency ⇒ Symbol
9
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 9
attribute :currency, Symbol, default: :EUR
|
29
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 29
attribute :deposit, RealtyCost
|
#get ⇒ Object
69
70
71
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 69
def get
@purcase || @rent
end
|
#including_vat ⇒ Boolean
11
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 11
attribute :including_vat, Boolean
|
#land_registry ⇒ Float
14
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 14
attribute :land_registry, Float
|
#on_demand ⇒ Boolean
12
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 12
attribute :on_demand, Boolean
|
#on_demand? ⇒ Boolean
49
50
51
52
53
54
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 49
def on_demand?
return on_demand if on_demand
return purcase.zero? if purcase
return rent.zero? if rent
true
end
|
26
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 26
attribute :operating_cost, RealtyCost
|
#operating_cost_net ⇒ RealtyCost
27
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 27
attribute :operating_cost_net, RealtyCost
|
#operating_cost_per_sqm ⇒ RealtyCost
28
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 28
attribute :operating_cost_per_sqm, RealtyCost
|
#operating_cost_vat ⇒ Integer
17
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 17
attribute :operating_cost_vat, Integer
|
#provision ⇒ Boolean
10
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 10
attribute :provision, Boolean
|
18
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 18
attribute :purcase, RealtyCost
|
#purcase? ⇒ Boolean
60
61
62
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 60
def purcase?
!purcase.nil?
end
|
19
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 19
attribute :purcase_net, RealtyCost
|
#real_estate_taxes ⇒ Float
13
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 13
attribute :real_estate_taxes, Float
|
20
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 20
attribute :rent, RealtyCost
|
#rent? ⇒ Boolean
56
57
58
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 56
def rent?
!rent.nil?
end
|
22
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 22
attribute :rent_cold, RealtyCost
|
23
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 23
attribute :rent_cold_net, RealtyCost
|
#rent_including_heating ⇒ RealtyCost
24
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 24
attribute :rent_including_heating, RealtyCost
|
21
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 21
attribute :rent_net, RealtyCost
|
25
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 25
attribute :rent_per_sqm, RealtyCost
|
#rent_vat ⇒ Integer
16
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 16
attribute :rent_vat, Integer
|
#to_f ⇒ Object
73
74
75
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 73
def to_f
get.to_f
end
|
#to_s ⇒ Object
77
78
79
|
# File 'lib/justimmo_client/api/v1/models/realty_price.rb', line 77
def to_s
on_demand? ? translate("price.on_demand") : get.to_s
end
|