killbill 3.1.3 → 3.1.4
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 +7 -5
- data/NEWS +3 -0
- data/README.md +41 -17
- data/VERSION +1 -1
- data/generators/active_merchant/templates/Jarfile.rb +7 -5
- data/generators/active_merchant/templates/config.yml.rb +3 -3
- data/generators/active_merchant/templates/db/ddl.sql.rb +4 -0
- data/generators/active_merchant/templates/db/schema.rb +4 -0
- data/generators/active_merchant/templates/lib/api.rb +42 -22
- data/generators/active_merchant/templates/lib/models/response.rb +3 -1
- data/generators/active_merchant/templates/plugin.gemspec.rb +1 -1
- data/lib/killbill.rb +7 -4
- data/lib/killbill/gen/api/account.rb +4 -3
- data/lib/killbill/gen/api/account_api_exception.rb +4 -3
- data/lib/killbill/gen/api/account_audit_logs.rb +12 -68
- data/lib/killbill/gen/api/account_audit_logs_for_object_type.rb +4 -3
- data/lib/killbill/gen/api/account_data.rb +4 -3
- data/lib/killbill/gen/api/account_email.rb +4 -3
- data/lib/killbill/gen/api/account_user_api.rb +4 -3
- data/lib/killbill/gen/api/audit_log.rb +4 -3
- data/lib/killbill/gen/api/audit_user_api.rb +4 -3
- data/lib/killbill/gen/api/billing_exception_base.rb +4 -3
- data/lib/killbill/gen/api/block.rb +4 -3
- data/lib/killbill/gen/api/blockable.rb +4 -3
- data/lib/killbill/gen/api/blocking_api_exception.rb +4 -3
- data/lib/killbill/gen/api/blocking_state.rb +4 -3
- data/lib/killbill/gen/api/call_context.rb +4 -3
- data/lib/killbill/gen/api/catalog.rb +4 -3
- data/lib/killbill/gen/api/catalog_api_exception.rb +4 -3
- data/lib/killbill/gen/api/catalog_user_api.rb +4 -3
- data/lib/killbill/gen/api/column_info.rb +4 -3
- data/lib/killbill/gen/api/control_tag.rb +4 -3
- data/lib/killbill/gen/api/currency_conversion.rb +4 -3
- data/lib/killbill/gen/api/currency_conversion_api.rb +4 -3
- data/lib/killbill/gen/api/currency_conversion_exception.rb +4 -3
- data/lib/killbill/gen/api/currency_value_null.rb +4 -3
- data/lib/killbill/gen/api/custom_field.rb +4 -3
- data/lib/killbill/gen/api/custom_field_api_exception.rb +4 -3
- data/lib/killbill/gen/api/custom_field_user_api.rb +4 -3
- data/lib/killbill/gen/api/database_export_output_stream.rb +4 -3
- data/lib/killbill/gen/api/direct_payment.rb +39 -11
- data/lib/killbill/gen/api/direct_payment_api.rb +643 -31
- data/lib/killbill/gen/api/direct_payment_transaction.rb +37 -12
- data/lib/killbill/gen/api/duration.rb +4 -3
- data/lib/killbill/gen/api/entitlement.rb +4 -3
- data/lib/killbill/gen/api/entitlement_ao_status_dry_run.rb +4 -3
- data/lib/killbill/gen/api/entitlement_api.rb +4 -3
- data/lib/killbill/gen/api/entitlement_api_exception.rb +4 -3
- data/lib/killbill/gen/api/entity.rb +4 -3
- data/lib/killbill/gen/api/fixed.rb +4 -3
- data/lib/killbill/gen/api/illegal_plan_change.rb +4 -3
- data/lib/killbill/gen/api/international_price.rb +4 -3
- data/lib/killbill/gen/api/invalid_config_exception.rb +4 -3
- data/lib/killbill/gen/api/invoice.rb +4 -3
- data/lib/killbill/gen/api/invoice_api_exception.rb +4 -3
- data/lib/killbill/gen/api/invoice_creation_event.rb +4 -3
- data/lib/killbill/gen/api/invoice_formatter.rb +4 -3
- data/lib/killbill/gen/api/invoice_item.rb +4 -3
- data/lib/killbill/gen/api/invoice_item_formatter.rb +4 -3
- data/lib/killbill/gen/api/invoice_payment.rb +7 -7
- data/lib/killbill/gen/api/invoice_payment_api.rb +7 -153
- data/lib/killbill/gen/api/invoice_user_api.rb +22 -3
- data/lib/killbill/gen/api/limit.rb +4 -3
- data/lib/killbill/gen/api/listing.rb +4 -3
- data/lib/killbill/gen/api/migration_plan.rb +4 -3
- data/lib/killbill/gen/api/mutable_account_data.rb +4 -3
- data/lib/killbill/gen/api/osgi_killbill.rb +15 -7
- data/lib/killbill/gen/api/osgi_plugin_properties.rb +4 -3
- data/lib/killbill/gen/api/pagination.rb +4 -3
- data/lib/killbill/gen/api/payment_api_exception.rb +4 -3
- data/lib/killbill/gen/api/payment_gateway_api.rb +4 -3
- data/lib/killbill/gen/api/payment_method.rb +11 -4
- data/lib/killbill/gen/api/payment_method_plugin.rb +5 -76
- data/lib/killbill/gen/api/payment_options.rb +68 -0
- data/lib/killbill/gen/api/plan.rb +4 -3
- data/lib/killbill/gen/api/plan_change_result.rb +4 -3
- data/lib/killbill/gen/api/plan_phase.rb +4 -3
- data/lib/killbill/gen/api/plan_phase_specifier.rb +4 -3
- data/lib/killbill/gen/api/plan_specifier.rb +4 -3
- data/lib/killbill/gen/api/plugin_config_service_api.rb +4 -3
- data/lib/killbill/gen/api/plugin_property.rb +4 -3
- data/lib/killbill/gen/api/price.rb +4 -3
- data/lib/killbill/gen/api/price_list.rb +4 -3
- data/lib/killbill/gen/api/price_list_set.rb +4 -3
- data/lib/killbill/gen/api/product.rb +4 -3
- data/lib/killbill/gen/api/rate.rb +4 -3
- data/lib/killbill/gen/api/record_id_api.rb +4 -3
- data/lib/killbill/gen/api/recurring.rb +4 -3
- data/lib/killbill/gen/api/refund.rb +7 -6
- data/lib/killbill/gen/api/require_gen.rb +5 -6
- data/lib/killbill/gen/api/rolled_up_usage.rb +4 -3
- data/lib/killbill/gen/api/security_api_exception.rb +4 -3
- data/lib/killbill/gen/api/static_catalog.rb +4 -3
- data/lib/killbill/gen/api/subscription.rb +4 -3
- data/lib/killbill/gen/api/subscription_api.rb +4 -3
- data/lib/killbill/gen/api/subscription_api_exception.rb +4 -3
- data/lib/killbill/gen/api/subscription_bundle.rb +4 -3
- data/lib/killbill/gen/api/subscription_bundle_timeline.rb +4 -3
- data/lib/killbill/gen/api/subscription_event.rb +4 -3
- data/lib/killbill/gen/api/tag.rb +4 -3
- data/lib/killbill/gen/api/tag_api_exception.rb +4 -3
- data/lib/killbill/gen/api/tag_definition.rb +4 -3
- data/lib/killbill/gen/api/tag_definition_api_exception.rb +4 -3
- data/lib/killbill/gen/api/tag_user_api.rb +4 -3
- data/lib/killbill/gen/api/tenant.rb +4 -3
- data/lib/killbill/gen/api/tenant_api_exception.rb +4 -3
- data/lib/killbill/gen/api/tenant_context.rb +4 -3
- data/lib/killbill/gen/api/tenant_data.rb +4 -3
- data/lib/killbill/gen/api/tenant_kv.rb +4 -3
- data/lib/killbill/gen/api/tenant_user_api.rb +4 -3
- data/lib/killbill/gen/api/tier.rb +4 -3
- data/lib/killbill/gen/api/tiered_block.rb +4 -3
- data/lib/killbill/gen/api/unit.rb +4 -3
- data/lib/killbill/gen/api/usage.rb +4 -3
- data/lib/killbill/gen/api/usage_user_api.rb +4 -3
- data/lib/killbill/gen/plugin-api/currency_plugin_api.rb +4 -3
- data/lib/killbill/gen/plugin-api/ext_bus_event.rb +4 -3
- data/lib/killbill/gen/plugin-api/gateway_notification.rb +4 -3
- data/lib/killbill/gen/plugin-api/hosted_payment_page_form_descriptor.rb +4 -3
- data/lib/killbill/gen/plugin-api/notification_plugin_api.rb +4 -3
- data/lib/killbill/gen/plugin-api/payment_method_info_plugin.rb +4 -3
- data/lib/killbill/gen/plugin-api/payment_plugin_api.rb +75 -81
- data/lib/killbill/gen/plugin-api/payment_plugin_api_exception.rb +4 -3
- data/lib/killbill/gen/plugin-api/{payment_info_plugin.rb → payment_transaction_info_plugin.rb} +21 -6
- data/lib/killbill/gen/plugin-api/require_gen.rb +5 -5
- data/lib/killbill/helpers/active_merchant/active_record/models/payment_method.rb +20 -36
- data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +72 -81
- data/lib/killbill/helpers/active_merchant/active_record/models/transaction.rb +62 -43
- data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +0 -13
- data/lib/killbill/helpers/active_merchant/payment_plugin.rb +127 -125
- data/lib/killbill/http_servlet.rb +16 -1
- data/lib/killbill/killbill_api.rb +0 -3
- data/lib/killbill/payment.rb +22 -6
- data/lib/killbill/rake_task.rb +93 -31
- data/spec/killbill/helpers/payment_method_spec.rb +153 -0
- data/spec/killbill/helpers/response_spec.rb +58 -15
- data/spec/killbill/helpers/test_schema.rb +12 -8
- data/spec/killbill/helpers/transaction_spec.rb +134 -0
- data/spec/killbill/payment_plugin_api_spec.rb +18 -18
- data/spec/killbill/payment_plugin_spec.rb +26 -15
- data/spec/killbill/payment_test.rb +6 -7
- data/spec/spec_helper.rb +3 -0
- metadata +6 -5
- data/lib/killbill/gen/api/payment.rb +0 -187
- data/lib/killbill/gen/plugin-api/refund_info_plugin.rb +0 -152
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
###################################################################################
|
|
2
2
|
# #
|
|
3
3
|
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# Copyright 2014 The Billing Project, LLC #
|
|
4
5
|
# #
|
|
5
|
-
#
|
|
6
|
-
# (the "License"); you may not use this file except in
|
|
7
|
-
# License. You may obtain a copy of the License at:
|
|
6
|
+
# The Billing Project licenses this file to you under the Apache License, #
|
|
7
|
+
# version 2.0 (the "License"); you may not use this file except in #
|
|
8
|
+
# compliance with the License. You may obtain a copy of the License at: #
|
|
8
9
|
# #
|
|
9
10
|
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
11
|
# #
|
|
@@ -37,8 +38,8 @@ module Killbill
|
|
|
37
38
|
end
|
|
38
39
|
|
|
39
40
|
|
|
40
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
41
|
-
def authorize_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, amount, currency, properties, context)
|
|
41
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin authorizePayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, 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)'
|
|
42
|
+
def authorize_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
42
43
|
|
|
43
44
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
44
45
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -46,6 +47,9 @@ module Killbill
|
|
|
46
47
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
47
48
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
48
49
|
|
|
50
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
51
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
52
|
+
|
|
49
53
|
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
50
54
|
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
51
55
|
|
|
@@ -67,8 +71,8 @@ module Killbill
|
|
|
67
71
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
68
72
|
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
69
73
|
begin
|
|
70
|
-
res = @delegate_plugin.authorize_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, amount, currency, properties, context)
|
|
71
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.
|
|
74
|
+
res = @delegate_plugin.authorize_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
75
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
72
76
|
res = res.to_java unless res.nil?
|
|
73
77
|
return res
|
|
74
78
|
rescue Exception => e
|
|
@@ -83,8 +87,8 @@ module Killbill
|
|
|
83
87
|
end
|
|
84
88
|
end
|
|
85
89
|
|
|
86
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
87
|
-
def capture_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, amount, currency, properties, context)
|
|
90
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin capturePayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, 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)'
|
|
91
|
+
def capture_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
88
92
|
|
|
89
93
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
90
94
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -92,6 +96,9 @@ module Killbill
|
|
|
92
96
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
93
97
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
94
98
|
|
|
99
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
100
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
101
|
+
|
|
95
102
|
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
96
103
|
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
97
104
|
|
|
@@ -113,8 +120,8 @@ module Killbill
|
|
|
113
120
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
114
121
|
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
115
122
|
begin
|
|
116
|
-
res = @delegate_plugin.capture_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, amount, currency, properties, context)
|
|
117
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.
|
|
123
|
+
res = @delegate_plugin.capture_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
124
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
118
125
|
res = res.to_java unless res.nil?
|
|
119
126
|
return res
|
|
120
127
|
rescue Exception => e
|
|
@@ -129,8 +136,8 @@ module Killbill
|
|
|
129
136
|
end
|
|
130
137
|
end
|
|
131
138
|
|
|
132
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
133
|
-
def
|
|
139
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin purchasePayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, 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)'
|
|
140
|
+
def purchase_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
134
141
|
|
|
135
142
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
136
143
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -138,6 +145,9 @@ module Killbill
|
|
|
138
145
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
139
146
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
140
147
|
|
|
148
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
149
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
150
|
+
|
|
141
151
|
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
142
152
|
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
143
153
|
|
|
@@ -159,24 +169,24 @@ module Killbill
|
|
|
159
169
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
160
170
|
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
161
171
|
begin
|
|
162
|
-
res = @delegate_plugin.
|
|
163
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.
|
|
172
|
+
res = @delegate_plugin.purchase_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
173
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
164
174
|
res = res.to_java unless res.nil?
|
|
165
175
|
return res
|
|
166
176
|
rescue Exception => e
|
|
167
|
-
message = "Failure in
|
|
177
|
+
message = "Failure in purchase_payment: #{e}"
|
|
168
178
|
unless e.backtrace.nil?
|
|
169
179
|
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
170
180
|
end
|
|
171
181
|
logger.warn message
|
|
172
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("
|
|
182
|
+
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("purchase_payment failure", e.message)
|
|
173
183
|
ensure
|
|
174
184
|
@delegate_plugin.after_request
|
|
175
185
|
end
|
|
176
186
|
end
|
|
177
187
|
|
|
178
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
179
|
-
def void_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, properties, context)
|
|
188
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin voidPayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
|
189
|
+
def void_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, properties, context)
|
|
180
190
|
|
|
181
191
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
182
192
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -184,6 +194,9 @@ module Killbill
|
|
|
184
194
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
185
195
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
186
196
|
|
|
197
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
198
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
199
|
+
|
|
187
200
|
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
188
201
|
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
189
202
|
|
|
@@ -199,8 +212,8 @@ module Killbill
|
|
|
199
212
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
200
213
|
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
201
214
|
begin
|
|
202
|
-
res = @delegate_plugin.void_payment(kbAccountId, kbPaymentId, kbPaymentMethodId, properties, context)
|
|
203
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.
|
|
215
|
+
res = @delegate_plugin.void_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, properties, context)
|
|
216
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
204
217
|
res = res.to_java unless res.nil?
|
|
205
218
|
return res
|
|
206
219
|
rescue Exception => e
|
|
@@ -215,8 +228,8 @@ module Killbill
|
|
|
215
228
|
end
|
|
216
229
|
end
|
|
217
230
|
|
|
218
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
219
|
-
def
|
|
231
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin creditPayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, 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)'
|
|
232
|
+
def credit_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
220
233
|
|
|
221
234
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
222
235
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -224,42 +237,17 @@ module Killbill
|
|
|
224
237
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
225
238
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
226
239
|
|
|
227
|
-
# conversion for
|
|
228
|
-
|
|
229
|
-
(properties.nil? ? [] : properties.iterator).each do |m|
|
|
230
|
-
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
231
|
-
m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
|
|
232
|
-
tmp << m
|
|
233
|
-
end
|
|
234
|
-
properties = tmp
|
|
235
|
-
|
|
236
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
237
|
-
context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
|
|
238
|
-
begin
|
|
239
|
-
res = @delegate_plugin.get_payment_info(kbAccountId, kbPaymentId, properties, context)
|
|
240
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentInfoPlugin]
|
|
241
|
-
res = res.to_java unless res.nil?
|
|
242
|
-
return res
|
|
243
|
-
rescue Exception => e
|
|
244
|
-
message = "Failure in get_payment_info: #{e}"
|
|
245
|
-
unless e.backtrace.nil?
|
|
246
|
-
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
247
|
-
end
|
|
248
|
-
logger.warn message
|
|
249
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("get_payment_info failure", e.message)
|
|
250
|
-
ensure
|
|
251
|
-
@delegate_plugin.after_request
|
|
252
|
-
end
|
|
253
|
-
end
|
|
254
|
-
|
|
255
|
-
java_signature 'Java::org.killbill.billing.util.entity.Pagination searchPayments(Java::java.lang.String, Java::java.lang.Long, Java::java.lang.Long, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
256
|
-
def search_payments(searchKey, offset, limit, properties, context)
|
|
240
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
241
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
257
242
|
|
|
258
|
-
# conversion for
|
|
243
|
+
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
244
|
+
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
259
245
|
|
|
260
|
-
# conversion for
|
|
246
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
247
|
+
amount = amount.nil? ? 0 : BigDecimal.new(amount.to_s)
|
|
261
248
|
|
|
262
|
-
# conversion for
|
|
249
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
250
|
+
currency = currency.to_s.to_sym unless currency.nil?
|
|
263
251
|
|
|
264
252
|
# conversion for properties [type = java.lang.Iterable]
|
|
265
253
|
tmp = []
|
|
@@ -270,27 +258,27 @@ module Killbill
|
|
|
270
258
|
end
|
|
271
259
|
properties = tmp
|
|
272
260
|
|
|
273
|
-
# conversion for context [type = org.killbill.billing.util.callcontext.
|
|
274
|
-
context = Killbill::Plugin::Model::
|
|
261
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
262
|
+
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
275
263
|
begin
|
|
276
|
-
res = @delegate_plugin.
|
|
277
|
-
# conversion for res [type = org.killbill.billing.
|
|
264
|
+
res = @delegate_plugin.credit_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
265
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
278
266
|
res = res.to_java unless res.nil?
|
|
279
267
|
return res
|
|
280
268
|
rescue Exception => e
|
|
281
|
-
message = "Failure in
|
|
269
|
+
message = "Failure in credit_payment: #{e}"
|
|
282
270
|
unless e.backtrace.nil?
|
|
283
271
|
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
284
272
|
end
|
|
285
273
|
logger.warn message
|
|
286
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("
|
|
274
|
+
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("credit_payment failure", e.message)
|
|
287
275
|
ensure
|
|
288
276
|
@delegate_plugin.after_request
|
|
289
277
|
end
|
|
290
278
|
end
|
|
291
279
|
|
|
292
|
-
java_signature 'Java::org.killbill.billing.payment.plugin.api.
|
|
293
|
-
def
|
|
280
|
+
java_signature 'Java::org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin refundPayment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, 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)'
|
|
281
|
+
def refund_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
294
282
|
|
|
295
283
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
296
284
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -298,8 +286,14 @@ module Killbill
|
|
|
298
286
|
# conversion for kbPaymentId [type = java.util.UUID]
|
|
299
287
|
kbPaymentId = kbPaymentId.nil? ? nil : kbPaymentId.to_s
|
|
300
288
|
|
|
301
|
-
# conversion for
|
|
302
|
-
|
|
289
|
+
# conversion for kbTransactionId [type = java.util.UUID]
|
|
290
|
+
kbTransactionId = kbTransactionId.nil? ? nil : kbTransactionId.to_s
|
|
291
|
+
|
|
292
|
+
# conversion for kbPaymentMethodId [type = java.util.UUID]
|
|
293
|
+
kbPaymentMethodId = kbPaymentMethodId.nil? ? nil : kbPaymentMethodId.to_s
|
|
294
|
+
|
|
295
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
296
|
+
amount = amount.nil? ? 0 : BigDecimal.new(amount.to_s)
|
|
303
297
|
|
|
304
298
|
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
|
305
299
|
currency = currency.to_s.to_sym unless currency.nil?
|
|
@@ -316,24 +310,24 @@ module Killbill
|
|
|
316
310
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
|
317
311
|
context = Killbill::Plugin::Model::CallContext.new.to_ruby(context) unless context.nil?
|
|
318
312
|
begin
|
|
319
|
-
res = @delegate_plugin.
|
|
320
|
-
# conversion for res [type = org.killbill.billing.payment.plugin.api.
|
|
313
|
+
res = @delegate_plugin.refund_payment(kbAccountId, kbPaymentId, kbTransactionId, kbPaymentMethodId, amount, currency, properties, context)
|
|
314
|
+
# conversion for res [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
321
315
|
res = res.to_java unless res.nil?
|
|
322
316
|
return res
|
|
323
317
|
rescue Exception => e
|
|
324
|
-
message = "Failure in
|
|
318
|
+
message = "Failure in refund_payment: #{e}"
|
|
325
319
|
unless e.backtrace.nil?
|
|
326
320
|
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
327
321
|
end
|
|
328
322
|
logger.warn message
|
|
329
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("
|
|
323
|
+
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("refund_payment failure", e.message)
|
|
330
324
|
ensure
|
|
331
325
|
@delegate_plugin.after_request
|
|
332
326
|
end
|
|
333
327
|
end
|
|
334
328
|
|
|
335
|
-
java_signature 'Java::java.util.List
|
|
336
|
-
def
|
|
329
|
+
java_signature 'Java::java.util.List getPaymentInfo(Java::java.util.UUID, Java::java.util.UUID, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
330
|
+
def get_payment_info(kbAccountId, kbPaymentId, properties, context)
|
|
337
331
|
|
|
338
332
|
# conversion for kbAccountId [type = java.util.UUID]
|
|
339
333
|
kbAccountId = kbAccountId.nil? ? nil : kbAccountId.to_s
|
|
@@ -353,30 +347,30 @@ module Killbill
|
|
|
353
347
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
354
348
|
context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
|
|
355
349
|
begin
|
|
356
|
-
res = @delegate_plugin.
|
|
350
|
+
res = @delegate_plugin.get_payment_info(kbAccountId, kbPaymentId, properties, context)
|
|
357
351
|
# conversion for res [type = java.util.List]
|
|
358
352
|
tmp = java.util.ArrayList.new
|
|
359
353
|
(res || []).each do |m|
|
|
360
|
-
# conversion for m [type = org.killbill.billing.payment.plugin.api.
|
|
354
|
+
# conversion for m [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
|
|
361
355
|
m = m.to_java unless m.nil?
|
|
362
356
|
tmp.add(m)
|
|
363
357
|
end
|
|
364
358
|
res = tmp
|
|
365
359
|
return res
|
|
366
360
|
rescue Exception => e
|
|
367
|
-
message = "Failure in
|
|
361
|
+
message = "Failure in get_payment_info: #{e}"
|
|
368
362
|
unless e.backtrace.nil?
|
|
369
363
|
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
370
364
|
end
|
|
371
365
|
logger.warn message
|
|
372
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("
|
|
366
|
+
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("get_payment_info failure", e.message)
|
|
373
367
|
ensure
|
|
374
368
|
@delegate_plugin.after_request
|
|
375
369
|
end
|
|
376
370
|
end
|
|
377
371
|
|
|
378
|
-
java_signature 'Java::org.killbill.billing.util.entity.Pagination
|
|
379
|
-
def
|
|
372
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination searchPayments(Java::java.lang.String, Java::java.lang.Long, Java::java.lang.Long, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
|
373
|
+
def search_payments(searchKey, offset, limit, properties, context)
|
|
380
374
|
|
|
381
375
|
# conversion for searchKey [type = java.lang.String]
|
|
382
376
|
|
|
@@ -396,17 +390,17 @@ module Killbill
|
|
|
396
390
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
|
397
391
|
context = Killbill::Plugin::Model::TenantContext.new.to_ruby(context) unless context.nil?
|
|
398
392
|
begin
|
|
399
|
-
res = @delegate_plugin.
|
|
393
|
+
res = @delegate_plugin.search_payments(searchKey, offset, limit, properties, context)
|
|
400
394
|
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
|
401
395
|
res = res.to_java unless res.nil?
|
|
402
396
|
return res
|
|
403
397
|
rescue Exception => e
|
|
404
|
-
message = "Failure in
|
|
398
|
+
message = "Failure in search_payments: #{e}"
|
|
405
399
|
unless e.backtrace.nil?
|
|
406
400
|
message = "#{message}\n#{e.backtrace.join("\n")}"
|
|
407
401
|
end
|
|
408
402
|
logger.warn message
|
|
409
|
-
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("
|
|
403
|
+
raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("search_payments failure", e.message)
|
|
410
404
|
ensure
|
|
411
405
|
@delegate_plugin.after_request
|
|
412
406
|
end
|