Class: Killbill::Plugin::Model::Duration
- Defined in:
- lib/killbill/gen/api/duration.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
Returns the value of attribute number.
-
#unit ⇒ Object
Returns the value of attribute unit.
Instance Method Summary collapse
-
#initialize ⇒ Duration
constructor
A new instance of Duration.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ Duration
Returns a new instance of Duration.
39 40 |
# File 'lib/killbill/gen/api/duration.rb', line 39 def initialize() end |
Instance Attribute Details
#number ⇒ Object
Returns the value of attribute number.
37 38 39 |
# File 'lib/killbill/gen/api/duration.rb', line 37 def number @number end |
#unit ⇒ Object
Returns the value of attribute unit.
37 38 39 |
# File 'lib/killbill/gen/api/duration.rb', line 37 def unit @unit end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/killbill/gen/api/duration.rb', line 42 def to_java() # conversion for unit [type = org.killbill.billing.catalog.api.TimeUnit] @unit = Java::org.killbill.billing.catalog.api.TimeUnit.value_of( @unit.to_s ) unless @unit.nil? # conversion for number [type = int] @number = @number self end |
#to_ruby(j_obj) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/killbill/gen/api/duration.rb', line 51 def to_ruby(j_obj) # conversion for unit [type = org.killbill.billing.catalog.api.TimeUnit] @unit = j_obj.unit @unit = @unit.to_s.to_sym unless @unit.nil? # conversion for number [type = int] @number = j_obj.number self end |