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.
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
  # #
@@ -140,6 +141,24 @@ module Killbill
140
141
  end
141
142
  end
142
143
 
144
+ java_signature 'Java::org.killbill.billing.invoice.api.Invoice getInvoiceByPayment(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
145
+ def get_invoice_by_payment(paymentId, context)
146
+
147
+ # conversion for paymentId [type = java.util.UUID]
148
+ paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
149
+
150
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
151
+ context = context.to_java unless context.nil?
152
+ begin
153
+ res = @real_java_api.get_invoice_by_payment(paymentId, context)
154
+ # conversion for res [type = org.killbill.billing.invoice.api.Invoice]
155
+ res = Killbill::Plugin::Model::Invoice.new.to_ruby(res) unless res.nil?
156
+ return res
157
+ rescue Java::org.killbill.billing.invoice.api.InvoiceApiException => e
158
+ raise Killbill::Plugin::Model::InvoiceApiException.new.to_ruby(e)
159
+ end
160
+ end
161
+
143
162
  java_signature 'Java::org.killbill.billing.invoice.api.Invoice getInvoiceByNumber(Java::java.lang.Integer, Java::org.killbill.billing.util.callcontext.TenantContext)'
144
163
  def get_invoice_by_number(number, context)
145
164
 
@@ -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.osgi.api.OSGIKillbill
34
35
 
35
- attr_accessor :account_user_api, :catalog_user_api, :subscription_api, :invoice_payment_api, :invoice_user_api, :payment_api, :tenant_user_api, :usage_user_api, :audit_user_api, :custom_field_user_api, :export_user_api, :tag_user_api, :entitlement_api, :record_id_api, :currency_conversion_api, :plugin_config_service_api
36
+ attr_accessor :account_user_api, :catalog_user_api, :subscription_api, :invoice_payment_api, :invoice_user_api, :payment_api, :tenant_user_api, :usage_user_api, :audit_user_api, :custom_field_user_api, :export_user_api, :tag_user_api, :entitlement_api, :record_id_api, :currency_conversion_api, :plugin_config_service_api, :security_api
36
37
 
37
38
  def initialize()
38
39
  end
@@ -53,7 +54,7 @@ module Killbill
53
54
  # conversion for invoice_user_api [type = org.killbill.billing.invoice.api.InvoiceUserApi]
54
55
  @invoice_user_api = @invoice_user_api.to_java unless @invoice_user_api.nil?
55
56
 
56
- # conversion for payment_api [type = org.killbill.billing.payment.api.PaymentApi]
57
+ # conversion for payment_api [type = org.killbill.billing.payment.api.DirectPaymentApi]
57
58
  @payment_api = @payment_api.to_java unless @payment_api.nil?
58
59
 
59
60
  # conversion for tenant_user_api [type = org.killbill.billing.tenant.api.TenantUserApi]
@@ -85,6 +86,9 @@ module Killbill
85
86
 
86
87
  # conversion for plugin_config_service_api [type = org.killbill.billing.osgi.api.config.PluginConfigServiceApi]
87
88
  @plugin_config_service_api = @plugin_config_service_api.to_java unless @plugin_config_service_api.nil?
89
+
90
+ # conversion for security_api [type = org.killbill.billing.security.api.SecurityApi]
91
+ @security_api = @security_api.to_java unless @security_api.nil?
88
92
  self
89
93
  end
90
94
 
@@ -109,9 +113,9 @@ module Killbill
109
113
  @invoice_user_api = j_obj.invoice_user_api
110
114
  @invoice_user_api = Killbill::Plugin::Model::InvoiceUserApi.new.to_ruby(@invoice_user_api) unless @invoice_user_api.nil?
111
115
 
112
- # conversion for payment_api [type = org.killbill.billing.payment.api.PaymentApi]
116
+ # conversion for payment_api [type = org.killbill.billing.payment.api.DirectPaymentApi]
113
117
  @payment_api = j_obj.payment_api
114
- @payment_api = Killbill::Plugin::Model::PaymentApi.new.to_ruby(@payment_api) unless @payment_api.nil?
118
+ @payment_api = Killbill::Plugin::Model::DirectPaymentApi.new.to_ruby(@payment_api) unless @payment_api.nil?
115
119
 
116
120
  # conversion for tenant_user_api [type = org.killbill.billing.tenant.api.TenantUserApi]
117
121
  @tenant_user_api = j_obj.tenant_user_api
@@ -152,6 +156,10 @@ module Killbill
152
156
  # conversion for plugin_config_service_api [type = org.killbill.billing.osgi.api.config.PluginConfigServiceApi]
153
157
  @plugin_config_service_api = j_obj.plugin_config_service_api
154
158
  @plugin_config_service_api = Killbill::Plugin::Model::PluginConfigServiceApi.new.to_ruby(@plugin_config_service_api) unless @plugin_config_service_api.nil?
159
+
160
+ # conversion for security_api [type = org.killbill.billing.security.api.SecurityApi]
161
+ @security_api = j_obj.security_api
162
+ @security_api = Killbill::Plugin::Model::SecurityApi.new.to_ruby(@security_api) unless @security_api.nil?
155
163
  self
156
164
  end
157
165
 
@@ -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.PaymentMethod
34
35
 
35
- attr_accessor :id, :created_date, :updated_date, :account_id, :is_active, :plugin_name, :plugin_detail
36
+ attr_accessor :id, :created_date, :updated_date, :external_key, :account_id, :is_active, :plugin_name, :plugin_detail
36
37
 
37
38
  def initialize()
38
39
  end
@@ -53,6 +54,9 @@ module Killbill
53
54
  @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
54
55
  end
55
56
 
57
+ # conversion for external_key [type = java.lang.String]
58
+ @external_key = @external_key.to_s unless @external_key.nil?
59
+
56
60
  # conversion for account_id [type = java.util.UUID]
57
61
  @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
58
62
 
@@ -88,6 +92,9 @@ module Killbill
88
92
  @updated_date = DateTime.iso8601(str)
89
93
  end
90
94
 
95
+ # conversion for external_key [type = java.lang.String]
96
+ @external_key = j_obj.external_key
97
+
91
98
  # conversion for account_id [type = java.util.UUID]
92
99
  @account_id = j_obj.account_id
93
100
  @account_id = @account_id.nil? ? nil : @account_id.to_s
@@ -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.PaymentMethodPlugin
34
35
 
35
- attr_accessor :kb_payment_method_id, :external_payment_method_id, :is_default_payment_method, :properties, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
36
+ attr_accessor :kb_payment_method_id, :external_payment_method_id, :is_default_payment_method, :properties
36
37
 
37
38
  def initialize()
38
39
  end
@@ -55,42 +56,6 @@ module Killbill
55
56
  tmp.add(m)
56
57
  end
57
58
  @properties = tmp
58
-
59
- # conversion for type [type = java.lang.String]
60
- @type = @type.to_s unless @type.nil?
61
-
62
- # conversion for cc_name [type = java.lang.String]
63
- @cc_name = @cc_name.to_s unless @cc_name.nil?
64
-
65
- # conversion for cc_type [type = java.lang.String]
66
- @cc_type = @cc_type.to_s unless @cc_type.nil?
67
-
68
- # conversion for cc_expiration_month [type = java.lang.String]
69
- @cc_expiration_month = @cc_expiration_month.to_s unless @cc_expiration_month.nil?
70
-
71
- # conversion for cc_expiration_year [type = java.lang.String]
72
- @cc_expiration_year = @cc_expiration_year.to_s unless @cc_expiration_year.nil?
73
-
74
- # conversion for cc_last4 [type = java.lang.String]
75
- @cc_last4 = @cc_last4.to_s unless @cc_last4.nil?
76
-
77
- # conversion for address1 [type = java.lang.String]
78
- @address1 = @address1.to_s unless @address1.nil?
79
-
80
- # conversion for address2 [type = java.lang.String]
81
- @address2 = @address2.to_s unless @address2.nil?
82
-
83
- # conversion for city [type = java.lang.String]
84
- @city = @city.to_s unless @city.nil?
85
-
86
- # conversion for state [type = java.lang.String]
87
- @state = @state.to_s unless @state.nil?
88
-
89
- # conversion for zip [type = java.lang.String]
90
- @zip = @zip.to_s unless @zip.nil?
91
-
92
- # conversion for country [type = java.lang.String]
93
- @country = @country.to_s unless @country.nil?
94
59
  self
95
60
  end
96
61
 
@@ -120,42 +85,6 @@ module Killbill
120
85
  tmp << m
121
86
  end
122
87
  @properties = tmp
123
-
124
- # conversion for type [type = java.lang.String]
125
- @type = j_obj.type
126
-
127
- # conversion for cc_name [type = java.lang.String]
128
- @cc_name = j_obj.cc_name
129
-
130
- # conversion for cc_type [type = java.lang.String]
131
- @cc_type = j_obj.cc_type
132
-
133
- # conversion for cc_expiration_month [type = java.lang.String]
134
- @cc_expiration_month = j_obj.cc_expiration_month
135
-
136
- # conversion for cc_expiration_year [type = java.lang.String]
137
- @cc_expiration_year = j_obj.cc_expiration_year
138
-
139
- # conversion for cc_last4 [type = java.lang.String]
140
- @cc_last4 = j_obj.cc_last4
141
-
142
- # conversion for address1 [type = java.lang.String]
143
- @address1 = j_obj.address1
144
-
145
- # conversion for address2 [type = java.lang.String]
146
- @address2 = j_obj.address2
147
-
148
- # conversion for city [type = java.lang.String]
149
- @city = j_obj.city
150
-
151
- # conversion for state [type = java.lang.String]
152
- @state = j_obj.state
153
-
154
- # conversion for zip [type = java.lang.String]
155
- @zip = j_obj.zip
156
-
157
- # conversion for country [type = java.lang.String]
158
- @country = j_obj.country
159
88
  self
160
89
  end
161
90
 
@@ -0,0 +1,68 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 The Billing Project, LLC #
5
+ # #
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: #
9
+ # #
10
+ # http://www.apache.org/licenses/LICENSE-2.0 #
11
+ # #
12
+ # Unless required by applicable law or agreed to in writing, software #
13
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
14
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
15
+ # License for the specific language governing permissions and limitations #
16
+ # under the License. #
17
+ # #
18
+ ###################################################################################
19
+
20
+
21
+ #
22
+ # DO NOT EDIT!!!
23
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
24
+ #
25
+
26
+
27
+ module Killbill
28
+ module Plugin
29
+ module Model
30
+
31
+ java_package 'org.killbill.billing.payment.api'
32
+ class PaymentOptions
33
+
34
+ include org.killbill.billing.payment.api.PaymentOptions
35
+
36
+ attr_accessor :is_external_payment, :payment_control_plugin_name
37
+
38
+ def initialize()
39
+ end
40
+
41
+ def to_java()
42
+ # conversion for is_external_payment [type = boolean]
43
+ @is_external_payment = @is_external_payment.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_external_payment)
44
+
45
+ # conversion for payment_control_plugin_name [type = java.lang.String]
46
+ @payment_control_plugin_name = @payment_control_plugin_name.to_s unless @payment_control_plugin_name.nil?
47
+ self
48
+ end
49
+
50
+ def to_ruby(j_obj)
51
+ # conversion for is_external_payment [type = boolean]
52
+ @is_external_payment = j_obj.is_external_payment
53
+ if @is_external_payment.nil?
54
+ @is_external_payment = false
55
+ else
56
+ tmp_bool = (@is_external_payment.java_kind_of? java.lang.Boolean) ? @is_external_payment.boolean_value : @is_external_payment
57
+ @is_external_payment = tmp_bool ? true : false
58
+ end
59
+
60
+ # conversion for payment_control_plugin_name [type = java.lang.String]
61
+ @payment_control_plugin_name = j_obj.payment_control_plugin_name
62
+ self
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+ end