Class: Killbill::Plugin::Model::PriceList

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePriceList

Returns a new instance of PriceList.



39
40
# File 'lib/killbill/gen/api/price_list.rb', line 39

def initialize()
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



37
38
39
# File 'lib/killbill/gen/api/price_list.rb', line 37

def name
  @name
end

#plansObject

Returns the value of attribute plans.



37
38
39
# File 'lib/killbill/gen/api/price_list.rb', line 37

def plans
  @plans
end

#pretty_nameObject

Returns the value of attribute pretty_name.



37
38
39
# File 'lib/killbill/gen/api/price_list.rb', line 37

def pretty_name
  @pretty_name
end

Instance Method Details

#to_javaObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/killbill/gen/api/price_list.rb', line 42

def to_java()
  # conversion for name [type = java.lang.String]
  @name = @name.to_s unless @name.nil?

  # conversion for pretty_name [type = java.lang.String]
  @pretty_name = @pretty_name.to_s unless @pretty_name.nil?

  # conversion for plans [type = java.util.Collection]
  tmp = java.util.ArrayList.new
  (@plans || []).each do |m|
    # conversion for m [type = org.killbill.billing.catalog.api.Plan]
    m = m.to_java unless m.nil?
    tmp.add(m)
  end
  @plans = tmp
  self
end

#to_ruby(j_obj) ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/killbill/gen/api/price_list.rb', line 60

def to_ruby(j_obj)
  # conversion for name [type = java.lang.String]
  @name = j_obj.name

  # conversion for pretty_name [type = java.lang.String]
  @pretty_name = j_obj.pretty_name

  # conversion for plans [type = java.util.Collection]
  @plans = j_obj.plans
  tmp = []
  (@plans || []).each do |m|
    # conversion for m [type = org.killbill.billing.catalog.api.Plan]
    m = Killbill::Plugin::Model::Plan.new.to_ruby(m) unless m.nil?
    tmp << m
  end
  @plans = tmp
  self
end