Class: Killbill::Plugin::Model::UsagePriceOverride
- Defined in:
- lib/killbill/gen/api/usage_price_override.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#tier_price_overrides ⇒ Object
Returns the value of attribute tier_price_overrides.
-
#usage_type ⇒ Object
Returns the value of attribute usage_type.
Instance Method Summary collapse
-
#initialize ⇒ UsagePriceOverride
constructor
A new instance of UsagePriceOverride.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ UsagePriceOverride
Returns a new instance of UsagePriceOverride.
39 40 |
# File 'lib/killbill/gen/api/usage_price_override.rb', line 39 def initialize() end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
37 38 39 |
# File 'lib/killbill/gen/api/usage_price_override.rb', line 37 def name @name end |
#tier_price_overrides ⇒ Object
Returns the value of attribute tier_price_overrides.
37 38 39 |
# File 'lib/killbill/gen/api/usage_price_override.rb', line 37 def tier_price_overrides @tier_price_overrides end |
#usage_type ⇒ Object
Returns the value of attribute usage_type.
37 38 39 |
# File 'lib/killbill/gen/api/usage_price_override.rb', line 37 def usage_type @usage_type 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/usage_price_override.rb', line 42 def to_java() # conversion for name [type = java.lang.String] @name = @name.to_s unless @name.nil? # conversion for usage_type [type = org.killbill.billing.catalog.api.UsageType] @usage_type = Java::org.killbill.billing.catalog.api.UsageType.value_of( @usage_type.to_s ) unless @usage_type.nil? # conversion for tier_price_overrides [type = java.util.List] tmp = java.util.ArrayList.new (@tier_price_overrides || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.TierPriceOverride] m = m.to_java unless m.nil? tmp.add(m) end @tier_price_overrides = 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 78 |
# File 'lib/killbill/gen/api/usage_price_override.rb', line 60 def to_ruby(j_obj) # conversion for name [type = java.lang.String] @name = j_obj.name # conversion for usage_type [type = org.killbill.billing.catalog.api.UsageType] @usage_type = j_obj.usage_type @usage_type = @usage_type.to_s.to_sym unless @usage_type.nil? # conversion for tier_price_overrides [type = java.util.List] @tier_price_overrides = j_obj.tier_price_overrides tmp = [] (@tier_price_overrides || []).each do |m| # conversion for m [type = org.killbill.billing.catalog.api.TierPriceOverride] m = Killbill::Plugin::Model::TierPriceOverride.new.to_ruby(m) unless m.nil? tmp << m end @tier_price_overrides = tmp self end |