Class: Killbill::Plugin::Model::Product
- Defined in:
- lib/killbill/gen/api/product.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
Returns the value of attribute available.
-
#catalog_name ⇒ Object
Returns the value of attribute catalog_name.
-
#category ⇒ Object
Returns the value of attribute category.
-
#included ⇒ Object
Returns the value of attribute included.
-
#limits ⇒ Object
Returns the value of attribute limits.
-
#name ⇒ Object
Returns the value of attribute name.
-
#pretty_name ⇒ Object
Returns the value of attribute pretty_name.
Instance Method Summary collapse
-
#initialize ⇒ Product
constructor
A new instance of Product.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ Product
Returns a new instance of Product.
39 40 |
# File 'lib/killbill/gen/api/product.rb', line 39 def initialize() end |
Instance Attribute Details
#available ⇒ Object
Returns the value of attribute available.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def available @available end |
#catalog_name ⇒ Object
Returns the value of attribute catalog_name.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def catalog_name @catalog_name end |
#category ⇒ Object
Returns the value of attribute category.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def category @category end |
#included ⇒ Object
Returns the value of attribute included.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def included @included end |
#limits ⇒ Object
Returns the value of attribute limits.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def limits @limits end |
#name ⇒ Object
Returns the value of attribute name.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def name @name end |
#pretty_name ⇒ Object
Returns the value of attribute pretty_name.
37 38 39 |
# File 'lib/killbill/gen/api/product.rb', line 37 def pretty_name @pretty_name end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/killbill/gen/api/product.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 available [type = java.util.Collection] tmp = java.util.ArrayList.new (@available || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Product] m = m.to_java unless m.nil? tmp.add(m) end @available = tmp # conversion for included [type = java.util.Collection] tmp = java.util.ArrayList.new (@included || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Product] m = m.to_java unless m.nil? tmp.add(m) end @included = tmp # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory] @category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @category.to_s ) unless @category.nil? # conversion for catalog_name [type = java.lang.String] @catalog_name = @catalog_name.to_s unless @catalog_name.nil? # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]] tmp = [] (@limits || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Limit] m = m.to_java unless m.nil? tmp << m end @limits = tmp.to_java Java::org.killbill.billing.catalog.api.Limit self end |
#to_ruby(j_obj) ⇒ Object
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/killbill/gen/api/product.rb', line 84 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 available [type = java.util.Collection] @available = j_obj.available tmp = [] (@available || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Product] m = Killbill::Plugin::Model::Product.new.to_ruby(m) unless m.nil? tmp << m end @available = tmp # conversion for included [type = java.util.Collection] @included = j_obj.included tmp = [] (@included || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Product] m = Killbill::Plugin::Model::Product.new.to_ruby(m) unless m.nil? tmp << m end @included = tmp # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory] @category = j_obj.category @category = @category.to_s.to_sym unless @category.nil? # conversion for catalog_name [type = java.lang.String] @catalog_name = j_obj.catalog_name # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]] @limits = j_obj.limits tmp = [] (@limits || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.Limit] m = Killbill::Plugin::Model::Limit.new.to_ruby(m) unless m.nil? tmp << m end @limits = tmp self end |