Class: Killbill::Plugin::Model::PlanPhase

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePlanPhase

Returns a new instance of PlanPhase.



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

def initialize()
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



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

def duration
  @duration
end

#fixedObject

Returns the value of attribute fixed.



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

def fixed
  @fixed
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#phase_typeObject

Returns the value of attribute phase_type.



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

def phase_type
  @phase_type
end

#pretty_nameObject

Returns the value of attribute pretty_name.



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

def pretty_name
  @pretty_name
end

#recurringObject

Returns the value of attribute recurring.



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

def recurring
  @recurring
end

#usagesObject

Returns the value of attribute usages.



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

def usages
  @usages
end

Instance Method Details

#to_javaObject



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/killbill/gen/api/plan_phase.rb', line 42

def to_java()
  # conversion for name [type = java.lang.String]
  @name = @name.to_s unless @name.nil?

  # conversion for pretty_name [type = java.lang.String]
  @pretty_name = @pretty_name.to_s unless @pretty_name.nil?

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

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

  # conversion for usages [type = org.killbill.billing.catalog.api.Usage[]]
  tmp = []
  (@usages || []).each do |m|
    # conversion for m [type = org.killbill.billing.catalog.api.Usage]
    m = m.to_java unless m.nil?
    tmp << m
  end
  @usages = tmp.to_java Java::org.killbill.billing.catalog.api.Usage

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

  # conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
  @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of( @phase_type.to_s ) unless @phase_type.nil?
  self
end

#to_ruby(j_obj) ⇒ Object



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/killbill/gen/api/plan_phase.rb', line 72

def to_ruby(j_obj)
  # conversion for name [type = java.lang.String]
  @name = j_obj.name

  # conversion for pretty_name [type = java.lang.String]
  @pretty_name = j_obj.pretty_name

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

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

  # conversion for usages [type = org.killbill.billing.catalog.api.Usage[]]
  @usages = j_obj.usages
  tmp = []
  (@usages || []).each do |m|
    # conversion for m [type = org.killbill.billing.catalog.api.Usage]
    m = Killbill::Plugin::Model::Usage.new.to_ruby(m) unless m.nil?
    tmp << m
  end
  @usages = tmp

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

  # conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
  @phase_type = j_obj.phase_type
  @phase_type = @phase_type.to_s.to_sym unless @phase_type.nil?
  self
end