Class: Killbill::Plugin::Model::RolledUpUsage
- Defined in:
- lib/killbill/gen/api/rolled_up_usage.rb
Instance Attribute Summary collapse
-
#end ⇒ Object
Returns the value of attribute end.
-
#rolled_up_units ⇒ Object
Returns the value of attribute rolled_up_units.
-
#start ⇒ Object
Returns the value of attribute start.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
Instance Method Summary collapse
-
#initialize ⇒ RolledUpUsage
constructor
A new instance of RolledUpUsage.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ RolledUpUsage
Returns a new instance of RolledUpUsage.
39 40 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 39 def initialize() end |
Instance Attribute Details
#end ⇒ Object
Returns the value of attribute end.
37 38 39 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 37 def end @end end |
#rolled_up_units ⇒ Object
Returns the value of attribute rolled_up_units.
37 38 39 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 37 def rolled_up_units @rolled_up_units end |
#start ⇒ Object
Returns the value of attribute start.
37 38 39 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 37 def start @start end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
37 38 39 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 37 def subscription_id @subscription_id 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 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 42 def to_java() # conversion for subscription_id [type = java.util.UUID] @subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil? # conversion for start [type = org.joda.time.LocalDate] if !@start.nil? @start = Java::org.joda.time.LocalDate.parse(@start.to_s) end # conversion for end [type = org.joda.time.LocalDate] if !@end.nil? @end = Java::org.joda.time.LocalDate.parse(@end.to_s) end # conversion for rolled_up_units [type = java.util.List] tmp = java.util.ArrayList.new (@rolled_up_units || []).each do |m| # conversion for m [type = org.killbill.billing.usage.api.RolledUpUnit] m = m.to_java unless m.nil? tmp.add(m) end @rolled_up_units = tmp self end |
#to_ruby(j_obj) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/killbill/gen/api/rolled_up_usage.rb', line 67 def to_ruby(j_obj) # conversion for subscription_id [type = java.util.UUID] @subscription_id = j_obj.subscription_id @subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s # conversion for start [type = org.joda.time.LocalDate] @start = j_obj.start if !@start.nil? @start = @start.to_s end # conversion for end [type = org.joda.time.LocalDate] @end = j_obj.end if !@end.nil? @end = @end.to_s end # conversion for rolled_up_units [type = java.util.List] @rolled_up_units = j_obj.rolled_up_units tmp = [] (@rolled_up_units || []).each do |m| # conversion for m [type = org.killbill.billing.usage.api.RolledUpUnit] m = Killbill::Plugin::Model::RolledUpUnit.new.to_ruby(m) unless m.nil? tmp << m end @rolled_up_units = tmp self end |