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