killbill 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
# #
|
@@ -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
|
# #
|
@@ -32,7 +33,7 @@ module Killbill
|
|
32
33
|
|
33
34
|
include org.killbill.billing.payment.api.DirectPayment
|
34
35
|
|
35
|
-
attr_accessor :id, :created_date, :updated_date, :account_id, :payment_method_id, :payment_number, :external_key, :auth_amount, :captured_amount, :refunded_amount, :
|
36
|
+
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
|
36
37
|
|
37
38
|
def initialize()
|
38
39
|
end
|
@@ -79,6 +80,20 @@ module Killbill
|
|
79
80
|
@captured_amount = java.math.BigDecimal.new(@captured_amount.to_s)
|
80
81
|
end
|
81
82
|
|
83
|
+
# conversion for purchased_amount [type = java.math.BigDecimal]
|
84
|
+
if @purchased_amount.nil?
|
85
|
+
@purchased_amount = java.math.BigDecimal::ZERO
|
86
|
+
else
|
87
|
+
@purchased_amount = java.math.BigDecimal.new(@purchased_amount.to_s)
|
88
|
+
end
|
89
|
+
|
90
|
+
# conversion for credited_amount [type = java.math.BigDecimal]
|
91
|
+
if @credited_amount.nil?
|
92
|
+
@credited_amount = java.math.BigDecimal::ZERO
|
93
|
+
else
|
94
|
+
@credited_amount = java.math.BigDecimal.new(@credited_amount.to_s)
|
95
|
+
end
|
96
|
+
|
82
97
|
# conversion for refunded_amount [type = java.math.BigDecimal]
|
83
98
|
if @refunded_amount.nil?
|
84
99
|
@refunded_amount = java.math.BigDecimal::ZERO
|
@@ -86,12 +101,12 @@ module Killbill
|
|
86
101
|
@refunded_amount = java.math.BigDecimal.new(@refunded_amount.to_s)
|
87
102
|
end
|
88
103
|
|
104
|
+
# conversion for is_auth_voided [type = java.lang.Boolean]
|
105
|
+
@is_auth_voided = @is_auth_voided.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_auth_voided)
|
106
|
+
|
89
107
|
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
90
108
|
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
91
109
|
|
92
|
-
# conversion for payment_status [type = org.killbill.billing.payment.api.PaymentStatus]
|
93
|
-
@payment_status = Java::org.killbill.billing.payment.api.PaymentStatus.value_of("#{@payment_status.to_s}") unless @payment_status.nil?
|
94
|
-
|
95
110
|
# conversion for transactions [type = java.util.List]
|
96
111
|
tmp = java.util.ArrayList.new
|
97
112
|
(@transactions || []).each do |m|
|
@@ -146,18 +161,31 @@ module Killbill
|
|
146
161
|
@captured_amount = j_obj.captured_amount
|
147
162
|
@captured_amount = @captured_amount.nil? ? 0 : BigDecimal.new(@captured_amount.to_s)
|
148
163
|
|
164
|
+
# conversion for purchased_amount [type = java.math.BigDecimal]
|
165
|
+
@purchased_amount = j_obj.purchased_amount
|
166
|
+
@purchased_amount = @purchased_amount.nil? ? 0 : BigDecimal.new(@purchased_amount.to_s)
|
167
|
+
|
168
|
+
# conversion for credited_amount [type = java.math.BigDecimal]
|
169
|
+
@credited_amount = j_obj.credited_amount
|
170
|
+
@credited_amount = @credited_amount.nil? ? 0 : BigDecimal.new(@credited_amount.to_s)
|
171
|
+
|
149
172
|
# conversion for refunded_amount [type = java.math.BigDecimal]
|
150
173
|
@refunded_amount = j_obj.refunded_amount
|
151
174
|
@refunded_amount = @refunded_amount.nil? ? 0 : BigDecimal.new(@refunded_amount.to_s)
|
152
175
|
|
176
|
+
# conversion for is_auth_voided [type = java.lang.Boolean]
|
177
|
+
@is_auth_voided = j_obj.is_auth_voided
|
178
|
+
if @is_auth_voided.nil?
|
179
|
+
@is_auth_voided = false
|
180
|
+
else
|
181
|
+
tmp_bool = (@is_auth_voided.java_kind_of? java.lang.Boolean) ? @is_auth_voided.boolean_value : @is_auth_voided
|
182
|
+
@is_auth_voided = tmp_bool ? true : false
|
183
|
+
end
|
184
|
+
|
153
185
|
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
154
186
|
@currency = j_obj.currency
|
155
187
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
156
188
|
|
157
|
-
# conversion for payment_status [type = org.killbill.billing.payment.api.PaymentStatus]
|
158
|
-
@payment_status = j_obj.payment_status
|
159
|
-
@payment_status = @payment_status.to_s.to_sym unless @payment_status.nil?
|
160
|
-
|
161
189
|
# conversion for transactions [type = java.util.List]
|
162
190
|
@transactions = j_obj.transactions
|
163
191
|
tmp = []
|