Class: Killbill::Plugin::Model::UsageRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/killbill/gen/api/usage_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUsageRecord

Returns a new instance of UsageRecord.



37
38
# File 'lib/killbill/gen/api/usage_record.rb', line 37

def initialize()
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



35
36
37
# File 'lib/killbill/gen/api/usage_record.rb', line 35

def amount
  @amount
end

#dateObject

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_javaObject



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