killbill 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/Jarfile +7 -5
  3. data/NEWS +3 -0
  4. data/README.md +41 -17
  5. data/VERSION +1 -1
  6. data/generators/active_merchant/templates/Jarfile.rb +7 -5
  7. data/generators/active_merchant/templates/config.yml.rb +3 -3
  8. data/generators/active_merchant/templates/db/ddl.sql.rb +4 -0
  9. data/generators/active_merchant/templates/db/schema.rb +4 -0
  10. data/generators/active_merchant/templates/lib/api.rb +42 -22
  11. data/generators/active_merchant/templates/lib/models/response.rb +3 -1
  12. data/generators/active_merchant/templates/plugin.gemspec.rb +1 -1
  13. data/lib/killbill.rb +7 -4
  14. data/lib/killbill/gen/api/account.rb +4 -3
  15. data/lib/killbill/gen/api/account_api_exception.rb +4 -3
  16. data/lib/killbill/gen/api/account_audit_logs.rb +12 -68
  17. data/lib/killbill/gen/api/account_audit_logs_for_object_type.rb +4 -3
  18. data/lib/killbill/gen/api/account_data.rb +4 -3
  19. data/lib/killbill/gen/api/account_email.rb +4 -3
  20. data/lib/killbill/gen/api/account_user_api.rb +4 -3
  21. data/lib/killbill/gen/api/audit_log.rb +4 -3
  22. data/lib/killbill/gen/api/audit_user_api.rb +4 -3
  23. data/lib/killbill/gen/api/billing_exception_base.rb +4 -3
  24. data/lib/killbill/gen/api/block.rb +4 -3
  25. data/lib/killbill/gen/api/blockable.rb +4 -3
  26. data/lib/killbill/gen/api/blocking_api_exception.rb +4 -3
  27. data/lib/killbill/gen/api/blocking_state.rb +4 -3
  28. data/lib/killbill/gen/api/call_context.rb +4 -3
  29. data/lib/killbill/gen/api/catalog.rb +4 -3
  30. data/lib/killbill/gen/api/catalog_api_exception.rb +4 -3
  31. data/lib/killbill/gen/api/catalog_user_api.rb +4 -3
  32. data/lib/killbill/gen/api/column_info.rb +4 -3
  33. data/lib/killbill/gen/api/control_tag.rb +4 -3
  34. data/lib/killbill/gen/api/currency_conversion.rb +4 -3
  35. data/lib/killbill/gen/api/currency_conversion_api.rb +4 -3
  36. data/lib/killbill/gen/api/currency_conversion_exception.rb +4 -3
  37. data/lib/killbill/gen/api/currency_value_null.rb +4 -3
  38. data/lib/killbill/gen/api/custom_field.rb +4 -3
  39. data/lib/killbill/gen/api/custom_field_api_exception.rb +4 -3
  40. data/lib/killbill/gen/api/custom_field_user_api.rb +4 -3
  41. data/lib/killbill/gen/api/database_export_output_stream.rb +4 -3
  42. data/lib/killbill/gen/api/direct_payment.rb +39 -11
  43. data/lib/killbill/gen/api/direct_payment_api.rb +643 -31
  44. data/lib/killbill/gen/api/direct_payment_transaction.rb +37 -12
  45. data/lib/killbill/gen/api/duration.rb +4 -3
  46. data/lib/killbill/gen/api/entitlement.rb +4 -3
  47. data/lib/killbill/gen/api/entitlement_ao_status_dry_run.rb +4 -3
  48. data/lib/killbill/gen/api/entitlement_api.rb +4 -3
  49. data/lib/killbill/gen/api/entitlement_api_exception.rb +4 -3
  50. data/lib/killbill/gen/api/entity.rb +4 -3
  51. data/lib/killbill/gen/api/fixed.rb +4 -3
  52. data/lib/killbill/gen/api/illegal_plan_change.rb +4 -3
  53. data/lib/killbill/gen/api/international_price.rb +4 -3
  54. data/lib/killbill/gen/api/invalid_config_exception.rb +4 -3
  55. data/lib/killbill/gen/api/invoice.rb +4 -3
  56. data/lib/killbill/gen/api/invoice_api_exception.rb +4 -3
  57. data/lib/killbill/gen/api/invoice_creation_event.rb +4 -3
  58. data/lib/killbill/gen/api/invoice_formatter.rb +4 -3
  59. data/lib/killbill/gen/api/invoice_item.rb +4 -3
  60. data/lib/killbill/gen/api/invoice_item_formatter.rb +4 -3
  61. data/lib/killbill/gen/api/invoice_payment.rb +7 -7
  62. data/lib/killbill/gen/api/invoice_payment_api.rb +7 -153
  63. data/lib/killbill/gen/api/invoice_user_api.rb +22 -3
  64. data/lib/killbill/gen/api/limit.rb +4 -3
  65. data/lib/killbill/gen/api/listing.rb +4 -3
  66. data/lib/killbill/gen/api/migration_plan.rb +4 -3
  67. data/lib/killbill/gen/api/mutable_account_data.rb +4 -3
  68. data/lib/killbill/gen/api/osgi_killbill.rb +15 -7
  69. data/lib/killbill/gen/api/osgi_plugin_properties.rb +4 -3
  70. data/lib/killbill/gen/api/pagination.rb +4 -3
  71. data/lib/killbill/gen/api/payment_api_exception.rb +4 -3
  72. data/lib/killbill/gen/api/payment_gateway_api.rb +4 -3
  73. data/lib/killbill/gen/api/payment_method.rb +11 -4
  74. data/lib/killbill/gen/api/payment_method_plugin.rb +5 -76
  75. data/lib/killbill/gen/api/payment_options.rb +68 -0
  76. data/lib/killbill/gen/api/plan.rb +4 -3
  77. data/lib/killbill/gen/api/plan_change_result.rb +4 -3
  78. data/lib/killbill/gen/api/plan_phase.rb +4 -3
  79. data/lib/killbill/gen/api/plan_phase_specifier.rb +4 -3
  80. data/lib/killbill/gen/api/plan_specifier.rb +4 -3
  81. data/lib/killbill/gen/api/plugin_config_service_api.rb +4 -3
  82. data/lib/killbill/gen/api/plugin_property.rb +4 -3
  83. data/lib/killbill/gen/api/price.rb +4 -3
  84. data/lib/killbill/gen/api/price_list.rb +4 -3
  85. data/lib/killbill/gen/api/price_list_set.rb +4 -3
  86. data/lib/killbill/gen/api/product.rb +4 -3
  87. data/lib/killbill/gen/api/rate.rb +4 -3
  88. data/lib/killbill/gen/api/record_id_api.rb +4 -3
  89. data/lib/killbill/gen/api/recurring.rb +4 -3
  90. data/lib/killbill/gen/api/refund.rb +7 -6
  91. data/lib/killbill/gen/api/require_gen.rb +5 -6
  92. data/lib/killbill/gen/api/rolled_up_usage.rb +4 -3
  93. data/lib/killbill/gen/api/security_api_exception.rb +4 -3
  94. data/lib/killbill/gen/api/static_catalog.rb +4 -3
  95. data/lib/killbill/gen/api/subscription.rb +4 -3
  96. data/lib/killbill/gen/api/subscription_api.rb +4 -3
  97. data/lib/killbill/gen/api/subscription_api_exception.rb +4 -3
  98. data/lib/killbill/gen/api/subscription_bundle.rb +4 -3
  99. data/lib/killbill/gen/api/subscription_bundle_timeline.rb +4 -3
  100. data/lib/killbill/gen/api/subscription_event.rb +4 -3
  101. data/lib/killbill/gen/api/tag.rb +4 -3
  102. data/lib/killbill/gen/api/tag_api_exception.rb +4 -3
  103. data/lib/killbill/gen/api/tag_definition.rb +4 -3
  104. data/lib/killbill/gen/api/tag_definition_api_exception.rb +4 -3
  105. data/lib/killbill/gen/api/tag_user_api.rb +4 -3
  106. data/lib/killbill/gen/api/tenant.rb +4 -3
  107. data/lib/killbill/gen/api/tenant_api_exception.rb +4 -3
  108. data/lib/killbill/gen/api/tenant_context.rb +4 -3
  109. data/lib/killbill/gen/api/tenant_data.rb +4 -3
  110. data/lib/killbill/gen/api/tenant_kv.rb +4 -3
  111. data/lib/killbill/gen/api/tenant_user_api.rb +4 -3
  112. data/lib/killbill/gen/api/tier.rb +4 -3
  113. data/lib/killbill/gen/api/tiered_block.rb +4 -3
  114. data/lib/killbill/gen/api/unit.rb +4 -3
  115. data/lib/killbill/gen/api/usage.rb +4 -3
  116. data/lib/killbill/gen/api/usage_user_api.rb +4 -3
  117. data/lib/killbill/gen/plugin-api/currency_plugin_api.rb +4 -3
  118. data/lib/killbill/gen/plugin-api/ext_bus_event.rb +4 -3
  119. data/lib/killbill/gen/plugin-api/gateway_notification.rb +4 -3
  120. data/lib/killbill/gen/plugin-api/hosted_payment_page_form_descriptor.rb +4 -3
  121. data/lib/killbill/gen/plugin-api/notification_plugin_api.rb +4 -3
  122. data/lib/killbill/gen/plugin-api/payment_method_info_plugin.rb +4 -3
  123. data/lib/killbill/gen/plugin-api/payment_plugin_api.rb +75 -81
  124. data/lib/killbill/gen/plugin-api/payment_plugin_api_exception.rb +4 -3
  125. data/lib/killbill/gen/plugin-api/{payment_info_plugin.rb → payment_transaction_info_plugin.rb} +21 -6
  126. data/lib/killbill/gen/plugin-api/require_gen.rb +5 -5
  127. data/lib/killbill/helpers/active_merchant/active_record/models/payment_method.rb +20 -36
  128. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +72 -81
  129. data/lib/killbill/helpers/active_merchant/active_record/models/transaction.rb +62 -43
  130. data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +0 -13
  131. data/lib/killbill/helpers/active_merchant/payment_plugin.rb +127 -125
  132. data/lib/killbill/http_servlet.rb +16 -1
  133. data/lib/killbill/killbill_api.rb +0 -3
  134. data/lib/killbill/payment.rb +22 -6
  135. data/lib/killbill/rake_task.rb +93 -31
  136. data/spec/killbill/helpers/payment_method_spec.rb +153 -0
  137. data/spec/killbill/helpers/response_spec.rb +58 -15
  138. data/spec/killbill/helpers/test_schema.rb +12 -8
  139. data/spec/killbill/helpers/transaction_spec.rb +134 -0
  140. data/spec/killbill/payment_plugin_api_spec.rb +18 -18
  141. data/spec/killbill/payment_plugin_spec.rb +26 -15
  142. data/spec/killbill/payment_test.rb +6 -7
  143. data/spec/spec_helper.rb +3 -0
  144. metadata +6 -5
  145. data/lib/killbill/gen/api/payment.rb +0 -187
  146. 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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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
- # Ning licenses this file to you under the Apache License, version 2.0 #
6
- # (the "License"); you may not use this file except in compliance with the #
7
- # License. You may obtain a copy of the License at: #
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, :currency, :payment_status, :transactions
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 = []