killbill 3.1.4 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Jarfile +1 -1
- data/NEWS +3 -0
- data/VERSION +1 -1
- data/killbill.gemspec +1 -1
- data/lib/killbill.rb +1 -1
- data/lib/killbill/gen/api/account.rb +19 -18
- data/lib/killbill/gen/api/account_api_exception.rb +19 -18
- data/lib/killbill/gen/api/account_audit_logs.rb +19 -18
- data/lib/killbill/gen/api/account_audit_logs_for_object_type.rb +19 -18
- data/lib/killbill/gen/api/account_data.rb +19 -18
- data/lib/killbill/gen/api/account_email.rb +19 -18
- data/lib/killbill/gen/api/account_user_api.rb +19 -18
- data/lib/killbill/gen/api/audit_log.rb +19 -18
- data/lib/killbill/gen/api/audit_user_api.rb +19 -18
- data/lib/killbill/gen/api/billing_exception_base.rb +19 -18
- data/lib/killbill/gen/api/block.rb +19 -18
- data/lib/killbill/gen/api/blockable.rb +19 -18
- data/lib/killbill/gen/api/blocking_api_exception.rb +19 -18
- data/lib/killbill/gen/api/blocking_state.rb +19 -18
- data/lib/killbill/gen/api/call_context.rb +19 -18
- data/lib/killbill/gen/api/catalog.rb +19 -18
- data/lib/killbill/gen/api/catalog_api_exception.rb +19 -18
- data/lib/killbill/gen/api/catalog_user_api.rb +19 -18
- data/lib/killbill/gen/api/column_info.rb +19 -18
- data/lib/killbill/gen/api/control_tag.rb +19 -18
- data/lib/killbill/gen/api/currency_conversion.rb +19 -18
- data/lib/killbill/gen/api/currency_conversion_api.rb +19 -18
- data/lib/killbill/gen/api/currency_conversion_exception.rb +19 -18
- data/lib/killbill/gen/api/currency_value_null.rb +19 -18
- data/lib/killbill/gen/api/custom_field.rb +19 -18
- data/lib/killbill/gen/api/custom_field_api_exception.rb +19 -18
- data/lib/killbill/gen/api/custom_field_user_api.rb +19 -18
- data/lib/killbill/gen/api/database_export_output_stream.rb +19 -18
- data/lib/killbill/gen/api/duration.rb +19 -18
- data/lib/killbill/gen/api/entitlement.rb +19 -18
- data/lib/killbill/gen/api/entitlement_ao_status_dry_run.rb +19 -18
- data/lib/killbill/gen/api/entitlement_api.rb +19 -18
- data/lib/killbill/gen/api/entitlement_api_exception.rb +19 -18
- data/lib/killbill/gen/api/entity.rb +19 -18
- data/lib/killbill/gen/api/fixed.rb +19 -18
- data/lib/killbill/gen/api/illegal_plan_change.rb +19 -18
- data/lib/killbill/gen/api/international_price.rb +19 -18
- data/lib/killbill/gen/api/invalid_config_exception.rb +19 -18
- data/lib/killbill/gen/api/invoice.rb +19 -18
- data/lib/killbill/gen/api/invoice_api_exception.rb +19 -18
- data/lib/killbill/gen/api/invoice_creation_event.rb +19 -18
- data/lib/killbill/gen/api/invoice_formatter.rb +19 -18
- data/lib/killbill/gen/api/invoice_item.rb +19 -18
- data/lib/killbill/gen/api/invoice_item_formatter.rb +19 -18
- data/lib/killbill/gen/api/invoice_payment.rb +19 -18
- data/lib/killbill/gen/api/invoice_payment_api.rb +19 -18
- data/lib/killbill/gen/api/invoice_user_api.rb +19 -18
- data/lib/killbill/gen/api/limit.rb +19 -18
- data/lib/killbill/gen/api/listing.rb +19 -18
- data/lib/killbill/gen/api/migration_plan.rb +19 -18
- data/lib/killbill/gen/api/mutable_account_data.rb +19 -18
- data/lib/killbill/gen/api/osgi_killbill.rb +22 -21
- data/lib/killbill/gen/api/osgi_plugin_properties.rb +19 -18
- data/lib/killbill/gen/api/pagination.rb +19 -18
- data/lib/killbill/gen/api/{direct_payment.rb → payment.rb} +24 -23
- data/lib/killbill/gen/api/payment_api.rb +539 -347
- data/lib/killbill/gen/api/payment_api_exception.rb +19 -18
- data/lib/killbill/gen/api/payment_gateway_api.rb +19 -18
- data/lib/killbill/gen/api/payment_method.rb +19 -18
- data/lib/killbill/gen/api/payment_method_plugin.rb +19 -18
- data/lib/killbill/gen/api/payment_options.rb +19 -18
- data/lib/killbill/gen/api/{direct_payment_transaction.rb → payment_transaction.rb} +27 -26
- data/lib/killbill/gen/api/plan.rb +19 -18
- data/lib/killbill/gen/api/plan_change_result.rb +19 -18
- data/lib/killbill/gen/api/plan_phase.rb +19 -18
- data/lib/killbill/gen/api/plan_phase_specifier.rb +19 -18
- data/lib/killbill/gen/api/plan_specifier.rb +19 -18
- data/lib/killbill/gen/api/plugin_config_service_api.rb +19 -18
- data/lib/killbill/gen/api/plugin_property.rb +19 -18
- data/lib/killbill/gen/api/price.rb +19 -18
- data/lib/killbill/gen/api/price_list.rb +19 -18
- data/lib/killbill/gen/api/price_list_set.rb +19 -18
- data/lib/killbill/gen/api/product.rb +19 -18
- data/lib/killbill/gen/api/rate.rb +19 -18
- data/lib/killbill/gen/api/record_id_api.rb +19 -18
- data/lib/killbill/gen/api/recurring.rb +19 -18
- data/lib/killbill/gen/api/refund.rb +19 -18
- data/lib/killbill/gen/api/require_gen.rb +22 -21
- data/lib/killbill/gen/api/rolled_up_usage.rb +19 -18
- data/lib/killbill/gen/api/security_api_exception.rb +19 -18
- data/lib/killbill/gen/api/static_catalog.rb +19 -18
- data/lib/killbill/gen/api/subscription.rb +19 -18
- data/lib/killbill/gen/api/subscription_api.rb +19 -18
- data/lib/killbill/gen/api/subscription_api_exception.rb +19 -18
- data/lib/killbill/gen/api/subscription_bundle.rb +19 -18
- data/lib/killbill/gen/api/subscription_bundle_timeline.rb +19 -18
- data/lib/killbill/gen/api/subscription_event.rb +19 -18
- data/lib/killbill/gen/api/tag.rb +19 -18
- data/lib/killbill/gen/api/tag_api_exception.rb +19 -18
- data/lib/killbill/gen/api/tag_definition.rb +19 -18
- data/lib/killbill/gen/api/tag_definition_api_exception.rb +19 -18
- data/lib/killbill/gen/api/tag_user_api.rb +19 -18
- data/lib/killbill/gen/api/tenant.rb +19 -18
- data/lib/killbill/gen/api/tenant_api_exception.rb +19 -18
- data/lib/killbill/gen/api/tenant_context.rb +19 -18
- data/lib/killbill/gen/api/tenant_data.rb +19 -18
- data/lib/killbill/gen/api/tenant_kv.rb +19 -18
- data/lib/killbill/gen/api/tenant_user_api.rb +19 -18
- data/lib/killbill/gen/api/tier.rb +19 -18
- data/lib/killbill/gen/api/tiered_block.rb +19 -18
- data/lib/killbill/gen/api/unit.rb +19 -18
- data/lib/killbill/gen/api/usage.rb +19 -18
- data/lib/killbill/gen/api/usage_user_api.rb +19 -18
- data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +17 -12
- data/lib/killbill/helpers/active_merchant/payment_plugin.rb +44 -42
- metadata +6 -7
- data/lib/killbill/gen/api/direct_payment_api.rb +0 -959
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2010-2013 Ning, Inc.
|
|
4
|
-
# Copyright 2014
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
18
|
-
|
|
1
|
+
#############################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
6
|
+
# #
|
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
9
|
+
# License. You may obtain a copy of the License at: #
|
|
10
|
+
# #
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
12
|
+
# #
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
16
|
+
# License for the specific language governing permissions and limitations #
|
|
17
|
+
# under the License. #
|
|
18
|
+
# #
|
|
19
|
+
#############################################################################################
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
#
|
|
@@ -29,9 +30,9 @@ module Killbill
|
|
|
29
30
|
module Model
|
|
30
31
|
|
|
31
32
|
java_package 'org.killbill.billing.payment.api'
|
|
32
|
-
class
|
|
33
|
+
class Payment
|
|
33
34
|
|
|
34
|
-
include org.killbill.billing.payment.api.
|
|
35
|
+
include org.killbill.billing.payment.api.Payment
|
|
35
36
|
|
|
36
37
|
attr_accessor :id, :created_date, :updated_date, :account_id, :payment_method_id, :payment_number, :external_key, :auth_amount, :captured_amount, :purchased_amount, :credited_amount, :refunded_amount, :is_auth_voided, :currency, :transactions
|
|
37
38
|
|
|
@@ -110,7 +111,7 @@ module Killbill
|
|
|
110
111
|
# conversion for transactions [type = java.util.List]
|
|
111
112
|
tmp = java.util.ArrayList.new
|
|
112
113
|
(@transactions || []).each do |m|
|
|
113
|
-
# conversion for m [type = org.killbill.billing.payment.api.
|
|
114
|
+
# conversion for m [type = org.killbill.billing.payment.api.PaymentTransaction]
|
|
114
115
|
m = m.to_java unless m.nil?
|
|
115
116
|
tmp.add(m)
|
|
116
117
|
end
|
|
@@ -190,8 +191,8 @@ module Killbill
|
|
|
190
191
|
@transactions = j_obj.transactions
|
|
191
192
|
tmp = []
|
|
192
193
|
(@transactions || []).each do |m|
|
|
193
|
-
# conversion for m [type = org.killbill.billing.payment.api.
|
|
194
|
-
m = Killbill::Plugin::Model::
|
|
194
|
+
# conversion for m [type = org.killbill.billing.payment.api.PaymentTransaction]
|
|
195
|
+
m = Killbill::Plugin::Model::PaymentTransaction.new.to_ruby(m) unless m.nil?
|
|
195
196
|
tmp << m
|
|
196
197
|
end
|
|
197
198
|
@transactions = tmp
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
#
|
|
3
|
-
# Copyright 2010-2013 Ning, Inc.
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
|
|
1
|
+
#############################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
6
|
+
# #
|
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
9
|
+
# License. You may obtain a copy of the License at: #
|
|
10
|
+
# #
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
12
|
+
# #
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
16
|
+
# License for the specific language governing permissions and limitations #
|
|
17
|
+
# under the License. #
|
|
18
|
+
# #
|
|
19
|
+
#############################################################################################
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
#
|
|
@@ -37,14 +39,17 @@ module Killbill
|
|
|
37
39
|
end
|
|
38
40
|
|
|
39
41
|
|
|
40
|
-
java_signature 'Java::org.killbill.billing.payment.api.Payment
|
|
41
|
-
def
|
|
42
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createAuthorization(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
43
|
+
def create_authorization(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
42
44
|
|
|
43
45
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
44
46
|
account = account.to_java unless account.nil?
|
|
45
47
|
|
|
46
|
-
# conversion for
|
|
47
|
-
|
|
48
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
49
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
50
|
+
|
|
51
|
+
# conversion for paymentId [type = java.util.UUID]
|
|
52
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
48
53
|
|
|
49
54
|
# conversion for amount [type = java.math.BigDecimal]
|
|
50
55
|
if amount.nil?
|
|
@@ -53,6 +58,15 @@ module Killbill
|
|
|
53
58
|
amount = java.math.BigDecimal.new(amount.to_s)
|
|
54
59
|
end
|
|
55
60
|
|
|
61
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
62
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
63
|
+
|
|
64
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
|
65
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
|
66
|
+
|
|
67
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
68
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
69
|
+
|
|
56
70
|
# conversion for properties [type = java.lang.Iterable]
|
|
57
71
|
tmp = java.util.ArrayList.new
|
|
58
72
|
(properties || []).each do |m|
|
|
@@ -65,7 +79,7 @@ module Killbill
|
|
|
65
79
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
66
80
|
context = context.to_java unless context.nil?
|
|
67
81
|
begin
|
|
68
|
-
res = @real_java_api.
|
|
82
|
+
res = @real_java_api.create_authorization(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
69
83
|
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
70
84
|
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
71
85
|
return res
|
|
@@ -74,14 +88,14 @@ module Killbill
|
|
|
74
88
|
end
|
|
75
89
|
end
|
|
76
90
|
|
|
77
|
-
java_signature 'Java::org.killbill.billing.payment.api.Payment
|
|
78
|
-
def
|
|
91
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment 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.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
92
|
+
def create_capture(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, context)
|
|
79
93
|
|
|
80
94
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
81
95
|
account = account.to_java unless account.nil?
|
|
82
96
|
|
|
83
|
-
# conversion for
|
|
84
|
-
|
|
97
|
+
# conversion for paymentId [type = java.util.UUID]
|
|
98
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
85
99
|
|
|
86
100
|
# conversion for amount [type = java.math.BigDecimal]
|
|
87
101
|
if amount.nil?
|
|
@@ -90,10 +104,25 @@ module Killbill
|
|
|
90
104
|
amount = java.math.BigDecimal.new(amount.to_s)
|
|
91
105
|
end
|
|
92
106
|
|
|
107
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
108
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
109
|
+
|
|
110
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
111
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
112
|
+
|
|
113
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
114
|
+
tmp = java.util.ArrayList.new
|
|
115
|
+
(properties || []).each do |m|
|
|
116
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
117
|
+
m = m.to_java unless m.nil?
|
|
118
|
+
tmp.add(m)
|
|
119
|
+
end
|
|
120
|
+
properties = tmp
|
|
121
|
+
|
|
93
122
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
94
123
|
context = context.to_java unless context.nil?
|
|
95
124
|
begin
|
|
96
|
-
res = @real_java_api.
|
|
125
|
+
res = @real_java_api.create_capture(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, context)
|
|
97
126
|
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
98
127
|
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
99
128
|
return res
|
|
@@ -102,32 +131,83 @@ module Killbill
|
|
|
102
131
|
end
|
|
103
132
|
end
|
|
104
133
|
|
|
105
|
-
java_signature 'Java::
|
|
106
|
-
def
|
|
134
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createPurchase(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
135
|
+
def create_purchase(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
107
136
|
|
|
108
137
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
109
138
|
account = account.to_java unless account.nil?
|
|
110
139
|
|
|
140
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
141
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
142
|
+
|
|
111
143
|
# conversion for paymentId [type = java.util.UUID]
|
|
112
144
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
113
145
|
|
|
114
|
-
# conversion for
|
|
115
|
-
|
|
146
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
147
|
+
if amount.nil?
|
|
148
|
+
amount = java.math.BigDecimal::ZERO
|
|
149
|
+
else
|
|
150
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
154
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
155
|
+
|
|
156
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
|
157
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
|
158
|
+
|
|
159
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
160
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
161
|
+
|
|
162
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
163
|
+
tmp = java.util.ArrayList.new
|
|
164
|
+
(properties || []).each do |m|
|
|
165
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
166
|
+
m = m.to_java unless m.nil?
|
|
167
|
+
tmp.add(m)
|
|
168
|
+
end
|
|
169
|
+
properties = tmp
|
|
116
170
|
|
|
117
171
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
118
172
|
context = context.to_java unless context.nil?
|
|
119
|
-
|
|
173
|
+
begin
|
|
174
|
+
res = @real_java_api.create_purchase(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
175
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
176
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
177
|
+
return res
|
|
178
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
179
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
180
|
+
end
|
|
120
181
|
end
|
|
121
182
|
|
|
122
|
-
java_signature 'Java::org.killbill.billing.payment.api.Payment
|
|
123
|
-
def
|
|
183
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createPurchaseWithPaymentControl(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
184
|
+
def create_purchase_with_payment_control(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
|
124
185
|
|
|
125
186
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
126
187
|
account = account.to_java unless account.nil?
|
|
127
188
|
|
|
189
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
190
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
191
|
+
|
|
128
192
|
# conversion for paymentId [type = java.util.UUID]
|
|
129
193
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
130
194
|
|
|
195
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
196
|
+
if amount.nil?
|
|
197
|
+
amount = java.math.BigDecimal::ZERO
|
|
198
|
+
else
|
|
199
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
203
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
204
|
+
|
|
205
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
|
206
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
|
207
|
+
|
|
208
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
209
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
210
|
+
|
|
131
211
|
# conversion for properties [type = java.lang.Iterable]
|
|
132
212
|
tmp = java.util.ArrayList.new
|
|
133
213
|
(properties || []).each do |m|
|
|
@@ -137,10 +217,13 @@ module Killbill
|
|
|
137
217
|
end
|
|
138
218
|
properties = tmp
|
|
139
219
|
|
|
220
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
|
221
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
|
222
|
+
|
|
140
223
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
141
224
|
context = context.to_java unless context.nil?
|
|
142
225
|
begin
|
|
143
|
-
res = @real_java_api.
|
|
226
|
+
res = @real_java_api.create_purchase_with_payment_control(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
|
144
227
|
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
145
228
|
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
146
229
|
return res
|
|
@@ -149,8 +232,8 @@ module Killbill
|
|
|
149
232
|
end
|
|
150
233
|
end
|
|
151
234
|
|
|
152
|
-
java_signature 'Java::org.killbill.billing.payment.api.
|
|
153
|
-
def
|
|
235
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createVoid(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
236
|
+
def create_void(account, paymentId, paymentTransactionExternalKey, properties, context)
|
|
154
237
|
|
|
155
238
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
156
239
|
account = account.to_java unless account.nil?
|
|
@@ -158,12 +241,8 @@ module Killbill
|
|
|
158
241
|
# conversion for paymentId [type = java.util.UUID]
|
|
159
242
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
160
243
|
|
|
161
|
-
# conversion for
|
|
162
|
-
|
|
163
|
-
refundAmount = java.math.BigDecimal::ZERO
|
|
164
|
-
else
|
|
165
|
-
refundAmount = java.math.BigDecimal.new(refundAmount.to_s)
|
|
166
|
-
end
|
|
244
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
245
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
167
246
|
|
|
168
247
|
# conversion for properties [type = java.lang.Iterable]
|
|
169
248
|
tmp = java.util.ArrayList.new
|
|
@@ -177,17 +256,17 @@ module Killbill
|
|
|
177
256
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
178
257
|
context = context.to_java unless context.nil?
|
|
179
258
|
begin
|
|
180
|
-
res = @real_java_api.
|
|
181
|
-
# conversion for res [type = org.killbill.billing.payment.api.
|
|
182
|
-
res = Killbill::Plugin::Model::
|
|
259
|
+
res = @real_java_api.create_void(account, paymentId, paymentTransactionExternalKey, properties, context)
|
|
260
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
261
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
183
262
|
return res
|
|
184
263
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
185
264
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
186
265
|
end
|
|
187
266
|
end
|
|
188
267
|
|
|
189
|
-
java_signature 'Java::
|
|
190
|
-
def
|
|
268
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createRefund(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)'
|
|
269
|
+
def create_refund(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, context)
|
|
191
270
|
|
|
192
271
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
193
272
|
account = account.to_java unless account.nil?
|
|
@@ -195,22 +274,18 @@ module Killbill
|
|
|
195
274
|
# conversion for paymentId [type = java.util.UUID]
|
|
196
275
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
197
276
|
|
|
198
|
-
# conversion for
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
java_signature 'Java::org.killbill.billing.payment.api.Refund getRefund(Java::java.util.UUID, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
207
|
-
def get_refund(refundId, withPluginInfo, properties, context)
|
|
277
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
278
|
+
if amount.nil?
|
|
279
|
+
amount = java.math.BigDecimal::ZERO
|
|
280
|
+
else
|
|
281
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
282
|
+
end
|
|
208
283
|
|
|
209
|
-
# conversion for
|
|
210
|
-
|
|
284
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
285
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
211
286
|
|
|
212
|
-
# conversion for
|
|
213
|
-
|
|
287
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
288
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
214
289
|
|
|
215
290
|
# conversion for properties [type = java.lang.Iterable]
|
|
216
291
|
tmp = java.util.ArrayList.new
|
|
@@ -221,20 +296,20 @@ module Killbill
|
|
|
221
296
|
end
|
|
222
297
|
properties = tmp
|
|
223
298
|
|
|
224
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.
|
|
299
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
225
300
|
context = context.to_java unless context.nil?
|
|
226
301
|
begin
|
|
227
|
-
res = @real_java_api.
|
|
228
|
-
# conversion for res [type = org.killbill.billing.payment.api.
|
|
229
|
-
res = Killbill::Plugin::Model::
|
|
302
|
+
res = @real_java_api.create_refund(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, context)
|
|
303
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
304
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
230
305
|
return res
|
|
231
306
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
232
307
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
233
308
|
end
|
|
234
309
|
end
|
|
235
310
|
|
|
236
|
-
java_signature 'Java::org.killbill.billing.payment.api.
|
|
237
|
-
def
|
|
311
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createRefundWithPaymentControl(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.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
312
|
+
def create_refund_with_payment_control(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, paymentOptions, context)
|
|
238
313
|
|
|
239
314
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
240
315
|
account = account.to_java unless account.nil?
|
|
@@ -242,13 +317,19 @@ module Killbill
|
|
|
242
317
|
# conversion for paymentId [type = java.util.UUID]
|
|
243
318
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
244
319
|
|
|
245
|
-
# conversion for
|
|
246
|
-
if
|
|
247
|
-
|
|
320
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
321
|
+
if amount.nil?
|
|
322
|
+
amount = java.math.BigDecimal::ZERO
|
|
248
323
|
else
|
|
249
|
-
|
|
324
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
250
325
|
end
|
|
251
326
|
|
|
327
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
328
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
329
|
+
|
|
330
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
331
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
332
|
+
|
|
252
333
|
# conversion for properties [type = java.lang.Iterable]
|
|
253
334
|
tmp = java.util.ArrayList.new
|
|
254
335
|
(properties || []).each do |m|
|
|
@@ -258,35 +339,48 @@ module Killbill
|
|
|
258
339
|
end
|
|
259
340
|
properties = tmp
|
|
260
341
|
|
|
342
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
|
343
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
|
344
|
+
|
|
261
345
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
262
346
|
context = context.to_java unless context.nil?
|
|
263
347
|
begin
|
|
264
|
-
res = @real_java_api.
|
|
265
|
-
# conversion for res [type = org.killbill.billing.payment.api.
|
|
266
|
-
res = Killbill::Plugin::Model::
|
|
348
|
+
res = @real_java_api.create_refund_with_payment_control(account, paymentId, amount, currency, paymentTransactionExternalKey, properties, paymentOptions, context)
|
|
349
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
350
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
267
351
|
return res
|
|
268
352
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
269
353
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
270
354
|
end
|
|
271
355
|
end
|
|
272
356
|
|
|
273
|
-
java_signature 'Java::org.killbill.billing.payment.api.
|
|
274
|
-
def
|
|
357
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createCredit(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
358
|
+
def create_credit(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
275
359
|
|
|
276
360
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
277
361
|
account = account.to_java unless account.nil?
|
|
278
362
|
|
|
363
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
364
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
365
|
+
|
|
279
366
|
# conversion for paymentId [type = java.util.UUID]
|
|
280
367
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
281
368
|
|
|
282
|
-
# conversion for
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
tmp.add(m)
|
|
369
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
370
|
+
if amount.nil?
|
|
371
|
+
amount = java.math.BigDecimal::ZERO
|
|
372
|
+
else
|
|
373
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
288
374
|
end
|
|
289
|
-
|
|
375
|
+
|
|
376
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
377
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
378
|
+
|
|
379
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
|
380
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
|
381
|
+
|
|
382
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
383
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
290
384
|
|
|
291
385
|
# conversion for properties [type = java.lang.Iterable]
|
|
292
386
|
tmp = java.util.ArrayList.new
|
|
@@ -300,97 +394,159 @@ module Killbill
|
|
|
300
394
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
301
395
|
context = context.to_java unless context.nil?
|
|
302
396
|
begin
|
|
303
|
-
res = @real_java_api.
|
|
304
|
-
# conversion for res [type = org.killbill.billing.payment.api.
|
|
305
|
-
res = Killbill::Plugin::Model::
|
|
397
|
+
res = @real_java_api.create_credit(account, paymentMethodId, paymentId, amount, currency, paymentExternalKey, paymentTransactionExternalKey, properties, context)
|
|
398
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
399
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
306
400
|
return res
|
|
307
401
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
308
402
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
309
403
|
end
|
|
310
404
|
end
|
|
311
405
|
|
|
312
|
-
java_signature 'Java::
|
|
313
|
-
def
|
|
406
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createChargeback(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::org.killbill.billing.util.callcontext.CallContext)'
|
|
407
|
+
def create_chargeback(account, paymentId, amount, currency, paymentTransactionExternalKey, context)
|
|
314
408
|
|
|
315
409
|
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
316
410
|
account = account.to_java unless account.nil?
|
|
317
411
|
|
|
318
|
-
# conversion for
|
|
412
|
+
# conversion for paymentId [type = java.util.UUID]
|
|
413
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
414
|
+
|
|
415
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
416
|
+
if amount.nil?
|
|
417
|
+
amount = java.math.BigDecimal::ZERO
|
|
418
|
+
else
|
|
419
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
423
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
424
|
+
|
|
425
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
426
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
427
|
+
|
|
428
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
319
429
|
context = context.to_java unless context.nil?
|
|
320
430
|
begin
|
|
321
|
-
res = @real_java_api.
|
|
322
|
-
# conversion for res [type =
|
|
323
|
-
|
|
324
|
-
(res || []).each do |m|
|
|
325
|
-
# conversion for m [type = org.killbill.billing.payment.api.Refund]
|
|
326
|
-
m = Killbill::Plugin::Model::Refund.new.to_ruby(m) unless m.nil?
|
|
327
|
-
tmp << m
|
|
328
|
-
end
|
|
329
|
-
res = tmp
|
|
431
|
+
res = @real_java_api.create_chargeback(account, paymentId, amount, currency, paymentTransactionExternalKey, context)
|
|
432
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
433
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
330
434
|
return res
|
|
331
435
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
332
436
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
333
437
|
end
|
|
334
438
|
end
|
|
335
439
|
|
|
336
|
-
java_signature 'Java::
|
|
337
|
-
def
|
|
440
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createChargebackWithPaymentControl(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::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
441
|
+
def create_chargeback_with_payment_control(account, paymentId, amount, currency, paymentTransactionExternalKey, paymentOptions, context)
|
|
442
|
+
|
|
443
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
444
|
+
account = account.to_java unless account.nil?
|
|
338
445
|
|
|
339
446
|
# conversion for paymentId [type = java.util.UUID]
|
|
340
447
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
|
341
448
|
|
|
342
|
-
# conversion for
|
|
449
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
450
|
+
if amount.nil?
|
|
451
|
+
amount = java.math.BigDecimal::ZERO
|
|
452
|
+
else
|
|
453
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
457
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
458
|
+
|
|
459
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
|
460
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
|
461
|
+
|
|
462
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
|
463
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
|
464
|
+
|
|
465
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
343
466
|
context = context.to_java unless context.nil?
|
|
344
467
|
begin
|
|
345
|
-
res = @real_java_api.
|
|
346
|
-
# conversion for res [type =
|
|
347
|
-
|
|
348
|
-
(res || []).each do |m|
|
|
349
|
-
# conversion for m [type = org.killbill.billing.payment.api.Refund]
|
|
350
|
-
m = Killbill::Plugin::Model::Refund.new.to_ruby(m) unless m.nil?
|
|
351
|
-
tmp << m
|
|
352
|
-
end
|
|
353
|
-
res = tmp
|
|
468
|
+
res = @real_java_api.create_chargeback_with_payment_control(account, paymentId, amount, currency, paymentTransactionExternalKey, paymentOptions, context)
|
|
469
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
470
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
354
471
|
return res
|
|
355
472
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
356
473
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
357
474
|
end
|
|
358
475
|
end
|
|
359
476
|
|
|
360
|
-
java_signature 'Java::
|
|
361
|
-
def
|
|
477
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment notifyPendingTransactionOfStateChanged(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::boolean, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
478
|
+
def notify_pending_transaction_of_state_changed(account, paymentTransactionId, isSuccess, context)
|
|
362
479
|
|
|
363
|
-
# conversion for
|
|
364
|
-
|
|
480
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
481
|
+
account = account.to_java unless account.nil?
|
|
365
482
|
|
|
366
|
-
# conversion for
|
|
483
|
+
# conversion for paymentTransactionId [type = java.util.UUID]
|
|
484
|
+
paymentTransactionId = java.util.UUID.fromString(paymentTransactionId.to_s) unless paymentTransactionId.nil?
|
|
485
|
+
|
|
486
|
+
# conversion for isSuccess [type = boolean]
|
|
487
|
+
isSuccess = isSuccess.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isSuccess)
|
|
488
|
+
|
|
489
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
367
490
|
context = context.to_java unless context.nil?
|
|
368
491
|
begin
|
|
369
|
-
res = @real_java_api.
|
|
370
|
-
# conversion for res [type =
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
492
|
+
res = @real_java_api.notify_pending_transaction_of_state_changed(account, paymentTransactionId, isSuccess, context)
|
|
493
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
494
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
495
|
+
return res
|
|
496
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
497
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment notifyPendingTransactionOfStateChangedWithPaymentControl(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::boolean, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
502
|
+
def notify_pending_transaction_of_state_changed_with_payment_control(account, paymentTransactionId, isSuccess, paymentOptions, context)
|
|
503
|
+
|
|
504
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
505
|
+
account = account.to_java unless account.nil?
|
|
506
|
+
|
|
507
|
+
# conversion for paymentTransactionId [type = java.util.UUID]
|
|
508
|
+
paymentTransactionId = java.util.UUID.fromString(paymentTransactionId.to_s) unless paymentTransactionId.nil?
|
|
509
|
+
|
|
510
|
+
# conversion for isSuccess [type = boolean]
|
|
511
|
+
isSuccess = isSuccess.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isSuccess)
|
|
512
|
+
|
|
513
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
|
514
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
|
515
|
+
|
|
516
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
517
|
+
context = context.to_java unless context.nil?
|
|
518
|
+
begin
|
|
519
|
+
res = @real_java_api.notify_pending_transaction_of_state_changed_with_payment_control(account, paymentTransactionId, isSuccess, paymentOptions, context)
|
|
520
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
521
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
378
522
|
return res
|
|
379
523
|
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
380
524
|
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
381
525
|
end
|
|
382
526
|
end
|
|
383
527
|
|
|
384
|
-
java_signature 'Java::java.util.List getAccountPayments(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
385
|
-
def get_account_payments(accountId, context)
|
|
528
|
+
java_signature 'Java::java.util.List getAccountPayments(Java::java.util.UUID, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
529
|
+
def get_account_payments(accountId, withPluginInfo, properties, context)
|
|
386
530
|
|
|
387
531
|
# conversion for accountId [type = java.util.UUID]
|
|
388
532
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
|
389
533
|
|
|
534
|
+
# conversion for withPluginInfo [type = boolean]
|
|
535
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
536
|
+
|
|
537
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
538
|
+
tmp = java.util.ArrayList.new
|
|
539
|
+
(properties || []).each do |m|
|
|
540
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
541
|
+
m = m.to_java unless m.nil?
|
|
542
|
+
tmp.add(m)
|
|
543
|
+
end
|
|
544
|
+
properties = tmp
|
|
545
|
+
|
|
390
546
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
391
547
|
context = context.to_java unless context.nil?
|
|
392
548
|
begin
|
|
393
|
-
res = @real_java_api.get_account_payments(accountId, context)
|
|
549
|
+
res = @real_java_api.get_account_payments(accountId, withPluginInfo, properties, context)
|
|
394
550
|
# conversion for res [type = java.util.List]
|
|
395
551
|
tmp = []
|
|
396
552
|
(res || []).each do |m|
|
|
@@ -435,14 +591,14 @@ module Killbill
|
|
|
435
591
|
end
|
|
436
592
|
end
|
|
437
593
|
|
|
438
|
-
java_signature 'Java::org.killbill.billing.
|
|
439
|
-
def
|
|
594
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment getPaymentByExternalKey(Java::java.lang.String, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
595
|
+
def get_payment_by_external_key(paymentExternalKey, withPluginInfo, properties, context)
|
|
440
596
|
|
|
441
|
-
# conversion for
|
|
442
|
-
|
|
597
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
|
598
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
|
443
599
|
|
|
444
|
-
# conversion for
|
|
445
|
-
|
|
600
|
+
# conversion for withPluginInfo [type = boolean]
|
|
601
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
446
602
|
|
|
447
603
|
# conversion for properties [type = java.lang.Iterable]
|
|
448
604
|
tmp = java.util.ArrayList.new
|
|
@@ -455,17 +611,18 @@ module Killbill
|
|
|
455
611
|
|
|
456
612
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
457
613
|
context = context.to_java unless context.nil?
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
614
|
+
begin
|
|
615
|
+
res = @real_java_api.get_payment_by_external_key(paymentExternalKey, withPluginInfo, properties, context)
|
|
616
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
|
617
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
|
618
|
+
return res
|
|
619
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
620
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
621
|
+
end
|
|
462
622
|
end
|
|
463
623
|
|
|
464
|
-
java_signature 'Java::org.killbill.billing.util.entity.Pagination
|
|
465
|
-
def
|
|
466
|
-
|
|
467
|
-
# conversion for searchKey [type = java.lang.String]
|
|
468
|
-
searchKey = searchKey.to_s unless searchKey.nil?
|
|
624
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination getPayments(Java::java.lang.Long, Java::java.lang.Long, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
625
|
+
def get_payments(offset, limit, withPluginInfo, properties, context)
|
|
469
626
|
|
|
470
627
|
# conversion for offset [type = java.lang.Long]
|
|
471
628
|
offset = offset
|
|
@@ -473,6 +630,9 @@ module Killbill
|
|
|
473
630
|
# conversion for limit [type = java.lang.Long]
|
|
474
631
|
limit = limit
|
|
475
632
|
|
|
633
|
+
# conversion for withPluginInfo [type = boolean]
|
|
634
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
635
|
+
|
|
476
636
|
# conversion for properties [type = java.lang.Iterable]
|
|
477
637
|
tmp = java.util.ArrayList.new
|
|
478
638
|
(properties || []).each do |m|
|
|
@@ -484,14 +644,17 @@ module Killbill
|
|
|
484
644
|
|
|
485
645
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
486
646
|
context = context.to_java unless context.nil?
|
|
487
|
-
res = @real_java_api.
|
|
647
|
+
res = @real_java_api.get_payments(offset, limit, withPluginInfo, properties, context)
|
|
488
648
|
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
489
649
|
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
|
490
650
|
return res
|
|
491
651
|
end
|
|
492
652
|
|
|
493
|
-
java_signature 'Java::org.killbill.billing.util.entity.Pagination
|
|
494
|
-
def
|
|
653
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination searchPayments(Java::java.lang.String, Java::java.lang.Long, Java::java.lang.Long, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
654
|
+
def search_payments(searchKey, offset, limit, withPluginInfo, properties, context)
|
|
655
|
+
|
|
656
|
+
# conversion for searchKey [type = java.lang.String]
|
|
657
|
+
searchKey = searchKey.to_s unless searchKey.nil?
|
|
495
658
|
|
|
496
659
|
# conversion for offset [type = java.lang.Long]
|
|
497
660
|
offset = offset
|
|
@@ -499,6 +662,9 @@ module Killbill
|
|
|
499
662
|
# conversion for limit [type = java.lang.Long]
|
|
500
663
|
limit = limit
|
|
501
664
|
|
|
665
|
+
# conversion for withPluginInfo [type = boolean]
|
|
666
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
667
|
+
|
|
502
668
|
# conversion for properties [type = java.lang.Iterable]
|
|
503
669
|
tmp = java.util.ArrayList.new
|
|
504
670
|
(properties || []).each do |m|
|
|
@@ -510,23 +676,29 @@ module Killbill
|
|
|
510
676
|
|
|
511
677
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
512
678
|
context = context.to_java unless context.nil?
|
|
513
|
-
res = @real_java_api.
|
|
679
|
+
res = @real_java_api.search_payments(searchKey, offset, limit, withPluginInfo, properties, context)
|
|
514
680
|
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
515
681
|
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
|
516
682
|
return res
|
|
517
683
|
end
|
|
518
684
|
|
|
519
|
-
java_signature 'Java::org.killbill.billing.
|
|
520
|
-
def
|
|
685
|
+
java_signature 'Java::java.util.UUID addPaymentMethod(Java::org.killbill.billing.account.api.Account, Java::java.lang.String, Java::java.lang.String, Java::boolean, Java::org.killbill.billing.payment.api.PaymentMethodPlugin, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
686
|
+
def add_payment_method(account, paymentMethodExternalKey, pluginName, setDefault, paymentMethodInfo, properties, context)
|
|
521
687
|
|
|
522
|
-
# conversion for
|
|
523
|
-
|
|
688
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
689
|
+
account = account.to_java unless account.nil?
|
|
524
690
|
|
|
525
|
-
# conversion for
|
|
526
|
-
|
|
691
|
+
# conversion for paymentMethodExternalKey [type = java.lang.String]
|
|
692
|
+
paymentMethodExternalKey = paymentMethodExternalKey.to_s unless paymentMethodExternalKey.nil?
|
|
527
693
|
|
|
528
|
-
# conversion for
|
|
529
|
-
|
|
694
|
+
# conversion for pluginName [type = java.lang.String]
|
|
695
|
+
pluginName = pluginName.to_s unless pluginName.nil?
|
|
696
|
+
|
|
697
|
+
# conversion for setDefault [type = boolean]
|
|
698
|
+
setDefault = setDefault.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(setDefault)
|
|
699
|
+
|
|
700
|
+
# conversion for paymentMethodInfo [type = org.killbill.billing.payment.api.PaymentMethodPlugin]
|
|
701
|
+
paymentMethodInfo = paymentMethodInfo.to_java unless paymentMethodInfo.nil?
|
|
530
702
|
|
|
531
703
|
# conversion for properties [type = java.lang.Iterable]
|
|
532
704
|
tmp = java.util.ArrayList.new
|
|
@@ -537,246 +709,266 @@ module Killbill
|
|
|
537
709
|
end
|
|
538
710
|
properties = tmp
|
|
539
711
|
|
|
540
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.
|
|
712
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
541
713
|
context = context.to_java unless context.nil?
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
714
|
+
begin
|
|
715
|
+
res = @real_java_api.add_payment_method(account, paymentMethodExternalKey, pluginName, setDefault, paymentMethodInfo, properties, context)
|
|
716
|
+
# conversion for res [type = java.util.UUID]
|
|
717
|
+
res = res.nil? ? nil : res.to_s
|
|
718
|
+
return res
|
|
719
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
720
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
721
|
+
end
|
|
546
722
|
end
|
|
547
723
|
|
|
548
|
-
java_signature 'Java::java.util.
|
|
549
|
-
def
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
# conversion for
|
|
555
|
-
|
|
724
|
+
java_signature 'Java::java.util.List getAccountPaymentMethods(Java::java.util.UUID, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
725
|
+
def get_account_payment_methods(accountId, withPluginInfo, properties, context)
|
|
726
|
+
|
|
727
|
+
# conversion for accountId [type = java.util.UUID]
|
|
728
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
|
729
|
+
|
|
730
|
+
# conversion for withPluginInfo [type = boolean]
|
|
731
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
732
|
+
|
|
733
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
734
|
+
tmp = java.util.ArrayList.new
|
|
735
|
+
(properties || []).each do |m|
|
|
736
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
737
|
+
m = m.to_java unless m.nil?
|
|
738
|
+
tmp.add(m)
|
|
739
|
+
end
|
|
740
|
+
properties = tmp
|
|
741
|
+
|
|
742
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
743
|
+
context = context.to_java unless context.nil?
|
|
744
|
+
begin
|
|
745
|
+
res = @real_java_api.get_account_payment_methods(accountId, withPluginInfo, properties, context)
|
|
746
|
+
# conversion for res [type = java.util.List]
|
|
747
|
+
tmp = []
|
|
748
|
+
(res || []).each do |m|
|
|
749
|
+
# conversion for m [type = org.killbill.billing.payment.api.PaymentMethod]
|
|
750
|
+
m = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(m) unless m.nil?
|
|
751
|
+
tmp << m
|
|
752
|
+
end
|
|
753
|
+
res = tmp
|
|
754
|
+
return res
|
|
755
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
756
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
757
|
+
end
|
|
556
758
|
end
|
|
557
|
-
res = tmp
|
|
558
|
-
return res
|
|
559
|
-
end
|
|
560
759
|
|
|
561
|
-
|
|
562
|
-
|
|
760
|
+
java_signature 'Java::org.killbill.billing.payment.api.PaymentMethod getPaymentMethodById(Java::java.util.UUID, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
761
|
+
def get_payment_method_by_id(paymentMethodId, includedInactive, withPluginInfo, properties, context)
|
|
563
762
|
|
|
564
|
-
|
|
565
|
-
|
|
763
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
764
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
566
765
|
|
|
567
|
-
|
|
568
|
-
|
|
766
|
+
# conversion for includedInactive [type = boolean]
|
|
767
|
+
includedInactive = includedInactive.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(includedInactive)
|
|
569
768
|
|
|
570
|
-
|
|
571
|
-
|
|
769
|
+
# conversion for withPluginInfo [type = boolean]
|
|
770
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
572
771
|
|
|
573
|
-
|
|
574
|
-
|
|
772
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
773
|
+
tmp = java.util.ArrayList.new
|
|
774
|
+
(properties || []).each do |m|
|
|
775
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
776
|
+
m = m.to_java unless m.nil?
|
|
777
|
+
tmp.add(m)
|
|
778
|
+
end
|
|
779
|
+
properties = tmp
|
|
575
780
|
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
context = context.to_java unless context.nil?
|
|
587
|
-
begin
|
|
588
|
-
res = @real_java_api.add_payment_method(pluginName, account, setDefault, paymentMethodInfo, properties, context)
|
|
589
|
-
# conversion for res [type = java.util.UUID]
|
|
590
|
-
res = res.nil? ? nil : res.to_s
|
|
591
|
-
return res
|
|
592
|
-
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
593
|
-
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
781
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
782
|
+
context = context.to_java unless context.nil?
|
|
783
|
+
begin
|
|
784
|
+
res = @real_java_api.get_payment_method_by_id(paymentMethodId, includedInactive, withPluginInfo, properties, context)
|
|
785
|
+
# conversion for res [type = org.killbill.billing.payment.api.PaymentMethod]
|
|
786
|
+
res = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(res) unless res.nil?
|
|
787
|
+
return res
|
|
788
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
789
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
790
|
+
end
|
|
594
791
|
end
|
|
595
|
-
end
|
|
596
792
|
|
|
597
|
-
|
|
598
|
-
|
|
793
|
+
java_signature 'Java::org.killbill.billing.payment.api.PaymentMethod getPaymentMethodByExternalKey(Java::java.lang.String, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
794
|
+
def get_payment_method_by_external_key(paymentMethodExternalKey, includedInactive, withPluginInfo, properties, context)
|
|
599
795
|
|
|
600
|
-
|
|
601
|
-
|
|
796
|
+
# conversion for paymentMethodExternalKey [type = java.lang.String]
|
|
797
|
+
paymentMethodExternalKey = paymentMethodExternalKey.to_s unless paymentMethodExternalKey.nil?
|
|
602
798
|
|
|
603
|
-
|
|
604
|
-
|
|
799
|
+
# conversion for includedInactive [type = boolean]
|
|
800
|
+
includedInactive = includedInactive.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(includedInactive)
|
|
605
801
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
# conversion for
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
# conversion for
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
629
|
-
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
802
|
+
# conversion for withPluginInfo [type = boolean]
|
|
803
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
804
|
+
|
|
805
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
806
|
+
tmp = java.util.ArrayList.new
|
|
807
|
+
(properties || []).each do |m|
|
|
808
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
809
|
+
m = m.to_java unless m.nil?
|
|
810
|
+
tmp.add(m)
|
|
811
|
+
end
|
|
812
|
+
properties = tmp
|
|
813
|
+
|
|
814
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
815
|
+
context = context.to_java unless context.nil?
|
|
816
|
+
begin
|
|
817
|
+
res = @real_java_api.get_payment_method_by_external_key(paymentMethodExternalKey, includedInactive, withPluginInfo, properties, context)
|
|
818
|
+
# conversion for res [type = org.killbill.billing.payment.api.PaymentMethod]
|
|
819
|
+
res = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(res) unless res.nil?
|
|
820
|
+
return res
|
|
821
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
822
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
823
|
+
end
|
|
630
824
|
end
|
|
631
|
-
end
|
|
632
825
|
|
|
633
|
-
|
|
634
|
-
|
|
826
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination getPaymentMethods(Java::java.lang.Long, Java::java.lang.Long, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
827
|
+
def get_payment_methods(offset, limit, withPluginInfo, properties, context)
|
|
635
828
|
|
|
636
|
-
|
|
637
|
-
|
|
829
|
+
# conversion for offset [type = java.lang.Long]
|
|
830
|
+
offset = offset
|
|
638
831
|
|
|
639
|
-
|
|
640
|
-
|
|
832
|
+
# conversion for limit [type = java.lang.Long]
|
|
833
|
+
limit = limit
|
|
641
834
|
|
|
642
|
-
|
|
643
|
-
|
|
835
|
+
# conversion for withPluginInfo [type = boolean]
|
|
836
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
644
837
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
res = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(res) unless res.nil?
|
|
838
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
839
|
+
tmp = java.util.ArrayList.new
|
|
840
|
+
(properties || []).each do |m|
|
|
841
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
842
|
+
m = m.to_java unless m.nil?
|
|
843
|
+
tmp.add(m)
|
|
844
|
+
end
|
|
845
|
+
properties = tmp
|
|
846
|
+
|
|
847
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
848
|
+
context = context.to_java unless context.nil?
|
|
849
|
+
res = @real_java_api.get_payment_methods(offset, limit, withPluginInfo, properties, context)
|
|
850
|
+
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
851
|
+
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
|
660
852
|
return res
|
|
661
|
-
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
662
|
-
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
663
853
|
end
|
|
664
|
-
end
|
|
665
854
|
|
|
666
|
-
|
|
667
|
-
|
|
855
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination searchPaymentMethods(Java::java.lang.String, Java::java.lang.Long, Java::java.lang.Long, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
856
|
+
def search_payment_methods(searchKey, offset, limit, withPluginInfo, properties, context)
|
|
668
857
|
|
|
669
|
-
|
|
670
|
-
|
|
858
|
+
# conversion for searchKey [type = java.lang.String]
|
|
859
|
+
searchKey = searchKey.to_s unless searchKey.nil?
|
|
671
860
|
|
|
672
|
-
|
|
673
|
-
|
|
861
|
+
# conversion for offset [type = java.lang.Long]
|
|
862
|
+
offset = offset
|
|
674
863
|
|
|
675
|
-
|
|
676
|
-
|
|
864
|
+
# conversion for limit [type = java.lang.Long]
|
|
865
|
+
limit = limit
|
|
866
|
+
|
|
867
|
+
# conversion for withPluginInfo [type = boolean]
|
|
868
|
+
withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
|
|
869
|
+
|
|
870
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
871
|
+
tmp = java.util.ArrayList.new
|
|
872
|
+
(properties || []).each do |m|
|
|
873
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
874
|
+
m = m.to_java unless m.nil?
|
|
875
|
+
tmp.add(m)
|
|
876
|
+
end
|
|
877
|
+
properties = tmp
|
|
677
878
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
# conversion for
|
|
682
|
-
|
|
683
|
-
|
|
879
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
880
|
+
context = context.to_java unless context.nil?
|
|
881
|
+
res = @real_java_api.search_payment_methods(searchKey, offset, limit, withPluginInfo, properties, context)
|
|
882
|
+
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
883
|
+
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
|
884
|
+
return res
|
|
684
885
|
end
|
|
685
|
-
properties = tmp
|
|
686
|
-
|
|
687
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
688
|
-
context = context.to_java unless context.nil?
|
|
689
|
-
res = @real_java_api.search_payment_methods(searchKey, offset, limit, properties, context)
|
|
690
|
-
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
691
|
-
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
|
692
|
-
return res
|
|
693
|
-
end
|
|
694
886
|
|
|
695
|
-
|
|
696
|
-
|
|
887
|
+
java_signature 'Java::void deletePaymentMethod(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
888
|
+
def delete_payment_method(account, paymentMethodId, deleteDefaultPaymentMethodWithAutoPayOff, properties, context)
|
|
889
|
+
|
|
890
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
891
|
+
account = account.to_java unless account.nil?
|
|
697
892
|
|
|
698
|
-
|
|
699
|
-
|
|
893
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
894
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
700
895
|
|
|
701
|
-
|
|
702
|
-
|
|
896
|
+
# conversion for deleteDefaultPaymentMethodWithAutoPayOff [type = boolean]
|
|
897
|
+
deleteDefaultPaymentMethodWithAutoPayOff = deleteDefaultPaymentMethodWithAutoPayOff.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(deleteDefaultPaymentMethodWithAutoPayOff)
|
|
703
898
|
|
|
704
|
-
|
|
705
|
-
|
|
899
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
900
|
+
tmp = java.util.ArrayList.new
|
|
901
|
+
(properties || []).each do |m|
|
|
902
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
903
|
+
m = m.to_java unless m.nil?
|
|
904
|
+
tmp.add(m)
|
|
905
|
+
end
|
|
906
|
+
properties = tmp
|
|
706
907
|
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
711
|
-
m = m.to_java unless m.nil?
|
|
712
|
-
tmp.add(m)
|
|
908
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
909
|
+
context = context.to_java unless context.nil?
|
|
910
|
+
@real_java_api.delete_payment_method(account, paymentMethodId, deleteDefaultPaymentMethodWithAutoPayOff, properties, context)
|
|
713
911
|
end
|
|
714
|
-
properties = tmp
|
|
715
912
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
@real_java_api.deleted_payment_method(account, paymentMethodId, deleteDefaultPaymentMethodWithAutoPayOff, properties, context)
|
|
719
|
-
end
|
|
913
|
+
java_signature 'Java::void setDefaultPaymentMethod(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
914
|
+
def set_default_payment_method(account, paymentMethodId, properties, context)
|
|
720
915
|
|
|
721
|
-
|
|
722
|
-
|
|
916
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
917
|
+
account = account.to_java unless account.nil?
|
|
723
918
|
|
|
724
|
-
|
|
725
|
-
|
|
919
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
|
920
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
|
726
921
|
|
|
727
|
-
|
|
728
|
-
|
|
922
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
923
|
+
tmp = java.util.ArrayList.new
|
|
924
|
+
(properties || []).each do |m|
|
|
925
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
926
|
+
m = m.to_java unless m.nil?
|
|
927
|
+
tmp.add(m)
|
|
928
|
+
end
|
|
929
|
+
properties = tmp
|
|
729
930
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
734
|
-
m = m.to_java unless m.nil?
|
|
735
|
-
tmp.add(m)
|
|
931
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
932
|
+
context = context.to_java unless context.nil?
|
|
933
|
+
@real_java_api.set_default_payment_method(account, paymentMethodId, properties, context)
|
|
736
934
|
end
|
|
737
|
-
properties = tmp
|
|
738
935
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
@real_java_api.set_default_payment_method(account, paymentMethodId, properties, context)
|
|
742
|
-
end
|
|
936
|
+
java_signature 'Java::java.util.List refreshPaymentMethods(Java::org.killbill.billing.account.api.Account, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
937
|
+
def refresh_payment_methods(account, pluginName, properties, context)
|
|
743
938
|
|
|
744
|
-
|
|
745
|
-
|
|
939
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
|
940
|
+
account = account.to_java unless account.nil?
|
|
746
941
|
|
|
747
|
-
|
|
748
|
-
|
|
942
|
+
# conversion for pluginName [type = java.lang.String]
|
|
943
|
+
pluginName = pluginName.to_s unless pluginName.nil?
|
|
749
944
|
|
|
750
|
-
|
|
751
|
-
|
|
945
|
+
# conversion for properties [type = java.lang.Iterable]
|
|
946
|
+
tmp = java.util.ArrayList.new
|
|
947
|
+
(properties || []).each do |m|
|
|
948
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
949
|
+
m = m.to_java unless m.nil?
|
|
950
|
+
tmp.add(m)
|
|
951
|
+
end
|
|
952
|
+
properties = tmp
|
|
752
953
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
# conversion for m [type = org.killbill.billing.payment.api.PaymentMethod]
|
|
770
|
-
m = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(m) unless m.nil?
|
|
771
|
-
tmp << m
|
|
772
|
-
end
|
|
773
|
-
res = tmp
|
|
774
|
-
return res
|
|
775
|
-
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
776
|
-
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
954
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
955
|
+
context = context.to_java unless context.nil?
|
|
956
|
+
begin
|
|
957
|
+
res = @real_java_api.refresh_payment_methods(account, pluginName, properties, context)
|
|
958
|
+
# conversion for res [type = java.util.List]
|
|
959
|
+
tmp = []
|
|
960
|
+
(res || []).each do |m|
|
|
961
|
+
# conversion for m [type = org.killbill.billing.payment.api.PaymentMethod]
|
|
962
|
+
m = Killbill::Plugin::Model::PaymentMethod.new.to_ruby(m) unless m.nil?
|
|
963
|
+
tmp << m
|
|
964
|
+
end
|
|
965
|
+
res = tmp
|
|
966
|
+
return res
|
|
967
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
|
968
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
|
969
|
+
end
|
|
777
970
|
end
|
|
778
971
|
end
|
|
779
972
|
end
|
|
780
973
|
end
|
|
781
974
|
end
|
|
782
|
-
end
|