Class: Killbill::Plugin::Model::BlockPriceOverride
- Defined in:
- lib/killbill/gen/api/block_price_override.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#price ⇒ Object
Returns the value of attribute price.
-
#size ⇒ Object
Returns the value of attribute size.
-
#unit_name ⇒ Object
Returns the value of attribute unit_name.
Instance Method Summary collapse
-
#initialize ⇒ BlockPriceOverride
constructor
A new instance of BlockPriceOverride.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ BlockPriceOverride
Returns a new instance of BlockPriceOverride.
39 40 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 39 def initialize() end |
Instance Attribute Details
#currency ⇒ Object
Returns the value of attribute currency.
37 38 39 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 37 def currency @currency end |
#price ⇒ Object
Returns the value of attribute price.
37 38 39 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 37 def price @price end |
#size ⇒ Object
Returns the value of attribute size.
37 38 39 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 37 def size @size end |
#unit_name ⇒ Object
Returns the value of attribute unit_name.
37 38 39 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 37 def unit_name @unit_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 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 42 def to_java() # conversion for unit_name [type = java.lang.String] @unit_name = @unit_name.to_s unless @unit_name.nil? # conversion for size [type = java.lang.Double] @size = @size # conversion for price [type = java.math.BigDecimal] if @price.nil? @price = java.math.BigDecimal::ZERO else @price = java.math.BigDecimal.new(@price.to_s) end # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil? self end |
#to_ruby(j_obj) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/killbill/gen/api/block_price_override.rb', line 61 def to_ruby(j_obj) # conversion for unit_name [type = java.lang.String] @unit_name = j_obj.unit_name # conversion for size [type = java.lang.Double] @size = j_obj.size # conversion for price [type = java.math.BigDecimal] @price = j_obj.price @price = @price.nil? ? 0 : BigDecimal.new(@price.to_s) # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = j_obj.currency @currency = @currency.to_s.to_sym unless @currency.nil? self end |