Class: Killbill::Plugin::Model::PriorPaymentControlResult

Inherits:
Object
  • Object
show all
Defined in:
lib/killbill/gen/plugin-api/prior_payment_control_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePriorPaymentControlResult

Returns a new instance of PriorPaymentControlResult.



39
40
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 39

def initialize()
end

Instance Attribute Details

#adjusted_amountObject

Returns the value of attribute adjusted_amount.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def adjusted_amount
  @adjusted_amount
end

#adjusted_currencyObject

Returns the value of attribute adjusted_currency.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def adjusted_currency
  @adjusted_currency
end

#adjusted_payment_method_idObject

Returns the value of attribute adjusted_payment_method_id.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def adjusted_payment_method_id
  @adjusted_payment_method_id
end

#adjusted_plugin_nameObject

Returns the value of attribute adjusted_plugin_name.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def adjusted_plugin_name
  @adjusted_plugin_name
end

#adjusted_plugin_propertiesObject

Returns the value of attribute adjusted_plugin_properties.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def adjusted_plugin_properties
  @adjusted_plugin_properties
end

#is_abortedObject

Returns the value of attribute is_aborted.



37
38
39
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 37

def is_aborted
  @is_aborted
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
71
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 42

def to_java()
  # conversion for adjusted_plugin_properties [type = java.lang.Iterable]
  tmp = java.util.ArrayList.new
  (@adjusted_plugin_properties || []).each do |m|
    # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
    m = m.to_java unless m.nil?
    tmp.add(m)
  end
  @adjusted_plugin_properties = tmp

  # conversion for is_aborted [type = boolean]
  @is_aborted = @is_aborted.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_aborted)

  # conversion for adjusted_amount [type = java.math.BigDecimal]
  if @adjusted_amount.nil?
    @adjusted_amount = java.math.BigDecimal::ZERO
  else
    @adjusted_amount = java.math.BigDecimal.new(@adjusted_amount.to_s)
  end

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

  # conversion for adjusted_payment_method_id [type = java.util.UUID]
  @adjusted_payment_method_id = java.util.UUID.fromString(@adjusted_payment_method_id.to_s) unless @adjusted_payment_method_id.nil?

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

#to_ruby(j_obj) ⇒ Object



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
106
107
108
# File 'lib/killbill/gen/plugin-api/prior_payment_control_result.rb', line 73

def to_ruby(j_obj)
  # conversion for adjusted_plugin_properties [type = java.lang.Iterable]
  @adjusted_plugin_properties = j_obj.adjusted_plugin_properties
  tmp = []
  (@adjusted_plugin_properties.nil? ? [] : @adjusted_plugin_properties.iterator).each do |m|
    # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
    m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
    tmp << m
  end
  @adjusted_plugin_properties = tmp

  # conversion for is_aborted [type = boolean]
  @is_aborted = j_obj.is_aborted
  if @is_aborted.nil?
    @is_aborted = false
  else
    tmp_bool = (@is_aborted.java_kind_of? java.lang.Boolean) ? @is_aborted.boolean_value : @is_aborted
    @is_aborted = tmp_bool ? true : false
  end

  # conversion for adjusted_amount [type = java.math.BigDecimal]
  @adjusted_amount = j_obj.adjusted_amount
  @adjusted_amount = @adjusted_amount.nil? ? 0 : BigDecimal.new(@adjusted_amount.to_s)

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

  # conversion for adjusted_payment_method_id [type = java.util.UUID]
  @adjusted_payment_method_id = j_obj.adjusted_payment_method_id
  @adjusted_payment_method_id = @adjusted_payment_method_id.nil? ? nil : @adjusted_payment_method_id.to_s

  # conversion for adjusted_plugin_name [type = java.lang.String]
  @adjusted_plugin_name = j_obj.adjusted_plugin_name
  self
end