Class: Killbill::Plugin::Model::Block

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBlock

Returns a new instance of Block.



39
40
# File 'lib/killbill/gen/api/block.rb', line 39

def initialize()
end

Instance Attribute Details

#min_top_up_creditObject

Returns the value of attribute min_top_up_credit.



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

def min_top_up_credit
  @min_top_up_credit
end

#priceObject

Returns the value of attribute price.



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

def price
  @price
end

#sizeObject

Returns the value of attribute size.



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

def size
  @size
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

#unitObject

Returns the value of attribute unit.



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

def unit
  @unit
end

Instance Method Details

#to_javaObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/killbill/gen/api/block.rb', line 42

def to_java()
  # conversion for type [type = org.killbill.billing.catalog.api.BlockType]
  @type = Java::org.killbill.billing.catalog.api.BlockType.value_of( @type.to_s ) unless @type.nil?

  # conversion for unit [type = org.killbill.billing.catalog.api.Unit]
  @unit = @unit.to_java unless @unit.nil?

  # conversion for size [type = java.lang.Double]
  @size = @size

  # conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice]
  @price = @price.to_java unless @price.nil?

  # conversion for min_top_up_credit [type = java.lang.Double]
  @min_top_up_credit = @min_top_up_credit
  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
79
# File 'lib/killbill/gen/api/block.rb', line 60

def to_ruby(j_obj)
  # conversion for type [type = org.killbill.billing.catalog.api.BlockType]
  @type = j_obj.type
  @type = @type.to_s.to_sym unless @type.nil?

  # conversion for unit [type = org.killbill.billing.catalog.api.Unit]
  @unit = j_obj.unit
  @unit = Killbill::Plugin::Model::Unit.new.to_ruby(@unit) unless @unit.nil?

  # conversion for size [type = java.lang.Double]
  @size = j_obj.size

  # conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice]
  @price = j_obj.price
  @price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@price) unless @price.nil?

  # conversion for min_top_up_credit [type = java.lang.Double]
  @min_top_up_credit = j_obj.min_top_up_credit
  self
end