killbill 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b3e2b2173652205054ae00074eaa95b29b28a5a0
4
- data.tar.gz: fe6277ad4bbeb755a90e5ce3883d761621f99b9f
3
+ metadata.gz: 1317a97f82ee47ef1edb43f6ae039412692e9796
4
+ data.tar.gz: 6d2dac9de214407b21145f82a6e11a6c5c039f9d
5
5
  SHA512:
6
- metadata.gz: eb8653e32d042dc14cb4abfa7c824a9c1ca455691ecf38ca7e04a2555514679773124cdff1c571e4d7148f6103884a1eb1bfbfefc64c4b81cab9854f01aed03e
7
- data.tar.gz: 2500df5527371c926a8963678e2fe187d61af4f89be8c4800e09133a6acd7440371c68813a752fbe6ed4373475a17aedcc30b5b73bdb046ba239c50ccaf77f50
6
+ metadata.gz: a9afc87e7362830ccd361ada67e17d7195c5b23145aa32044036d5c48b866da55a94994e7dceaaf2c3f5858c4ecf21c6fe4c5c5dcf7106cfd585b27b590ffc05
7
+ data.tar.gz: a6d19179afdf5241037b95984d3eff53d08bd68fba3783a2103036b4b23dacbc1dd5dc241f25138887bd519d0c586557f14bdbb045a8ae3200c8566b5f211479
data/Jarfile CHANGED
@@ -1,6 +1,6 @@
1
- jar 'org.kill-bill.billing:killbill-api', '0.9.2'
2
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.7.0'
3
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.7.0'
4
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.7.0'
5
- jar 'org.kill-bill.billing:killbill-util:tests', '0.11.1'
1
+ jar 'org.kill-bill.billing:killbill-api', '0.9.5'
2
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.7.2'
3
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.7.2'
4
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.7.2'
5
+ jar 'org.kill-bill.billing:killbill-util:tests', '0.11.2'
6
6
  jar 'javax.servlet:javax.servlet-api', '3.0.1'
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 3.1.1
2
+ Regenerate files for killbill-api 0.9.5 and killbill-plugin-api 0.7.2
3
+
1
4
  3.1.0
2
5
  Regenerate files for killbill-api 0.9.2 and killbill-plugin-api 0.7.0
3
6
  Add ActiveMerchant plugin generator
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.0
1
+ 3.1.1
@@ -1,6 +1,6 @@
1
- jar 'org.kill-bill.billing:killbill-api', '0.8.2'
2
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.6.4'
3
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.6.4'
4
- jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.6.4'
5
- jar 'org.kill-bill.billing:killbill-util:tests', '0.9.1'
1
+ jar 'org.kill-bill.billing:killbill-api', '0.9.5'
2
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.7.2'
3
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-payment', '0.7.2'
4
+ jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.7.2'
5
+ jar 'org.kill-bill.billing:killbill-util:tests', '0.11.2'
6
6
  jar 'javax.servlet:javax.servlet-api', '3.0.1'
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.rdoc_options << '--exclude' << '.'
24
24
 
25
- s.add_dependency 'killbill', '~> 3.0.0'
25
+ s.add_dependency 'killbill', '~> 3.1.0'
26
26
  s.add_dependency 'activemerchant', '~> 1.42.9'
27
27
  s.add_dependency 'activerecord', '~> 4.1.0'
28
28
  s.add_dependency 'actionpack', '~> 4.1.0'
@@ -32,7 +32,7 @@ module Killbill
32
32
 
33
33
  include org.killbill.billing.util.audit.AccountAuditLogs
34
34
 
35
- attr_accessor :audit_logs_for_account, :audit_logs_for_bundle, :audit_logs_for_subscription, :audit_logs_for_subscription_event, :audit_logs_for_blocking_state, :audit_logs_for_invoice, :audit_logs_for_invoice_item, :audit_logs_for_invoice_payment, :audit_logs_for_payment, :audit_logs_for_payment_method, :audit_logs_for_refund, :audit_logs_for_chargeback, :audit_logs_for_tag, :audit_logs_for_custom_field, :audit_logs
35
+ attr_accessor :audit_logs_for_account, :audit_logs_for_bundle, :audit_logs_for_subscription, :audit_logs_for_subscription_event, :audit_logs_for_blocking_state, :audit_logs_for_invoice, :audit_logs_for_invoice_item, :audit_logs_for_invoice_payment, :audit_logs_for_payment, :audit_logs_for_direct_payment, :audit_logs_for_direct_payment_transaction, :audit_logs_for_payment_method, :audit_logs_for_refund, :audit_logs_for_chargeback, :audit_logs_for_tag, :audit_logs_for_custom_field, :audit_logs
36
36
 
37
37
  def initialize()
38
38
  end
@@ -119,6 +119,24 @@ module Killbill
119
119
  end
120
120
  @audit_logs_for_payment = tmp
121
121
 
122
+ # conversion for audit_logs_for_direct_payment [type = java.util.List]
123
+ tmp = java.util.ArrayList.new
124
+ (@audit_logs_for_direct_payment || []).each do |m|
125
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
126
+ m = m.to_java unless m.nil?
127
+ tmp.add(m)
128
+ end
129
+ @audit_logs_for_direct_payment = tmp
130
+
131
+ # conversion for audit_logs_for_direct_payment_transaction [type = java.util.List]
132
+ tmp = java.util.ArrayList.new
133
+ (@audit_logs_for_direct_payment_transaction || []).each do |m|
134
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
135
+ m = m.to_java unless m.nil?
136
+ tmp.add(m)
137
+ end
138
+ @audit_logs_for_direct_payment_transaction = tmp
139
+
122
140
  # conversion for audit_logs_for_payment_method [type = java.util.List]
123
141
  tmp = java.util.ArrayList.new
124
142
  (@audit_logs_for_payment_method || []).each do |m|
@@ -260,6 +278,26 @@ module Killbill
260
278
  end
261
279
  @audit_logs_for_payment = tmp
262
280
 
281
+ # conversion for audit_logs_for_direct_payment [type = java.util.List]
282
+ @audit_logs_for_direct_payment = j_obj.audit_logs_for_direct_payment
283
+ tmp = []
284
+ (@audit_logs_for_direct_payment || []).each do |m|
285
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
286
+ m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
287
+ tmp << m
288
+ end
289
+ @audit_logs_for_direct_payment = tmp
290
+
291
+ # conversion for audit_logs_for_direct_payment_transaction [type = java.util.List]
292
+ @audit_logs_for_direct_payment_transaction = j_obj.audit_logs_for_direct_payment_transaction
293
+ tmp = []
294
+ (@audit_logs_for_direct_payment_transaction || []).each do |m|
295
+ # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
296
+ m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
297
+ tmp << m
298
+ end
299
+ @audit_logs_for_direct_payment_transaction = tmp
300
+
263
301
  # conversion for audit_logs_for_payment_method [type = java.util.List]
264
302
  @audit_logs_for_payment_method = j_obj.audit_logs_for_payment_method
265
303
  tmp = []
@@ -37,12 +37,15 @@ module Killbill
37
37
  end
38
38
 
39
39
 
40
- java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createAuthorization(Java::org.killbill.billing.account.api.Account, Java::java.math.BigDecimal, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
41
- def create_authorization(account, amount, externalKey, properties, context)
40
+ java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createAuthorization(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
41
+ def create_authorization(account, directPaymentId, amount, currency, externalKey, properties, context)
42
42
 
43
43
  # conversion for account [type = org.killbill.billing.account.api.Account]
44
44
  account = account.to_java unless account.nil?
45
45
 
46
+ # conversion for directPaymentId [type = java.util.UUID]
47
+ directPaymentId = java.util.UUID.fromString(directPaymentId.to_s) unless directPaymentId.nil?
48
+
46
49
  # conversion for amount [type = java.math.BigDecimal]
47
50
  if amount.nil?
48
51
  amount = java.math.BigDecimal::ZERO
@@ -50,6 +53,9 @@ module Killbill
50
53
  amount = java.math.BigDecimal.new(amount.to_s)
51
54
  end
52
55
 
56
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
57
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
58
+
53
59
  # conversion for externalKey [type = java.lang.String]
54
60
  externalKey = externalKey.to_s unless externalKey.nil?
55
61
 
@@ -65,7 +71,7 @@ module Killbill
65
71
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
66
72
  context = context.to_java unless context.nil?
67
73
  begin
68
- res = @real_java_api.create_authorization(account, amount, externalKey, properties, context)
74
+ res = @real_java_api.create_authorization(account, directPaymentId, amount, currency, externalKey, properties, context)
69
75
  # conversion for res [type = org.killbill.billing.payment.api.DirectPayment]
70
76
  res = Killbill::Plugin::Model::DirectPayment.new.to_ruby(res) unless res.nil?
71
77
  return res
@@ -74,8 +80,8 @@ module Killbill
74
80
  end
75
81
  end
76
82
 
77
- java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createCapture(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
78
- def create_capture(account, directPaymentId, amount, properties, context)
83
+ java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createCapture(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
84
+ def create_capture(account, directPaymentId, amount, currency, properties, context)
79
85
 
80
86
  # conversion for account [type = org.killbill.billing.account.api.Account]
81
87
  account = account.to_java unless account.nil?
@@ -90,6 +96,9 @@ module Killbill
90
96
  amount = java.math.BigDecimal.new(amount.to_s)
91
97
  end
92
98
 
99
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
100
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
101
+
93
102
  # conversion for properties [type = java.lang.Iterable]
94
103
  tmp = java.util.ArrayList.new
95
104
  (properties || []).each do |m|
@@ -102,7 +111,7 @@ module Killbill
102
111
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
103
112
  context = context.to_java unless context.nil?
104
113
  begin
105
- res = @real_java_api.create_capture(account, directPaymentId, amount, properties, context)
114
+ res = @real_java_api.create_capture(account, directPaymentId, amount, currency, properties, context)
106
115
  # conversion for res [type = org.killbill.billing.payment.api.DirectPayment]
107
116
  res = Killbill::Plugin::Model::DirectPayment.new.to_ruby(res) unless res.nil?
108
117
  return res
@@ -111,12 +120,15 @@ module Killbill
111
120
  end
112
121
  end
113
122
 
114
- java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createPurchase(Java::org.killbill.billing.account.api.Account, Java::java.math.BigDecimal, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
115
- def create_purchase(account, amount, externalKey, properties, context)
123
+ java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createPurchase(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
124
+ def create_purchase(account, directPaymentId, amount, currency, externalKey, properties, context)
116
125
 
117
126
  # conversion for account [type = org.killbill.billing.account.api.Account]
118
127
  account = account.to_java unless account.nil?
119
128
 
129
+ # conversion for directPaymentId [type = java.util.UUID]
130
+ directPaymentId = java.util.UUID.fromString(directPaymentId.to_s) unless directPaymentId.nil?
131
+
120
132
  # conversion for amount [type = java.math.BigDecimal]
121
133
  if amount.nil?
122
134
  amount = java.math.BigDecimal::ZERO
@@ -124,6 +136,9 @@ module Killbill
124
136
  amount = java.math.BigDecimal.new(amount.to_s)
125
137
  end
126
138
 
139
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
140
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
141
+
127
142
  # conversion for externalKey [type = java.lang.String]
128
143
  externalKey = externalKey.to_s unless externalKey.nil?
129
144
 
@@ -139,7 +154,7 @@ module Killbill
139
154
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
140
155
  context = context.to_java unless context.nil?
141
156
  begin
142
- res = @real_java_api.create_purchase(account, amount, externalKey, properties, context)
157
+ res = @real_java_api.create_purchase(account, directPaymentId, amount, currency, externalKey, properties, context)
143
158
  # conversion for res [type = org.killbill.billing.payment.api.DirectPayment]
144
159
  res = Killbill::Plugin::Model::DirectPayment.new.to_ruby(res) unless res.nil?
145
160
  return res
@@ -178,8 +193,8 @@ module Killbill
178
193
  end
179
194
  end
180
195
 
181
- java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createCredit(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
182
- def create_credit(account, directPaymentId, amount, properties, context)
196
+ java_signature 'Java::org.killbill.billing.payment.api.DirectPayment createCredit(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
197
+ def create_credit(account, directPaymentId, amount, currency, properties, context)
183
198
 
184
199
  # conversion for account [type = org.killbill.billing.account.api.Account]
185
200
  account = account.to_java unless account.nil?
@@ -194,6 +209,9 @@ module Killbill
194
209
  amount = java.math.BigDecimal.new(amount.to_s)
195
210
  end
196
211
 
212
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
213
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
214
+
197
215
  # conversion for properties [type = java.lang.Iterable]
198
216
  tmp = java.util.ArrayList.new
199
217
  (properties || []).each do |m|
@@ -206,7 +224,7 @@ module Killbill
206
224
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
207
225
  context = context.to_java unless context.nil?
208
226
  begin
209
- res = @real_java_api.create_credit(account, directPaymentId, amount, properties, context)
227
+ res = @real_java_api.create_credit(account, directPaymentId, amount, currency, properties, context)
210
228
  # conversion for res [type = org.killbill.billing.payment.api.DirectPayment]
211
229
  res = Killbill::Plugin::Model::DirectPayment.new.to_ruby(res) unless res.nil?
212
230
  return res
@@ -0,0 +1,108 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module Killbill
27
+ module Plugin
28
+ module Api
29
+
30
+ java_package 'org.killbill.billing.payment.api'
31
+ class PaymentGatewayApi
32
+
33
+ include org.killbill.billing.payment.api.PaymentGatewayApi
34
+
35
+ def initialize(real_java_api)
36
+ @real_java_api = real_java_api
37
+ end
38
+
39
+
40
+ java_signature 'Java::org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor buildFormDescriptor(Java::org.killbill.billing.account.api.Account, Java::java.lang.Iterable, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
41
+ def build_form_descriptor(account, customFields, properties, context)
42
+
43
+ # conversion for account [type = org.killbill.billing.account.api.Account]
44
+ account = account.to_java unless account.nil?
45
+
46
+ # conversion for customFields [type = java.lang.Iterable]
47
+ tmp = java.util.ArrayList.new
48
+ (customFields || []).each do |m|
49
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
50
+ m = m.to_java unless m.nil?
51
+ tmp.add(m)
52
+ end
53
+ customFields = tmp
54
+
55
+ # conversion for properties [type = java.lang.Iterable]
56
+ tmp = java.util.ArrayList.new
57
+ (properties || []).each do |m|
58
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
59
+ m = m.to_java unless m.nil?
60
+ tmp.add(m)
61
+ end
62
+ properties = tmp
63
+
64
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
65
+ context = context.to_java unless context.nil?
66
+ begin
67
+ res = @real_java_api.build_form_descriptor(account, customFields, properties, context)
68
+ # conversion for res [type = org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor]
69
+ res = Killbill::Plugin::Model::HostedPaymentPageFormDescriptor.new.to_ruby(res) unless res.nil?
70
+ return res
71
+ rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
72
+ raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
73
+ end
74
+ end
75
+
76
+ java_signature 'Java::org.killbill.billing.payment.plugin.api.GatewayNotification processNotification(Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
77
+ def process_notification(notification, pluginName, properties, context)
78
+
79
+ # conversion for notification [type = java.lang.String]
80
+ notification = notification.to_s unless notification.nil?
81
+
82
+ # conversion for pluginName [type = java.lang.String]
83
+ pluginName = pluginName.to_s unless pluginName.nil?
84
+
85
+ # conversion for properties [type = java.lang.Iterable]
86
+ tmp = java.util.ArrayList.new
87
+ (properties || []).each do |m|
88
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
89
+ m = m.to_java unless m.nil?
90
+ tmp.add(m)
91
+ end
92
+ properties = tmp
93
+
94
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
95
+ context = context.to_java unless context.nil?
96
+ begin
97
+ res = @real_java_api.process_notification(notification, pluginName, properties, context)
98
+ # conversion for res [type = org.killbill.billing.payment.plugin.api.GatewayNotification]
99
+ res = Killbill::Plugin::Model::GatewayNotification.new.to_ruby(res) unless res.nil?
100
+ return res
101
+ rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
102
+ raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
@@ -94,6 +94,7 @@ require 'killbill/gen/api/payment'
94
94
  require 'killbill/gen/api/payment_api'
95
95
  require 'killbill/gen/api/payment_api_exception'
96
96
  require 'killbill/gen/api/payment_attempt'
97
+ require 'killbill/gen/api/payment_gateway_api'
97
98
  require 'killbill/gen/api/payment_method'
98
99
  require 'killbill/gen/api/payment_method_plugin'
99
100
  require 'killbill/gen/api/plugin_property'
@@ -0,0 +1,122 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module Killbill
27
+ module Plugin
28
+ module Model
29
+
30
+ java_package 'org.killbill.billing.payment.plugin.api'
31
+ class GatewayNotification
32
+
33
+ include org.killbill.billing.payment.plugin.api.GatewayNotification
34
+
35
+ attr_accessor :kb_payment_id, :status, :entity, :headers, :properties
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for kb_payment_id [type = java.util.UUID]
42
+ @kb_payment_id = java.util.UUID.fromString(@kb_payment_id.to_s) unless @kb_payment_id.nil?
43
+
44
+ # conversion for status [type = int]
45
+ @status = @status
46
+
47
+ # conversion for entity [type = java.lang.String]
48
+ @entity = @entity.to_s unless @entity.nil?
49
+
50
+ # conversion for headers [type = java.util.Map]
51
+ tmp = java.util.HashMap.new
52
+ (@headers || {}).each do |k,v|
53
+ # conversion for k [type = java.lang.String]
54
+ k = k.to_s unless k.nil?
55
+ # conversion for v [type = java.util.List]
56
+ tmp1 = java.util.ArrayList.new
57
+ (v || []).each do |m|
58
+ # conversion for m [type = java.lang.String]
59
+ m = m.to_s unless m.nil?
60
+ tmp1.add(m)
61
+ end
62
+ v = tmp1
63
+ tmp.put(k, v)
64
+ end
65
+ @headers = tmp
66
+
67
+ # conversion for properties [type = java.util.List]
68
+ tmp = java.util.ArrayList.new
69
+ (@properties || []).each do |m|
70
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
71
+ m = m.to_java unless m.nil?
72
+ tmp.add(m)
73
+ end
74
+ @properties = tmp
75
+ self
76
+ end
77
+
78
+ def to_ruby(j_obj)
79
+ # conversion for kb_payment_id [type = java.util.UUID]
80
+ @kb_payment_id = j_obj.kb_payment_id
81
+ @kb_payment_id = @kb_payment_id.nil? ? nil : @kb_payment_id.to_s
82
+
83
+ # conversion for status [type = int]
84
+ @status = j_obj.status
85
+
86
+ # conversion for entity [type = java.lang.String]
87
+ @entity = j_obj.entity
88
+
89
+ # conversion for headers [type = java.util.Map]
90
+ @headers = j_obj.headers
91
+ tmp = {}
92
+ jtmp0 = @headers || java.util.HashMap.new
93
+ jtmp0.key_set.each do |k|
94
+ # conversion for k [type = java.lang.String]
95
+ v = jtmp0.get(k)
96
+ # conversion for v [type = java.util.List]
97
+ tmp1 = []
98
+ (v || []).each do |m|
99
+ # conversion for m [type = java.lang.String]
100
+ tmp1 << m
101
+ end
102
+ v = tmp1
103
+ tmp[k] = v
104
+ end
105
+ @headers = tmp
106
+
107
+ # conversion for properties [type = java.util.List]
108
+ @properties = j_obj.properties
109
+ tmp = []
110
+ (@properties || []).each do |m|
111
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
112
+ m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
113
+ tmp << m
114
+ end
115
+ @properties = tmp
116
+ self
117
+ end
118
+
119
+ end
120
+ end
121
+ end
122
+ end
@@ -32,12 +32,15 @@ module Killbill
32
32
 
33
33
  include org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor
34
34
 
35
- attr_accessor :form_method, :form_url, :form_fields
35
+ attr_accessor :kb_account_id, :form_method, :form_url, :form_fields, :properties
36
36
 
37
37
  def initialize()
38
38
  end
39
39
 
40
40
  def to_java()
41
+ # conversion for kb_account_id [type = java.util.UUID]
42
+ @kb_account_id = java.util.UUID.fromString(@kb_account_id.to_s) unless @kb_account_id.nil?
43
+
41
44
  # conversion for form_method [type = java.lang.String]
42
45
  @form_method = @form_method.to_s unless @form_method.nil?
43
46
 
@@ -52,10 +55,23 @@ module Killbill
52
55
  tmp.add(m)
53
56
  end
54
57
  @form_fields = tmp
58
+
59
+ # conversion for properties [type = java.util.List]
60
+ tmp = java.util.ArrayList.new
61
+ (@properties || []).each do |m|
62
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
63
+ m = m.to_java unless m.nil?
64
+ tmp.add(m)
65
+ end
66
+ @properties = tmp
55
67
  self
56
68
  end
57
69
 
58
70
  def to_ruby(j_obj)
71
+ # conversion for kb_account_id [type = java.util.UUID]
72
+ @kb_account_id = j_obj.kb_account_id
73
+ @kb_account_id = @kb_account_id.nil? ? nil : @kb_account_id.to_s
74
+
59
75
  # conversion for form_method [type = java.lang.String]
60
76
  @form_method = j_obj.form_method
61
77
 
@@ -71,6 +87,16 @@ module Killbill
71
87
  tmp << m
72
88
  end
73
89
  @form_fields = tmp
90
+
91
+ # conversion for properties [type = java.util.List]
92
+ @properties = j_obj.properties
93
+ tmp = []
94
+ (@properties || []).each do |m|
95
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
96
+ m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
97
+ tmp << m
98
+ end
99
+ @properties = tmp
74
100
  self
75
101
  end
76
102
 
@@ -684,14 +684,20 @@ module Killbill
684
684
  end
685
685
  end
686
686
 
687
- java_signature 'Java::org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor buildFormDescriptor(Java::java.util.UUID, Java::org.killbill.billing.payment.plugin.api.HostedPaymentPageDescriptorFields, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
688
- def build_form_descriptor(kbAccountId, descriptorFields, properties, context)
687
+ java_signature 'Java::org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor buildFormDescriptor(Java::java.util.UUID, Java::java.lang.Iterable, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
688
+ def build_form_descriptor(kbAccountId, customFields, properties, context)
689
689
 
690
690
  # conversion for kbAccountId [type = java.util.UUID]
691
691
  kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
692
692
 
693
- # conversion for descriptorFields [type = org.killbill.billing.payment.plugin.api.HostedPaymentPageDescriptorFields]
694
- descriptorFields = Killbill::Plugin::Model::HostedPaymentPageDescriptorFields.new.to_ruby(descriptorFields) unless descriptorFields.nil?
693
+ # conversion for customFields [type = java.lang.Iterable]
694
+ tmp = []
695
+ (customFields.nil? ? [] : customFields.iterator).each do |m|
696
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
697
+ m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
698
+ tmp << m
699
+ end
700
+ customFields = tmp
695
701
 
696
702
  # conversion for properties [type = java.lang.Iterable]
697
703
  tmp = []
@@ -702,10 +708,10 @@ module Killbill
702
708
  end
703
709
  properties = tmp
704
710
 
705
- # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
706
- context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
711
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
712
+ context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
707
713
  begin
708
- res = @delegate_plugin.build_form_descriptor(kbAccountId, descriptorFields, properties, context)
714
+ res = @delegate_plugin.build_form_descriptor(kbAccountId, customFields, properties, context)
709
715
  # conversion for res [type = org.killbill.billing.payment.plugin.api.HostedPaymentPageFormDescriptor]
710
716
  res = res.to_java unless res.nil?
711
717
  return res
@@ -721,7 +727,7 @@ module Killbill
721
727
  end
722
728
  end
723
729
 
724
- java_signature 'Java::org.killbill.billing.payment.plugin.api.HostedPaymentPageNotification processNotification(Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
730
+ java_signature 'Java::org.killbill.billing.payment.plugin.api.GatewayNotification processNotification(Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
725
731
  def process_notification(notification, properties, context)
726
732
 
727
733
  # conversion for notification [type = java.lang.String]
@@ -735,11 +741,11 @@ module Killbill
735
741
  end
736
742
  properties = tmp
737
743
 
738
- # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
739
- context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
744
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
745
+ context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
740
746
  begin
741
747
  res = @delegate_plugin.process_notification(notification, properties, context)
742
- # conversion for res [type = org.killbill.billing.payment.plugin.api.HostedPaymentPageNotification]
748
+ # conversion for res [type = org.killbill.billing.payment.plugin.api.GatewayNotification]
743
749
  res = res.to_java unless res.nil?
744
750
  return res
745
751
  rescue Exception => e
@@ -23,14 +23,13 @@
23
23
  #
24
24
 
25
25
 
26
- require 'killbill/gen/plugin-api/hosted_payment_page_descriptor_fields'
27
- require 'killbill/gen/plugin-api/hosted_payment_page_form_descriptor'
28
- require 'killbill/gen/plugin-api/hosted_payment_page_notification'
29
26
  require 'killbill/gen/plugin-api/payment_method_info_plugin'
30
27
  require 'killbill/gen/plugin-api/payment_plugin_api'
31
28
  require 'killbill/gen/plugin-api/payment_plugin_api_exception'
32
29
  require 'killbill/gen/plugin-api/ext_bus_event'
33
30
  require 'killbill/gen/plugin-api/notification_plugin_api'
34
31
  require 'killbill/gen/plugin-api/currency_plugin_api'
32
+ require 'killbill/gen/plugin-api/gateway_notification'
33
+ require 'killbill/gen/plugin-api/hosted_payment_page_form_descriptor'
35
34
  require 'killbill/gen/plugin-api/payment_info_plugin'
36
35
  require 'killbill/gen/plugin-api/refund_info_plugin'
@@ -0,0 +1,66 @@
1
+ require 'spec_helper'
2
+
3
+ class TestGatewayNotification
4
+ include org.killbill.billing.payment.plugin.api.GatewayNotification
5
+
6
+ def initialize(headers)
7
+ @headers = headers
8
+ end
9
+
10
+ java_signature 'java.util.UUID getKbPaymentId'
11
+ def kb_payment_id
12
+ end
13
+
14
+ java_signature 'int getStatus'
15
+ def status
16
+ end
17
+
18
+ java_signature 'java.lang.String getEntity'
19
+ def entity
20
+ end
21
+
22
+ java_signature 'java.util.Map<java.lang.String, java.util.List<java.lang.String>> getHeaders'
23
+ def headers
24
+ @headers
25
+ end
26
+
27
+ java_signature 'java.util.List<org.killbill.billing.payment.api.PluginProperty> getProperties'
28
+ def properties
29
+ end
30
+ end
31
+
32
+ describe Killbill::Plugin do
33
+
34
+ it 'should be able to handle generic Maps' do
35
+ # jmap is a Map<String, String>
36
+ jmap = java.util.HashMap.new
37
+ jlistA = java.util.LinkedList.new
38
+ jlistA.add('Microsoft-IIS/8.0')
39
+ jmap.put('Server', jlistA)
40
+ jlistB = java.util.LinkedList.new
41
+ jlistB.add('no-cache')
42
+ jlistB.add('no-store')
43
+ jmap.put('Cache-Control', jlistB)
44
+
45
+ jgw_notification = TestGatewayNotification.new(jmap)
46
+ check_notification(jgw_notification)
47
+
48
+ rgw_notification = Killbill::Plugin::Model::GatewayNotification.new
49
+ rgw_notification.to_ruby(jgw_notification)
50
+ check_notification(rgw_notification)
51
+
52
+ jgw_notification2 = rgw_notification.to_java
53
+ check_notification(jgw_notification2)
54
+ end
55
+
56
+ private
57
+
58
+ def check_notification(notification)
59
+ notification.headers.size.should == 2
60
+ notification.headers['Server'].size.should == 1
61
+ notification.headers['Server'][0].should == 'Microsoft-IIS/8.0'
62
+ notification.headers['Cache-Control'].size.should == 2
63
+ notification.headers['Cache-Control'][0].should == 'no-cache'
64
+ notification.headers['Cache-Control'][1].should == 'no-store'
65
+ end
66
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-24 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -261,6 +261,7 @@ files:
261
261
  - lib/killbill/gen/api/payment_api.rb
262
262
  - lib/killbill/gen/api/payment_api_exception.rb
263
263
  - lib/killbill/gen/api/payment_attempt.rb
264
+ - lib/killbill/gen/api/payment_gateway_api.rb
264
265
  - lib/killbill/gen/api/payment_method.rb
265
266
  - lib/killbill/gen/api/payment_method_kv_info.rb
266
267
  - lib/killbill/gen/api/payment_method_plugin.rb
@@ -309,9 +310,8 @@ files:
309
310
  - lib/killbill/gen/plugin-api/currency_plugin_api.rb
310
311
  - lib/killbill/gen/plugin-api/customer.rb
311
312
  - lib/killbill/gen/plugin-api/ext_bus_event.rb
312
- - lib/killbill/gen/plugin-api/hosted_payment_page_descriptor_fields.rb
313
+ - lib/killbill/gen/plugin-api/gateway_notification.rb
313
314
  - lib/killbill/gen/plugin-api/hosted_payment_page_form_descriptor.rb
314
- - lib/killbill/gen/plugin-api/hosted_payment_page_notification.rb
315
315
  - lib/killbill/gen/plugin-api/notification_plugin_api.rb
316
316
  - lib/killbill/gen/plugin-api/payment_info_plugin.rb
317
317
  - lib/killbill/gen/plugin-api/payment_method_info_plugin.rb
@@ -347,6 +347,7 @@ files:
347
347
  - script/generate
348
348
  - spec/killbill/base_plugin_spec.rb
349
349
  - spec/killbill/config_test.ru
350
+ - spec/killbill/gen_conversions_spec.rb
350
351
  - spec/killbill/helpers/payment_method_spec.rb
351
352
  - spec/killbill/helpers/response_spec.rb
352
353
  - spec/killbill/helpers/test_schema.rb
@@ -392,6 +393,7 @@ summary: Framework to write Kill Bill plugins in Ruby.
392
393
  test_files:
393
394
  - spec/killbill/base_plugin_spec.rb
394
395
  - spec/killbill/config_test.ru
396
+ - spec/killbill/gen_conversions_spec.rb
395
397
  - spec/killbill/helpers/payment_method_spec.rb
396
398
  - spec/killbill/helpers/response_spec.rb
397
399
  - spec/killbill/helpers/test_schema.rb
@@ -1,145 +0,0 @@
1
- ###################################################################################
2
- # #
3
- # Copyright 2010-2013 Ning, Inc. #
4
- # #
5
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
8
- # #
9
- # http://www.apache.org/licenses/LICENSE-2.0 #
10
- # #
11
- # Unless required by applicable law or agreed to in writing, software #
12
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
- # License for the specific language governing permissions and limitations #
15
- # under the License. #
16
- # #
17
- ###################################################################################
18
-
19
-
20
- #
21
- # DO NOT EDIT!!!
22
- # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
- #
24
-
25
-
26
- module Killbill
27
- module Plugin
28
- module Model
29
-
30
- java_package 'org.killbill.billing.payment.plugin.api'
31
- class HostedPaymentPageDescriptorFields
32
-
33
- include org.killbill.billing.payment.plugin.api.HostedPaymentPageDescriptorFields
34
-
35
- attr_accessor :amount, :order, :credential2, :credential3, :credential4, :transaction_type, :auth_code, :account_name, :notify_url, :return_url, :forward_url, :cancel_return_url, :redirect_param, :description, :tax, :shipping
36
-
37
- def initialize()
38
- end
39
-
40
- def to_java()
41
- # conversion for amount [type = java.lang.String]
42
- @amount = @amount.to_s unless @amount.nil?
43
-
44
- # conversion for order [type = java.lang.String]
45
- @order = @order.to_s unless @order.nil?
46
-
47
- # conversion for credential2 [type = java.lang.String]
48
- @credential2 = @credential2.to_s unless @credential2.nil?
49
-
50
- # conversion for credential3 [type = java.lang.String]
51
- @credential3 = @credential3.to_s unless @credential3.nil?
52
-
53
- # conversion for credential4 [type = java.lang.String]
54
- @credential4 = @credential4.to_s unless @credential4.nil?
55
-
56
- # conversion for transaction_type [type = java.lang.String]
57
- @transaction_type = @transaction_type.to_s unless @transaction_type.nil?
58
-
59
- # conversion for auth_code [type = java.lang.String]
60
- @auth_code = @auth_code.to_s unless @auth_code.nil?
61
-
62
- # conversion for account_name [type = java.lang.String]
63
- @account_name = @account_name.to_s unless @account_name.nil?
64
-
65
- # conversion for notify_url [type = java.lang.String]
66
- @notify_url = @notify_url.to_s unless @notify_url.nil?
67
-
68
- # conversion for return_url [type = java.lang.String]
69
- @return_url = @return_url.to_s unless @return_url.nil?
70
-
71
- # conversion for forward_url [type = java.lang.String]
72
- @forward_url = @forward_url.to_s unless @forward_url.nil?
73
-
74
- # conversion for cancel_return_url [type = java.lang.String]
75
- @cancel_return_url = @cancel_return_url.to_s unless @cancel_return_url.nil?
76
-
77
- # conversion for redirect_param [type = java.lang.String]
78
- @redirect_param = @redirect_param.to_s unless @redirect_param.nil?
79
-
80
- # conversion for description [type = java.lang.String]
81
- @description = @description.to_s unless @description.nil?
82
-
83
- # conversion for tax [type = java.lang.String]
84
- @tax = @tax.to_s unless @tax.nil?
85
-
86
- # conversion for shipping [type = java.lang.String]
87
- @shipping = @shipping.to_s unless @shipping.nil?
88
- self
89
- end
90
-
91
- def to_ruby(j_obj)
92
- # conversion for amount [type = java.lang.String]
93
- @amount = j_obj.amount
94
-
95
- # conversion for order [type = java.lang.String]
96
- @order = j_obj.order
97
-
98
- # conversion for credential2 [type = java.lang.String]
99
- @credential2 = j_obj.credential2
100
-
101
- # conversion for credential3 [type = java.lang.String]
102
- @credential3 = j_obj.credential3
103
-
104
- # conversion for credential4 [type = java.lang.String]
105
- @credential4 = j_obj.credential4
106
-
107
- # conversion for transaction_type [type = java.lang.String]
108
- @transaction_type = j_obj.transaction_type
109
-
110
- # conversion for auth_code [type = java.lang.String]
111
- @auth_code = j_obj.auth_code
112
-
113
- # conversion for account_name [type = java.lang.String]
114
- @account_name = j_obj.account_name
115
-
116
- # conversion for notify_url [type = java.lang.String]
117
- @notify_url = j_obj.notify_url
118
-
119
- # conversion for return_url [type = java.lang.String]
120
- @return_url = j_obj.return_url
121
-
122
- # conversion for forward_url [type = java.lang.String]
123
- @forward_url = j_obj.forward_url
124
-
125
- # conversion for cancel_return_url [type = java.lang.String]
126
- @cancel_return_url = j_obj.cancel_return_url
127
-
128
- # conversion for redirect_param [type = java.lang.String]
129
- @redirect_param = j_obj.redirect_param
130
-
131
- # conversion for description [type = java.lang.String]
132
- @description = j_obj.description
133
-
134
- # conversion for tax [type = java.lang.String]
135
- @tax = j_obj.tax
136
-
137
- # conversion for shipping [type = java.lang.String]
138
- @shipping = j_obj.shipping
139
- self
140
- end
141
-
142
- end
143
- end
144
- end
145
- end
@@ -1,129 +0,0 @@
1
- ###################################################################################
2
- # #
3
- # Copyright 2010-2013 Ning, Inc. #
4
- # #
5
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
8
- # #
9
- # http://www.apache.org/licenses/LICENSE-2.0 #
10
- # #
11
- # Unless required by applicable law or agreed to in writing, software #
12
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
- # License for the specific language governing permissions and limitations #
15
- # under the License. #
16
- # #
17
- ###################################################################################
18
-
19
-
20
- #
21
- # DO NOT EDIT!!!
22
- # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
- #
24
-
25
-
26
- module Killbill
27
- module Plugin
28
- module Model
29
-
30
- java_package 'org.killbill.billing.payment.plugin.api'
31
- class HostedPaymentPageNotification
32
-
33
- include org.killbill.billing.payment.plugin.api.HostedPaymentPageNotification
34
-
35
- attr_accessor :kb_payment_id, :is_complete, :item_id, :transaction_id, :received_at, :payer_email, :receiver_email, :security_key, :gross_amount, :status
36
-
37
- def initialize()
38
- end
39
-
40
- def to_java()
41
- # conversion for kb_payment_id [type = java.util.UUID]
42
- @kb_payment_id = java.util.UUID.fromString(@kb_payment_id.to_s) unless @kb_payment_id.nil?
43
-
44
- # conversion for is_complete [type = boolean]
45
- @is_complete = @is_complete.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_complete)
46
-
47
- # conversion for item_id [type = java.lang.String]
48
- @item_id = @item_id.to_s unless @item_id.nil?
49
-
50
- # conversion for transaction_id [type = java.lang.String]
51
- @transaction_id = @transaction_id.to_s unless @transaction_id.nil?
52
-
53
- # conversion for received_at [type = org.joda.time.DateTime]
54
- if !@received_at.nil?
55
- @received_at = (@received_at.kind_of? Time) ? DateTime.parse(@received_at.to_s) : @received_at
56
- @received_at = Java::org.joda.time.DateTime.new(@received_at.to_s, Java::org.joda.time.DateTimeZone::UTC)
57
- end
58
-
59
- # conversion for payer_email [type = java.lang.String]
60
- @payer_email = @payer_email.to_s unless @payer_email.nil?
61
-
62
- # conversion for receiver_email [type = java.lang.String]
63
- @receiver_email = @receiver_email.to_s unless @receiver_email.nil?
64
-
65
- # conversion for security_key [type = java.lang.String]
66
- @security_key = @security_key.to_s unless @security_key.nil?
67
-
68
- # conversion for gross_amount [type = java.math.BigDecimal]
69
- if @gross_amount.nil?
70
- @gross_amount = java.math.BigDecimal::ZERO
71
- else
72
- @gross_amount = java.math.BigDecimal.new(@gross_amount.to_s)
73
- end
74
-
75
- # conversion for status [type = java.lang.String]
76
- @status = @status.to_s unless @status.nil?
77
- self
78
- end
79
-
80
- def to_ruby(j_obj)
81
- # conversion for kb_payment_id [type = java.util.UUID]
82
- @kb_payment_id = j_obj.kb_payment_id
83
- @kb_payment_id = @kb_payment_id.nil? ? nil : @kb_payment_id.to_s
84
-
85
- # conversion for is_complete [type = boolean]
86
- @is_complete = j_obj.is_complete
87
- if @is_complete.nil?
88
- @is_complete = false
89
- else
90
- tmp_bool = (@is_complete.java_kind_of? java.lang.Boolean) ? @is_complete.boolean_value : @is_complete
91
- @is_complete = tmp_bool ? true : false
92
- end
93
-
94
- # conversion for item_id [type = java.lang.String]
95
- @item_id = j_obj.item_id
96
-
97
- # conversion for transaction_id [type = java.lang.String]
98
- @transaction_id = j_obj.transaction_id
99
-
100
- # conversion for received_at [type = org.joda.time.DateTime]
101
- @received_at = j_obj.received_at
102
- if !@received_at.nil?
103
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
104
- str = fmt.print(@received_at)
105
- @received_at = DateTime.iso8601(str)
106
- end
107
-
108
- # conversion for payer_email [type = java.lang.String]
109
- @payer_email = j_obj.payer_email
110
-
111
- # conversion for receiver_email [type = java.lang.String]
112
- @receiver_email = j_obj.receiver_email
113
-
114
- # conversion for security_key [type = java.lang.String]
115
- @security_key = j_obj.security_key
116
-
117
- # conversion for gross_amount [type = java.math.BigDecimal]
118
- @gross_amount = j_obj.gross_amount
119
- @gross_amount = @gross_amount.nil? ? 0 : BigDecimal.new(@gross_amount.to_s)
120
-
121
- # conversion for status [type = java.lang.String]
122
- @status = j_obj.status
123
- self
124
- end
125
-
126
- end
127
- end
128
- end
129
- end