Class: JustimmoClient::V1::RealtyCost
Instance Method Summary
collapse
Methods included from Utils
#autoload_dir, #translate
Methods included from Logging
default_logger, #logger, rails_logger
Instance Method Details
#*(other) ⇒ Object
30
31
32
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 30
def *(other)
amount * other
end
|
#+(other) ⇒ Object
34
35
36
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 34
def +(other)
amount + ::Money.new(other)
end
|
#-(other) ⇒ Object
38
39
40
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 38
def -(other)
amount - ::Money.new(other)
end
|
#/(other) ⇒ Object
26
27
28
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 26
def /(other)
amount / other
end
|
#inspect ⇒ Object
64
65
66
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 64
def inspect
"#<#{self.class} #{self}>"
end
|
#to_f ⇒ Object
50
51
52
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 50
def to_f
amount.to_f
end
|
#to_h ⇒ Object
54
55
56
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 54
def to_h
{ currency: currency.id, amount: amount.to_f }
end
|
#to_json(options = nil) ⇒ Object
Also known as:
as_json
58
59
60
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 58
def to_json(options = nil)
to_h.to_json(options)
end
|
#to_s ⇒ Object
46
47
48
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 46
def to_s
amount.format
end
|
#zero? ⇒ Boolean
42
43
44
|
# File 'lib/justimmo_client/api/v1/models/realty_cost.rb', line 42
def zero?
amount.zero?
end
|