Class: Killbill::Plugin::Model::InternationalPrice

Inherits:
Object
  • Object
show all
Defined in:
lib/killbill/gen/api/international_price.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInternationalPrice

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_zeroObject

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

#pricesObject

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_javaObject



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