Class: Killbill::Plugin::Model::GatewayNotification

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGatewayNotification

Returns a new instance of GatewayNotification.



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

def initialize()
end

Instance Attribute Details

#entityObject

Returns the value of attribute entity.



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

def entity
  @entity
end

#headersObject

Returns the value of attribute headers.



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

def headers
  @headers
end

#kb_payment_idObject

Returns the value of attribute kb_payment_id.



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

def kb_payment_id
  @kb_payment_id
end

#propertiesObject

Returns the value of attribute properties.



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

def properties
  @properties
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
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
72
73
74
75
76
77
78
# File 'lib/killbill/gen/plugin-api/gateway_notification.rb', line 42

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

  # conversion for status [type = int]
  @status = @status

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

  # conversion for headers [type = java.util.Map]
  tmp = java.util.HashMap.new
  (@headers || {}).each do |k,v|
    # conversion for k [type = java.lang.String]
    k = k.to_s unless k.nil?
      # conversion for v [type = java.util.List]
      tmp1 = java.util.ArrayList.new
      (v || []).each do |m|
        # conversion for m [type = java.lang.String]
        m = m.to_s unless m.nil?
        tmp1.add(m)
      end
      v = tmp1
      tmp.put(k, v)
    end
  @headers = tmp

  # conversion for properties [type = java.util.List]
  tmp = java.util.ArrayList.new
  (@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
  @properties = tmp
  self
end

#to_ruby(j_obj) ⇒ Object



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
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/killbill/gen/plugin-api/gateway_notification.rb', line 80

def to_ruby(j_obj)
  # conversion for kb_payment_id [type = java.util.UUID]
  @kb_payment_id = j_obj.kb_payment_id
  @kb_payment_id = @kb_payment_id.nil? ? nil : @kb_payment_id.to_s

  # conversion for status [type = int]
  @status = j_obj.status

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

  # conversion for headers [type = java.util.Map]
  @headers = j_obj.headers
  tmp = {}
  jtmp0 = @headers || java.util.HashMap.new
  jtmp0.key_set.each do |k|
    # conversion for k [type = java.lang.String]
    v = jtmp0.get(k)
      # conversion for v [type = java.util.List]
      tmp1 = []
      (v || []).each do |m|
        # conversion for m [type = java.lang.String]
        tmp1 << m
      end
      v = tmp1
      tmp[k] = v
    end
  @headers = tmp

  # conversion for properties [type = java.util.List]
  @properties = j_obj.properties
  tmp = []
  (@properties || []).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
  @properties = tmp
  self
end