killbill 3.2.4 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -2
  3. data/.travis.yml +26 -5
  4. data/Gemfile +1 -1
  5. data/Gemfile.head +5 -0
  6. data/Gemfile.lock +125 -0
  7. data/Jarfile +9 -9
  8. data/Jarfile.lock +54 -0
  9. data/NEWS +3 -0
  10. data/README.md +13 -0
  11. data/VERSION +1 -1
  12. data/generators/active_merchant/templates/.gitignore.rb +2 -3
  13. data/generators/active_merchant/templates/.travis.yml.rb +22 -3
  14. data/generators/active_merchant/templates/Gemfile.head.rb +5 -0
  15. data/generators/active_merchant/templates/Gemfile.rb +1 -1
  16. data/generators/active_merchant/templates/Jarfile.rb +9 -8
  17. data/generators/active_merchant/templates/LICENSE.rb +2 -2
  18. data/generators/active_merchant/templates/config.yml.rb +16 -6
  19. data/generators/active_merchant/templates/lib/plugin.rb +0 -1
  20. data/generators/active_merchant/templates/plugin.gemspec.rb +17 -15
  21. data/generators/active_merchant/templates/pom.xml.rb +1 -1
  22. data/generators/active_merchant/templates/release.sh.rb +34 -14
  23. data/generators/active_merchant/templates/spec/base_plugin_spec.rb +5 -7
  24. data/generators/active_merchant/templates/spec/integration_spec.rb +7 -18
  25. data/killbill.gemspec +21 -15
  26. data/lib/killbill/ext/active_merchant/typhoeus_connection.rb +3 -4
  27. data/lib/killbill/gen/api/account.rb +1 -1
  28. data/lib/killbill/gen/api/account_data.rb +1 -1
  29. data/lib/killbill/gen/api/audit_log.rb +2 -2
  30. data/lib/killbill/gen/api/audit_user_api.rb +3 -3
  31. data/lib/killbill/gen/api/block.rb +1 -1
  32. data/lib/killbill/gen/api/blocking_state.rb +1 -1
  33. data/lib/killbill/gen/api/call_context.rb +2 -2
  34. data/lib/killbill/gen/api/control_tag.rb +2 -2
  35. data/lib/killbill/gen/api/currency_conversion.rb +1 -1
  36. data/lib/killbill/gen/api/currency_conversion_api.rb +2 -2
  37. data/lib/killbill/gen/api/custom_field.rb +1 -1
  38. data/lib/killbill/gen/api/custom_field_user_api.rb +2 -2
  39. data/lib/killbill/gen/api/dry_run_arguments.rb +22 -3
  40. data/lib/killbill/gen/api/duration.rb +1 -1
  41. data/lib/killbill/gen/api/entitlement.rb +3 -3
  42. data/lib/killbill/gen/api/entitlement_ao_status_dry_run.rb +3 -3
  43. data/lib/killbill/gen/api/entitlement_api.rb +25 -7
  44. data/lib/killbill/gen/api/fixed.rb +1 -1
  45. data/lib/killbill/gen/api/invoice.rb +1 -1
  46. data/lib/killbill/gen/api/invoice_formatter.rb +2 -2
  47. data/lib/killbill/gen/api/invoice_item.rb +2 -2
  48. data/lib/killbill/gen/api/invoice_item_formatter.rb +2 -2
  49. data/lib/killbill/gen/api/invoice_payment.rb +3 -3
  50. data/lib/killbill/gen/api/invoice_user_api.rb +2 -2
  51. data/lib/killbill/gen/api/migration_plan.rb +1 -1
  52. data/lib/killbill/gen/api/mutable_account_data.rb +1 -1
  53. data/lib/killbill/gen/api/payment.rb +1 -1
  54. data/lib/killbill/gen/api/payment_api.rb +11 -11
  55. data/lib/killbill/gen/api/payment_transaction.rb +4 -4
  56. data/lib/killbill/gen/api/plan.rb +1 -1
  57. data/lib/killbill/gen/api/plan_change_result.rb +2 -2
  58. data/lib/killbill/gen/api/plan_phase.rb +1 -1
  59. data/lib/killbill/gen/api/plan_phase_price_override.rb +93 -0
  60. data/lib/killbill/gen/api/plan_phase_price_overrides_with_call_context.rb +77 -0
  61. data/lib/killbill/gen/api/plan_phase_specifier.rb +3 -3
  62. data/lib/killbill/gen/api/plan_specifier.rb +2 -2
  63. data/lib/killbill/gen/api/price.rb +1 -1
  64. data/lib/killbill/gen/api/product.rb +1 -1
  65. data/lib/killbill/gen/api/rate.rb +2 -2
  66. data/lib/killbill/gen/api/record_id_api.rb +1 -1
  67. data/lib/killbill/gen/api/recurring.rb +1 -1
  68. data/lib/killbill/gen/api/refund.rb +2 -2
  69. data/lib/killbill/gen/api/require_gen.rb +2 -0
  70. data/lib/killbill/gen/api/static_catalog.rb +2 -2
  71. data/lib/killbill/gen/api/subscription.rb +3 -3
  72. data/lib/killbill/gen/api/subscription_event.rb +3 -3
  73. data/lib/killbill/gen/api/tag.rb +1 -1
  74. data/lib/killbill/gen/api/tag_definition.rb +1 -1
  75. data/lib/killbill/gen/api/tag_user_api.rb +6 -6
  76. data/lib/killbill/gen/api/tiered_block.rb +1 -1
  77. data/lib/killbill/gen/api/usage.rb +3 -3
  78. data/lib/killbill/gen/plugin-api/currency_plugin_api.rb +1 -1
  79. data/lib/killbill/gen/plugin-api/ext_bus_event.rb +2 -2
  80. data/lib/killbill/gen/plugin-api/payment_transaction_info_plugin.rb +3 -3
  81. data/lib/killbill/helpers/active_merchant.rb +2 -2
  82. data/lib/killbill/helpers/active_merchant/active_record.rb +1 -1
  83. data/lib/killbill/helpers/active_merchant/active_record/active_record_helper.rb +14 -0
  84. data/lib/killbill/helpers/active_merchant/active_record/models/helpers.rb +8 -0
  85. data/lib/killbill/helpers/active_merchant/active_record/models/payment_method.rb +10 -8
  86. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +16 -3
  87. data/lib/killbill/helpers/active_merchant/active_record/models/streamy_result_set.rb +1 -3
  88. data/lib/killbill/helpers/active_merchant/active_record/models/transaction.rb +2 -0
  89. data/lib/killbill/helpers/active_merchant/configuration.rb +119 -27
  90. data/lib/killbill/helpers/active_merchant/gateway.rb +40 -27
  91. data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +63 -45
  92. data/lib/killbill/helpers/active_merchant/payment_plugin.rb +121 -95
  93. data/lib/killbill/helpers/active_merchant/private_payment_plugin.rb +1 -1
  94. data/lib/killbill/helpers/active_merchant/properties.rb +9 -2
  95. data/lib/killbill/helpers/active_merchant/sinatra.rb +4 -8
  96. data/lib/killbill/helpers/active_merchant/utils.rb +44 -0
  97. data/lib/killbill/helpers/properties_helper.rb +41 -0
  98. data/lib/killbill/http_servlet.rb +11 -4
  99. data/lib/killbill/killbill_api.rb +6 -4
  100. data/lib/killbill/rake_task.rb +542 -102
  101. data/spec/killbill/helpers/configuration_spec.rb +117 -33
  102. data/spec/killbill/helpers/payment_method_spec.rb +20 -17
  103. data/spec/killbill/helpers/payment_plugin_spec.rb +401 -201
  104. data/spec/killbill/helpers/private_payment_plugin_spec.rb +3 -16
  105. data/spec/killbill/helpers/response_spec.rb +92 -22
  106. data/spec/killbill/helpers/streamy_result_set_spec.rb +3 -2
  107. data/spec/killbill/helpers/test_payment_method.rb +9 -0
  108. data/spec/killbill/helpers/test_response.rb +11 -0
  109. data/spec/killbill/helpers/test_schema.rb +6 -6
  110. data/spec/killbill/helpers/test_transaction.rb +11 -0
  111. data/spec/killbill/helpers/transaction_spec.rb +3 -13
  112. data/spec/killbill/helpers/utils_spec.rb +127 -69
  113. data/spec/spec_helper.rb +69 -18
  114. metadata +77 -71
  115. data/lib/killbill/ext/active_merchant/jdbc_connection.rb +0 -92
  116. data/lib/killbill/ext/active_merchant/proxy_support.rb +0 -58
  117. data/spec/killbill/helpers/gateway_spec.rb +0 -36
@@ -65,7 +65,7 @@ module Killbill
65
65
  @final_phase = @final_phase.to_java unless @final_phase.nil?
66
66
 
67
67
  # conversion for recurring_billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
68
- @recurring_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@recurring_billing_period.to_s}") unless @recurring_billing_period.nil?
68
+ @recurring_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @recurring_billing_period.to_s ) unless @recurring_billing_period.nil?
69
69
 
70
70
  # conversion for plans_allowed_in_bundle [type = int]
71
71
  @plans_allowed_in_bundle = @plans_allowed_in_bundle
@@ -42,10 +42,10 @@ module Killbill
42
42
  @new_price_list = @new_price_list.to_java unless @new_price_list.nil?
43
43
 
44
44
  # conversion for policy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
45
- @policy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of("#{@policy.to_s}") unless @policy.nil?
45
+ @policy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of( @policy.to_s ) unless @policy.nil?
46
46
 
47
47
  # conversion for alignment [type = org.killbill.billing.catalog.api.PlanAlignmentChange]
48
- @alignment = Java::org.killbill.billing.catalog.api.PlanAlignmentChange.value_of("#{@alignment.to_s}") unless @alignment.nil?
48
+ @alignment = Java::org.killbill.billing.catalog.api.PlanAlignmentChange.value_of( @alignment.to_s ) unless @alignment.nil?
49
49
  Java::org.killbill.billing.catalog.api.PlanChangeResult.new(@new_price_list, @policy, @alignment)
50
50
  end
51
51
 
@@ -62,7 +62,7 @@ module Killbill
62
62
  @duration = @duration.to_java unless @duration.nil?
63
63
 
64
64
  # conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
65
- @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
65
+ @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of( @phase_type.to_s ) unless @phase_type.nil?
66
66
  self
67
67
  end
68
68
 
@@ -0,0 +1,93 @@
1
+ #############################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 Groupon, Inc. #
5
+ # Copyright 2014 The Billing Project, LLC #
6
+ # #
7
+ # The Billing Project licenses this file to you under the Apache License, version 2.0 #
8
+ # (the "License"); you may not use this file except in compliance with the #
9
+ # License. You may obtain a copy of the License at: #
10
+ # #
11
+ # http://www.apache.org/licenses/LICENSE-2.0 #
12
+ # #
13
+ # Unless required by applicable law or agreed to in writing, software #
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
16
+ # License for the specific language governing permissions and limitations #
17
+ # under the License. #
18
+ # #
19
+ #############################################################################################
20
+
21
+
22
+ #
23
+ # DO NOT EDIT!!!
24
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
25
+ #
26
+
27
+
28
+ module Killbill
29
+ module Plugin
30
+ module Model
31
+
32
+ java_package 'org.killbill.billing.catalog.api'
33
+ class PlanPhasePriceOverride
34
+
35
+ include org.killbill.billing.catalog.api.PlanPhasePriceOverride
36
+
37
+ attr_accessor :phase_name, :plan_phase_specifier, :currency, :fixed_price, :recurring_price
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for phase_name [type = java.lang.String]
44
+ @phase_name = @phase_name.to_s unless @phase_name.nil?
45
+
46
+ # conversion for plan_phase_specifier [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
47
+ @plan_phase_specifier = @plan_phase_specifier.to_java unless @plan_phase_specifier.nil?
48
+
49
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
50
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
51
+
52
+ # conversion for fixed_price [type = java.math.BigDecimal]
53
+ if @fixed_price.nil?
54
+ @fixed_price = java.math.BigDecimal::ZERO
55
+ else
56
+ @fixed_price = java.math.BigDecimal.new(@fixed_price.to_s)
57
+ end
58
+
59
+ # conversion for recurring_price [type = java.math.BigDecimal]
60
+ if @recurring_price.nil?
61
+ @recurring_price = java.math.BigDecimal::ZERO
62
+ else
63
+ @recurring_price = java.math.BigDecimal.new(@recurring_price.to_s)
64
+ end
65
+ self
66
+ end
67
+
68
+ def to_ruby(j_obj)
69
+ # conversion for phase_name [type = java.lang.String]
70
+ @phase_name = j_obj.phase_name
71
+
72
+ # conversion for plan_phase_specifier [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
73
+ @plan_phase_specifier = j_obj.plan_phase_specifier
74
+ @plan_phase_specifier = Killbill::Plugin::Model::PlanPhaseSpecifier.new.to_ruby(@plan_phase_specifier) unless @plan_phase_specifier.nil?
75
+
76
+ # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
77
+ @currency = j_obj.currency
78
+ @currency = @currency.to_s.to_sym unless @currency.nil?
79
+
80
+ # conversion for fixed_price [type = java.math.BigDecimal]
81
+ @fixed_price = j_obj.fixed_price
82
+ @fixed_price = @fixed_price.nil? ? 0 : BigDecimal.new(@fixed_price.to_s)
83
+
84
+ # conversion for recurring_price [type = java.math.BigDecimal]
85
+ @recurring_price = j_obj.recurring_price
86
+ @recurring_price = @recurring_price.nil? ? 0 : BigDecimal.new(@recurring_price.to_s)
87
+ self
88
+ end
89
+
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,77 @@
1
+ #############################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 Groupon, Inc. #
5
+ # Copyright 2014 The Billing Project, LLC #
6
+ # #
7
+ # The Billing Project licenses this file to you under the Apache License, version 2.0 #
8
+ # (the "License"); you may not use this file except in compliance with the #
9
+ # License. You may obtain a copy of the License at: #
10
+ # #
11
+ # http://www.apache.org/licenses/LICENSE-2.0 #
12
+ # #
13
+ # Unless required by applicable law or agreed to in writing, software #
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
16
+ # License for the specific language governing permissions and limitations #
17
+ # under the License. #
18
+ # #
19
+ #############################################################################################
20
+
21
+
22
+ #
23
+ # DO NOT EDIT!!!
24
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
25
+ #
26
+
27
+
28
+ module Killbill
29
+ module Plugin
30
+ module Model
31
+
32
+ java_package 'org.killbill.billing.catalog.api'
33
+ class PlanPhasePriceOverridesWithCallContext
34
+
35
+ include org.killbill.billing.catalog.api.PlanPhasePriceOverridesWithCallContext
36
+
37
+ attr_accessor :overrides, :call_context
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for overrides [type = java.util.List]
44
+ tmp = java.util.ArrayList.new
45
+ (@overrides || []).each do |m|
46
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
47
+ m = m.to_java unless m.nil?
48
+ tmp.add(m)
49
+ end
50
+ @overrides = tmp
51
+
52
+ # conversion for call_context [type = org.killbill.billing.util.callcontext.CallContext]
53
+ @call_context = @call_context.to_java unless @call_context.nil?
54
+ self
55
+ end
56
+
57
+ def to_ruby(j_obj)
58
+ # conversion for overrides [type = java.util.List]
59
+ @overrides = j_obj.overrides
60
+ tmp = []
61
+ (@overrides || []).each do |m|
62
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
63
+ m = Killbill::Plugin::Model::PlanPhasePriceOverride.new.to_ruby(m) unless m.nil?
64
+ tmp << m
65
+ end
66
+ @overrides = tmp
67
+
68
+ # conversion for call_context [type = org.killbill.billing.util.callcontext.CallContext]
69
+ @call_context = j_obj.call_context
70
+ @call_context = Killbill::Plugin::Model::CallContext.new.to_ruby(@call_context) unless @call_context.nil?
71
+ self
72
+ end
73
+
74
+ end
75
+ end
76
+ end
77
+ end
@@ -42,16 +42,16 @@ module Killbill
42
42
  @product_name = @product_name.to_s unless @product_name.nil?
43
43
 
44
44
  # conversion for product_category [type = org.killbill.billing.catalog.api.ProductCategory]
45
- @product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of("#{@product_category.to_s}") unless @product_category.nil?
45
+ @product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @product_category.to_s ) unless @product_category.nil?
46
46
 
47
47
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
48
- @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
48
+ @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @billing_period.to_s ) unless @billing_period.nil?
49
49
 
50
50
  # conversion for price_list_name [type = java.lang.String]
51
51
  @price_list_name = @price_list_name.to_s unless @price_list_name.nil?
52
52
 
53
53
  # conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
54
- @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
54
+ @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of( @phase_type.to_s ) unless @phase_type.nil?
55
55
  Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier.new(@product_name, @product_category, @billing_period, @price_list_name, @phase_type)
56
56
  end
57
57
 
@@ -42,10 +42,10 @@ module Killbill
42
42
  @product_name = @product_name.to_s unless @product_name.nil?
43
43
 
44
44
  # conversion for product_category [type = org.killbill.billing.catalog.api.ProductCategory]
45
- @product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of("#{@product_category.to_s}") unless @product_category.nil?
45
+ @product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @product_category.to_s ) unless @product_category.nil?
46
46
 
47
47
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
48
- @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
48
+ @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @billing_period.to_s ) unless @billing_period.nil?
49
49
 
50
50
  # conversion for price_list_name [type = java.lang.String]
51
51
  @price_list_name = @price_list_name.to_s unless @price_list_name.nil?
@@ -41,7 +41,7 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
44
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
44
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
45
45
 
46
46
  # conversion for value [type = java.math.BigDecimal]
47
47
  if @value.nil?
@@ -65,7 +65,7 @@ module Killbill
65
65
  @included = tmp.toArray
66
66
 
67
67
  # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory]
68
- @category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of("#{@category.to_s}") unless @category.nil?
68
+ @category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @category.to_s ) unless @category.nil?
69
69
 
70
70
  # conversion for catalog_name [type = java.lang.String]
71
71
  @catalog_name = @catalog_name.to_s unless @catalog_name.nil?
@@ -41,10 +41,10 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for base_currency [type = org.killbill.billing.catalog.api.Currency]
44
- @base_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@base_currency.to_s}") unless @base_currency.nil?
44
+ @base_currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @base_currency.to_s ) unless @base_currency.nil?
45
45
 
46
46
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
47
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
47
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
48
48
 
49
49
  # conversion for value [type = java.math.BigDecimal]
50
50
  if @value.nil?
@@ -46,7 +46,7 @@ module Killbill
46
46
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
47
47
 
48
48
  # conversion for objectType [type = org.killbill.billing.ObjectType]
49
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
49
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
50
50
 
51
51
  # conversion for tenantContext [type = org.killbill.billing.util.callcontext.TenantContext]
52
52
  tenantContext = tenantContext.to_java unless tenantContext.nil?
@@ -41,7 +41,7 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
44
- @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
44
+ @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @billing_period.to_s ) unless @billing_period.nil?
45
45
 
46
46
  # conversion for recurring_price [type = org.killbill.billing.catalog.api.InternationalPrice]
47
47
  @recurring_price = @recurring_price.to_java unless @recurring_price.nil?
@@ -69,7 +69,7 @@ module Killbill
69
69
  end
70
70
 
71
71
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
72
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
72
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
73
73
 
74
74
  # conversion for effective_date [type = org.joda.time.DateTime]
75
75
  if !@effective_date.nil?
@@ -78,7 +78,7 @@ module Killbill
78
78
  end
79
79
 
80
80
  # conversion for refund_status [type = org.killbill.billing.payment.api.RefundStatus]
81
- @refund_status = Java::org.killbill.billing.payment.api.RefundStatus.value_of("#{@refund_status.to_s}") unless @refund_status.nil?
81
+ @refund_status = Java::org.killbill.billing.payment.api.RefundStatus.value_of( @refund_status.to_s ) unless @refund_status.nil?
82
82
 
83
83
  # conversion for refund_info_plugin [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
84
84
  @refund_info_plugin = @refund_info_plugin.to_java unless @refund_info_plugin.nil?
@@ -48,6 +48,8 @@ require 'killbill/gen/api/migration_plan'
48
48
  require 'killbill/gen/api/plan'
49
49
  require 'killbill/gen/api/plan_change_result'
50
50
  require 'killbill/gen/api/plan_phase'
51
+ require 'killbill/gen/api/plan_phase_price_override'
52
+ require 'killbill/gen/api/plan_phase_price_overrides_with_call_context'
51
53
  require 'killbill/gen/api/plan_phase_specifier'
52
54
  require 'killbill/gen/api/plan_specifier'
53
55
  require 'killbill/gen/api/price'
@@ -44,7 +44,7 @@ module Killbill
44
44
  @catalog_name = @catalog_name.to_s unless @catalog_name.nil?
45
45
 
46
46
  # conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
47
- @recurring_billing_mode = Java::org.killbill.billing.catalog.api.BillingMode.value_of("#{@recurring_billing_mode.to_s}") unless @recurring_billing_mode.nil?
47
+ @recurring_billing_mode = Java::org.killbill.billing.catalog.api.BillingMode.value_of( @recurring_billing_mode.to_s ) unless @recurring_billing_mode.nil?
48
48
 
49
49
  # conversion for effective_date [type = java.util.Date]
50
50
  if !@effective_date.nil?
@@ -57,7 +57,7 @@ module Killbill
57
57
  tmp = java.util.ArrayList.new
58
58
  (@current_supported_currencies || []).each do |m|
59
59
  # conversion for m [type = org.killbill.billing.catalog.api.Currency]
60
- m = Java::org.killbill.billing.catalog.api.Currency.value_of("#{m.to_s}") unless m.nil?
60
+ m = Java::org.killbill.billing.catalog.api.Currency.value_of( m.to_s ) unless m.nil?
61
61
  tmp.add(m)
62
62
  end
63
63
  @current_supported_currencies = tmp.toArray
@@ -53,10 +53,10 @@ module Killbill
53
53
  @external_key = @external_key.to_s unless @external_key.nil?
54
54
 
55
55
  # conversion for state [type = org.killbill.billing.entitlement.api.EntitlementState]
56
- @state = Java::org.killbill.billing.entitlement.api.EntitlementState.value_of("#{@state.to_s}") unless @state.nil?
56
+ @state = Java::org.killbill.billing.entitlement.api.EntitlementState.value_of( @state.to_s ) unless @state.nil?
57
57
 
58
58
  # conversion for source_type [type = org.killbill.billing.entitlement.api.EntitlementSourceType]
59
- @source_type = Java::org.killbill.billing.entitlement.api.EntitlementSourceType.value_of("#{@source_type.to_s}") unless @source_type.nil?
59
+ @source_type = Java::org.killbill.billing.entitlement.api.EntitlementSourceType.value_of( @source_type.to_s ) unless @source_type.nil?
60
60
 
61
61
  # conversion for effective_start_date [type = org.joda.time.LocalDate]
62
62
  if !@effective_start_date.nil?
@@ -81,7 +81,7 @@ module Killbill
81
81
  @last_active_price_list = @last_active_price_list.to_java unless @last_active_price_list.nil?
82
82
 
83
83
  # conversion for last_active_product_category [type = org.killbill.billing.catalog.api.ProductCategory]
84
- @last_active_product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of("#{@last_active_product_category.to_s}") unless @last_active_product_category.nil?
84
+ @last_active_product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @last_active_product_category.to_s ) unless @last_active_product_category.nil?
85
85
 
86
86
  # conversion for id [type = java.util.UUID]
87
87
  @id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
@@ -57,7 +57,7 @@ module Killbill
57
57
  end
58
58
 
59
59
  # conversion for subscription_event_type [type = org.killbill.billing.entitlement.api.SubscriptionEventType]
60
- @subscription_event_type = Java::org.killbill.billing.entitlement.api.SubscriptionEventType.value_of("#{@subscription_event_type.to_s}") unless @subscription_event_type.nil?
60
+ @subscription_event_type = Java::org.killbill.billing.entitlement.api.SubscriptionEventType.value_of( @subscription_event_type.to_s ) unless @subscription_event_type.nil?
61
61
 
62
62
  # conversion for is_blocked_billing [type = boolean]
63
63
  @is_blocked_billing = @is_blocked_billing.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_blocked_billing)
@@ -84,7 +84,7 @@ module Killbill
84
84
  @prev_price_list = @prev_price_list.to_java unless @prev_price_list.nil?
85
85
 
86
86
  # conversion for prev_billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
87
- @prev_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@prev_billing_period.to_s}") unless @prev_billing_period.nil?
87
+ @prev_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @prev_billing_period.to_s ) unless @prev_billing_period.nil?
88
88
 
89
89
  # conversion for next_product [type = org.killbill.billing.catalog.api.Product]
90
90
  @next_product = @next_product.to_java unless @next_product.nil?
@@ -99,7 +99,7 @@ module Killbill
99
99
  @next_price_list = @next_price_list.to_java unless @next_price_list.nil?
100
100
 
101
101
  # conversion for next_billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
102
- @next_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@next_billing_period.to_s}") unless @next_billing_period.nil?
102
+ @next_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @next_billing_period.to_s ) unless @next_billing_period.nil?
103
103
  self
104
104
  end
105
105
 
@@ -59,7 +59,7 @@ module Killbill
59
59
  @tag_definition_id = java.util.UUID.fromString(@tag_definition_id.to_s) unless @tag_definition_id.nil?
60
60
 
61
61
  # conversion for object_type [type = org.killbill.billing.ObjectType]
62
- @object_type = Java::org.killbill.billing.ObjectType.value_of("#{@object_type.to_s}") unless @object_type.nil?
62
+ @object_type = Java::org.killbill.billing.ObjectType.value_of( @object_type.to_s ) unless @object_type.nil?
63
63
 
64
64
  # conversion for object_id [type = java.util.UUID]
65
65
  @object_id = java.util.UUID.fromString(@object_id.to_s) unless @object_id.nil?
@@ -68,7 +68,7 @@ module Killbill
68
68
  tmp = java.util.ArrayList.new
69
69
  (@applicable_object_types || []).each do |m|
70
70
  # conversion for m [type = org.killbill.billing.ObjectType]
71
- m = Java::org.killbill.billing.ObjectType.value_of("#{m.to_s}") unless m.nil?
71
+ m = Java::org.killbill.billing.ObjectType.value_of( m.to_s ) unless m.nil?
72
72
  tmp.add(m)
73
73
  end
74
74
  @applicable_object_types = tmp
@@ -131,7 +131,7 @@ module Killbill
131
131
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
132
132
 
133
133
  # conversion for objectType [type = org.killbill.billing.ObjectType]
134
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
134
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
135
135
 
136
136
  # conversion for tagDefinitionIds [type = java.util.Collection]
137
137
  tmp = java.util.ArrayList.new
@@ -154,7 +154,7 @@ module Killbill
154
154
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
155
155
 
156
156
  # conversion for objectType [type = org.killbill.billing.ObjectType]
157
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
157
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
158
158
 
159
159
  # conversion for tagDefinitionId [type = java.util.UUID]
160
160
  tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
@@ -171,7 +171,7 @@ module Killbill
171
171
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
172
172
 
173
173
  # conversion for objectType [type = org.killbill.billing.ObjectType]
174
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
174
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
175
175
 
176
176
  # conversion for tagDefinitions [type = java.util.Collection]
177
177
  tmp = java.util.ArrayList.new
@@ -194,7 +194,7 @@ module Killbill
194
194
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
195
195
 
196
196
  # conversion for objectType [type = org.killbill.billing.ObjectType]
197
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
197
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
198
198
 
199
199
  # conversion for tagDefinitionId [type = java.util.UUID]
200
200
  tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
@@ -248,7 +248,7 @@ module Killbill
248
248
  objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
249
249
 
250
250
  # conversion for objectType [type = org.killbill.billing.ObjectType]
251
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
251
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
252
252
 
253
253
  # conversion for includedDeleted [type = boolean]
254
254
  includedDeleted = includedDeleted.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(includedDeleted)
@@ -274,7 +274,7 @@ module Killbill
274
274
  accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
275
275
 
276
276
  # conversion for objectType [type = org.killbill.billing.ObjectType]
277
- objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
277
+ objectType = Java::org.killbill.billing.ObjectType.value_of( objectType.to_s ) unless objectType.nil?
278
278
 
279
279
  # conversion for includedDeleted [type = boolean]
280
280
  includedDeleted = includedDeleted.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(includedDeleted)