Class: Killbill::Plugin::Model::Block
- Defined in:
- lib/killbill/gen/api/block.rb
Instance Attribute Summary collapse
-
#min_top_up_credit ⇒ Object
Returns the value of attribute min_top_up_credit.
-
#price ⇒ Object
Returns the value of attribute price.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize ⇒ Block
constructor
A new instance of Block.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ Block
Returns a new instance of Block.
39 40 |
# File 'lib/killbill/gen/api/block.rb', line 39 def initialize() end |
Instance Attribute Details
#min_top_up_credit ⇒ Object
Returns the value of attribute min_top_up_credit.
37 38 39 |
# File 'lib/killbill/gen/api/block.rb', line 37 def min_top_up_credit @min_top_up_credit end |
#price ⇒ Object
Returns the value of attribute price.
37 38 39 |
# File 'lib/killbill/gen/api/block.rb', line 37 def price @price end |
#size ⇒ Object
Returns the value of attribute size.
37 38 39 |
# File 'lib/killbill/gen/api/block.rb', line 37 def size @size end |
#type ⇒ Object
Returns the value of attribute type.
37 38 39 |
# File 'lib/killbill/gen/api/block.rb', line 37 def type @type end |
#unit ⇒ Object
Returns the value of attribute unit.
37 38 39 |
# File 'lib/killbill/gen/api/block.rb', line 37 def unit @unit end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/killbill/gen/api/block.rb', line 42 def to_java() # conversion for type [type = org.killbill.billing.catalog.api.BlockType] @type = Java::org.killbill.billing.catalog.api.BlockType.value_of( @type.to_s ) unless @type.nil? # conversion for unit [type = org.killbill.billing.catalog.api.Unit] @unit = @unit.to_java unless @unit.nil? # conversion for size [type = java.lang.Double] @size = @size # conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice] @price = @price.to_java unless @price.nil? # conversion for min_top_up_credit [type = java.lang.Double] @min_top_up_credit = @min_top_up_credit 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 78 79 |
# File 'lib/killbill/gen/api/block.rb', line 60 def to_ruby(j_obj) # conversion for type [type = org.killbill.billing.catalog.api.BlockType] @type = j_obj.type @type = @type.to_s.to_sym unless @type.nil? # conversion for unit [type = org.killbill.billing.catalog.api.Unit] @unit = j_obj.unit @unit = Killbill::Plugin::Model::Unit.new.to_ruby(@unit) unless @unit.nil? # conversion for size [type = java.lang.Double] @size = j_obj.size # conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice] @price = j_obj.price @price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@price) unless @price.nil? # conversion for min_top_up_credit [type = java.lang.Double] @min_top_up_credit = j_obj.min_top_up_credit self end |