Class: Killbill::Plugin::Model::OnFailurePaymentControlResult

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOnFailurePaymentControlResult

Returns a new instance of OnFailurePaymentControlResult.



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

def initialize()
end

Instance Attribute Details

#adjusted_plugin_propertiesObject

Returns the value of attribute adjusted_plugin_properties.



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

def adjusted_plugin_properties
  @adjusted_plugin_properties
end

#next_retry_dateObject

Returns the value of attribute next_retry_date.



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

def next_retry_date
  @next_retry_date
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/plugin-api/on_failure_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 next_retry_date [type = org.joda.time.DateTime]
  if !@next_retry_date.nil?
    @next_retry_date =  (@next_retry_date.kind_of? Time) ? DateTime.parse(@next_retry_date.to_s) : @next_retry_date
    @next_retry_date = Java::org.joda.time.DateTime.new(@next_retry_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
  end
  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/plugin-api/on_failure_payment_control_result.rb', line 60

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 next_retry_date [type = org.joda.time.DateTime]
  @next_retry_date = j_obj.next_retry_date
  if !@next_retry_date.nil?
    fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
    str = fmt.print(@next_retry_date)
    @next_retry_date = DateTime.iso8601(str)
  end
  self
end