Class: Killbill::Plugin::Model::InternationalPrice
- Defined in:
- lib/killbill/gen/api/international_price.rb
Instance Attribute Summary collapse
-
#is_zero ⇒ Object
Returns the value of attribute is_zero.
-
#prices ⇒ Object
Returns the value of attribute prices.
Instance Method Summary collapse
-
#initialize ⇒ InternationalPrice
constructor
A new instance of InternationalPrice.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ InternationalPrice
Returns a new instance of InternationalPrice.
39 40 |
# File 'lib/killbill/gen/api/international_price.rb', line 39 def initialize() end |
Instance Attribute Details
#is_zero ⇒ Object
Returns the value of attribute is_zero.
37 38 39 |
# File 'lib/killbill/gen/api/international_price.rb', line 37 def is_zero @is_zero end |
#prices ⇒ Object
Returns the value of attribute prices.
37 38 39 |
# File 'lib/killbill/gen/api/international_price.rb', line 37 def prices @prices end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/killbill/gen/api/international_price.rb', line 42 def to_java() # conversion for prices [type = org.killbill.billing.catalog.api.Price[]] tmp = [] (@prices || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Price] m = m.to_java unless m.nil? tmp << m end @prices = tmp.to_java Java::org.killbill.billing.catalog.api.Price # conversion for is_zero [type = boolean] @is_zero = @is_zero.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_zero) self end |
#to_ruby(j_obj) ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/killbill/gen/api/international_price.rb', line 57 def to_ruby(j_obj) # conversion for prices [type = org.killbill.billing.catalog.api.Price[]] @prices = j_obj.prices tmp = [] (@prices || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Price] m = Killbill::Plugin::Model::Price.new.to_ruby(m) unless m.nil? tmp << m end @prices = tmp # conversion for is_zero [type = boolean] @is_zero = j_obj.is_zero if @is_zero.nil? @is_zero = false else tmp_bool = (@is_zero.java_kind_of? java.lang.Boolean) ? @is_zero.boolean_value : @is_zero @is_zero = tmp_bool ? true : false end self end |