Class: Killbill::Plugin::Model::PlanPhaseSpecifier

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePlanPhaseSpecifier

Returns a new instance of PlanPhaseSpecifier.



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

def initialize()
end

Instance Attribute Details

#billing_periodObject

Returns the value of attribute billing_period.



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

def billing_period
  @billing_period
end

#phase_typeObject

Returns the value of attribute phase_type.



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

def phase_type
  @phase_type
end

#plan_nameObject

Returns the value of attribute plan_name.



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

def plan_name
  @plan_name
end

#price_list_nameObject

Returns the value of attribute price_list_name.



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

def price_list_name
  @price_list_name
end

#product_nameObject

Returns the value of attribute product_name.



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

def product_name
  @product_name
end

Instance Method Details

#to_javaObject



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

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

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

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

  # conversion for price_list_name [type = java.lang.String]
  @price_list_name = @price_list_name.to_s unless @price_list_name.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?
  Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier.new(@plan_name, @product_name, @billing_period, @price_list_name, @phase_type)
end

#to_ruby(j_obj) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/killbill/gen/api/plan_phase_specifier.rb', line 58

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

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

  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
  @billing_period = j_obj.billing_period
  @billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?

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

  # 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