Class: Killbill::Plugin::Model::UsageRecord
- Defined in:
- lib/killbill/gen/api/usage_record.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#date ⇒ Object
Returns the value of attribute date.
Instance Method Summary collapse
-
#initialize ⇒ UsageRecord
constructor
A new instance of UsageRecord.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ UsageRecord
Returns a new instance of UsageRecord.
37 38 |
# File 'lib/killbill/gen/api/usage_record.rb', line 37 def initialize() end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
35 36 37 |
# File 'lib/killbill/gen/api/usage_record.rb', line 35 def amount @amount end |
#date ⇒ Object
Returns the value of attribute date.
35 36 37 |
# File 'lib/killbill/gen/api/usage_record.rb', line 35 def date @date end |
Instance Method Details
#to_java ⇒ Object
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/killbill/gen/api/usage_record.rb', line 40 def to_java() # conversion for date [type = org.joda.time.LocalDate] if !@date.nil? @date = Java::org.joda.time.LocalDate.parse(@date.to_s) end # conversion for amount [type = java.lang.Long] @amount = @amount Java::org.killbill.billing.usage.api.UsageRecord.new(@date, @amount) end |
#to_ruby(j_obj) ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/killbill/gen/api/usage_record.rb', line 51 def to_ruby(j_obj) # conversion for date [type = org.joda.time.LocalDate] @date = j_obj.date if !@date.nil? @date = @date.to_s end # conversion for amount [type = java.lang.Long] @amount = j_obj.amount self end |