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
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.invoice.api.DryRunArguments
36
36
 
37
- attr_accessor :plan_phase_specifier, :action, :subscription_id, :effective_date, :bundle_id, :billing_action_policy
37
+ attr_accessor :plan_phase_specifier, :action, :subscription_id, :effective_date, :bundle_id, :billing_action_policy, :plan_phase_priceoverrides
38
38
 
39
39
  def initialize()
40
40
  end
@@ -44,7 +44,7 @@ module Killbill
44
44
  @plan_phase_specifier = @plan_phase_specifier.to_java unless @plan_phase_specifier.nil?
45
45
 
46
46
  # conversion for action [type = org.killbill.billing.entitlement.api.SubscriptionEventType]
47
- @action = Java::org.killbill.billing.entitlement.api.SubscriptionEventType.value_of("#{@action.to_s}") unless @action.nil?
47
+ @action = Java::org.killbill.billing.entitlement.api.SubscriptionEventType.value_of( @action.to_s ) unless @action.nil?
48
48
 
49
49
  # conversion for subscription_id [type = java.util.UUID]
50
50
  @subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
@@ -59,7 +59,16 @@ module Killbill
59
59
  @bundle_id = java.util.UUID.fromString(@bundle_id.to_s) unless @bundle_id.nil?
60
60
 
61
61
  # conversion for billing_action_policy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
62
- @billing_action_policy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of("#{@billing_action_policy.to_s}") unless @billing_action_policy.nil?
62
+ @billing_action_policy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of( @billing_action_policy.to_s ) unless @billing_action_policy.nil?
63
+
64
+ # conversion for plan_phase_priceoverrides [type = java.util.List]
65
+ tmp = java.util.ArrayList.new
66
+ (@plan_phase_priceoverrides || []).each do |m|
67
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
68
+ m = m.to_java unless m.nil?
69
+ tmp.add(m)
70
+ end
71
+ @plan_phase_priceoverrides = tmp
63
72
  self
64
73
  end
65
74
 
@@ -91,6 +100,16 @@ module Killbill
91
100
  # conversion for billing_action_policy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
92
101
  @billing_action_policy = j_obj.billing_action_policy
93
102
  @billing_action_policy = @billing_action_policy.to_s.to_sym unless @billing_action_policy.nil?
103
+
104
+ # conversion for plan_phase_priceoverrides [type = java.util.List]
105
+ @plan_phase_priceoverrides = j_obj.plan_phase_priceoverrides
106
+ tmp = []
107
+ (@plan_phase_priceoverrides || []).each do |m|
108
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
109
+ m = Killbill::Plugin::Model::PlanPhasePriceOverride.new.to_ruby(m) unless m.nil?
110
+ tmp << m
111
+ end
112
+ @plan_phase_priceoverrides = tmp
94
113
  self
95
114
  end
96
115
 
@@ -41,7 +41,7 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for unit [type = org.killbill.billing.catalog.api.TimeUnit]
44
- @unit = Java::org.killbill.billing.catalog.api.TimeUnit.value_of("#{@unit.to_s}") unless @unit.nil?
44
+ @unit = Java::org.killbill.billing.catalog.api.TimeUnit.value_of( @unit.to_s ) unless @unit.nil?
45
45
 
46
46
  # conversion for number [type = int]
47
47
  @number = @number
@@ -68,10 +68,10 @@ module Killbill
68
68
  @external_key = @external_key.to_s unless @external_key.nil?
69
69
 
70
70
  # conversion for state [type = org.killbill.billing.entitlement.api.EntitlementState]
71
- @state = Java::org.killbill.billing.entitlement.api.EntitlementState.value_of("#{@state.to_s}") unless @state.nil?
71
+ @state = Java::org.killbill.billing.entitlement.api.EntitlementState.value_of( @state.to_s ) unless @state.nil?
72
72
 
73
73
  # conversion for source_type [type = org.killbill.billing.entitlement.api.EntitlementSourceType]
74
- @source_type = Java::org.killbill.billing.entitlement.api.EntitlementSourceType.value_of("#{@source_type.to_s}") unless @source_type.nil?
74
+ @source_type = Java::org.killbill.billing.entitlement.api.EntitlementSourceType.value_of( @source_type.to_s ) unless @source_type.nil?
75
75
 
76
76
  # conversion for effective_start_date [type = org.joda.time.LocalDate]
77
77
  if !@effective_start_date.nil?
@@ -96,7 +96,7 @@ module Killbill
96
96
  @last_active_price_list = @last_active_price_list.to_java unless @last_active_price_list.nil?
97
97
 
98
98
  # conversion for last_active_product_category [type = org.killbill.billing.catalog.api.ProductCategory]
99
- @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?
99
+ @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?
100
100
  self
101
101
  end
102
102
 
@@ -47,16 +47,16 @@ module Killbill
47
47
  @product_name = @product_name.to_s unless @product_name.nil?
48
48
 
49
49
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
50
- @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
50
+ @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @billing_period.to_s ) unless @billing_period.nil?
51
51
 
52
52
  # conversion for price_list [type = java.lang.String]
53
53
  @price_list = @price_list.to_s unless @price_list.nil?
54
54
 
55
55
  # conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
56
- @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
56
+ @phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of( @phase_type.to_s ) unless @phase_type.nil?
57
57
 
58
58
  # conversion for reason [type = org.killbill.billing.entitlement.api.DryRunChangeReason]
59
- @reason = Java::org.killbill.billing.entitlement.api.DryRunChangeReason.value_of("#{@reason.to_s}") unless @reason.nil?
59
+ @reason = Java::org.killbill.billing.entitlement.api.DryRunChangeReason.value_of( @reason.to_s ) unless @reason.nil?
60
60
  self
61
61
  end
62
62
 
@@ -39,8 +39,8 @@ module Killbill
39
39
  end
40
40
 
41
41
 
42
- java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.lang.String, Java::org.joda.time.LocalDate, Java::org.killbill.billing.util.callcontext.CallContext)'
43
- def create_base_entitlement(accountId, spec, externalKey, effectiveDate, context)
42
+ java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.lang.String, Java::java.util.List, Java::org.joda.time.LocalDate, Java::org.killbill.billing.util.callcontext.CallContext)'
43
+ def create_base_entitlement(accountId, spec, externalKey, overrides, effectiveDate, context)
44
44
 
45
45
  # conversion for accountId [type = java.util.UUID]
46
46
  accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
@@ -51,6 +51,15 @@ module Killbill
51
51
  # conversion for externalKey [type = java.lang.String]
52
52
  externalKey = externalKey.to_s unless externalKey.nil?
53
53
 
54
+ # conversion for overrides [type = java.util.List]
55
+ tmp = java.util.ArrayList.new
56
+ (overrides || []).each do |m|
57
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
58
+ m = m.to_java unless m.nil?
59
+ tmp.add(m)
60
+ end
61
+ overrides = tmp
62
+
54
63
  # conversion for effectiveDate [type = org.joda.time.LocalDate]
55
64
  if !effectiveDate.nil?
56
65
  effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
@@ -59,7 +68,7 @@ module Killbill
59
68
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
60
69
  context = context.to_java unless context.nil?
61
70
  begin
62
- res = @real_java_api.create_base_entitlement(accountId, spec, externalKey, effectiveDate, context)
71
+ res = @real_java_api.create_base_entitlement(accountId, spec, externalKey, overrides, effectiveDate, context)
63
72
  # conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
64
73
  res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
65
74
  return res
@@ -68,8 +77,8 @@ module Killbill
68
77
  end
69
78
  end
70
79
 
71
- java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::org.joda.time.LocalDate, Java::org.killbill.billing.util.callcontext.CallContext)'
72
- def add_entitlement(bundleId, spec, effectiveDate, context)
80
+ java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.catalog.api.PlanPhaseSpecifier, Java::java.util.List, Java::org.joda.time.LocalDate, Java::org.killbill.billing.util.callcontext.CallContext)'
81
+ def add_entitlement(bundleId, spec, overrides, effectiveDate, context)
73
82
 
74
83
  # conversion for bundleId [type = java.util.UUID]
75
84
  bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
@@ -77,6 +86,15 @@ module Killbill
77
86
  # conversion for spec [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
78
87
  spec = spec.to_java unless spec.nil?
79
88
 
89
+ # conversion for overrides [type = java.util.List]
90
+ tmp = java.util.ArrayList.new
91
+ (overrides || []).each do |m|
92
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
93
+ m = m.to_java unless m.nil?
94
+ tmp.add(m)
95
+ end
96
+ overrides = tmp
97
+
80
98
  # conversion for effectiveDate [type = org.joda.time.LocalDate]
81
99
  if !effectiveDate.nil?
82
100
  effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
@@ -85,7 +103,7 @@ module Killbill
85
103
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
86
104
  context = context.to_java unless context.nil?
87
105
  begin
88
- res = @real_java_api.add_entitlement(bundleId, spec, effectiveDate, context)
106
+ res = @real_java_api.add_entitlement(bundleId, spec, overrides, effectiveDate, context)
89
107
  # conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
90
108
  res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
91
109
  return res
@@ -298,7 +316,7 @@ module Killbill
298
316
  end
299
317
 
300
318
  # conversion for billingPolicy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
301
- billingPolicy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of("#{billingPolicy.to_s}") unless billingPolicy.nil?
319
+ billingPolicy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of( billingPolicy.to_s ) unless billingPolicy.nil?
302
320
 
303
321
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
304
322
  context = context.to_java unless context.nil?
@@ -41,7 +41,7 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for type [type = org.killbill.billing.catalog.api.FixedType]
44
- @type = Java::org.killbill.billing.catalog.api.FixedType.value_of("#{@type.to_s}") unless @type.nil?
44
+ @type = Java::org.killbill.billing.catalog.api.FixedType.value_of( @type.to_s ) unless @type.nil?
45
45
 
46
46
  # conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice]
47
47
  @price = @price.to_java unless @price.nil?
@@ -96,7 +96,7 @@ module Killbill
96
96
  end
97
97
 
98
98
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
99
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
99
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
100
100
 
101
101
  # conversion for paid_amount [type = java.math.BigDecimal]
102
102
  if @paid_amount.nil?
@@ -81,7 +81,7 @@ module Killbill
81
81
  end
82
82
 
83
83
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
84
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
84
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
85
85
 
86
86
  # conversion for paid_amount [type = java.math.BigDecimal]
87
87
  if @paid_amount.nil?
@@ -156,7 +156,7 @@ module Killbill
156
156
  @formatted_balance = @formatted_balance.to_s unless @formatted_balance.nil?
157
157
 
158
158
  # conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
159
- @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@processed_currency.to_s}") unless @processed_currency.nil?
159
+ @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @processed_currency.to_s ) unless @processed_currency.nil?
160
160
 
161
161
  # conversion for processed_payment_rate [type = java.lang.String]
162
162
  @processed_payment_rate = @processed_payment_rate.to_s unless @processed_payment_rate.nil?
@@ -56,7 +56,7 @@ module Killbill
56
56
  end
57
57
 
58
58
  # conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
59
- @invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of("#{@invoice_item_type.to_s}") unless @invoice_item_type.nil?
59
+ @invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of( @invoice_item_type.to_s ) unless @invoice_item_type.nil?
60
60
 
61
61
  # conversion for invoice_id [type = java.util.UUID]
62
62
  @invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
@@ -82,7 +82,7 @@ module Killbill
82
82
  end
83
83
 
84
84
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
85
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
85
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
86
86
 
87
87
  # conversion for description [type = java.lang.String]
88
88
  @description = @description.to_s unless @description.nil?
@@ -41,7 +41,7 @@ module Killbill
41
41
 
42
42
  def to_java()
43
43
  # conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
44
- @invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of("#{@invoice_item_type.to_s}") unless @invoice_item_type.nil?
44
+ @invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of( @invoice_item_type.to_s ) unless @invoice_item_type.nil?
45
45
 
46
46
  # conversion for invoice_id [type = java.util.UUID]
47
47
  @invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
@@ -67,7 +67,7 @@ module Killbill
67
67
  end
68
68
 
69
69
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
70
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
70
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
71
71
 
72
72
  # conversion for description [type = java.lang.String]
73
73
  @description = @description.to_s unless @description.nil?
@@ -59,7 +59,7 @@ module Killbill
59
59
  @payment_id = java.util.UUID.fromString(@payment_id.to_s) unless @payment_id.nil?
60
60
 
61
61
  # conversion for type [type = org.killbill.billing.invoice.api.InvoicePaymentType]
62
- @type = Java::org.killbill.billing.invoice.api.InvoicePaymentType.value_of("#{@type.to_s}") unless @type.nil?
62
+ @type = Java::org.killbill.billing.invoice.api.InvoicePaymentType.value_of( @type.to_s ) unless @type.nil?
63
63
 
64
64
  # conversion for invoice_id [type = java.util.UUID]
65
65
  @invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
@@ -78,7 +78,7 @@ module Killbill
78
78
  end
79
79
 
80
80
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
81
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
81
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
82
82
 
83
83
  # conversion for linked_invoice_payment_id [type = java.util.UUID]
84
84
  @linked_invoice_payment_id = java.util.UUID.fromString(@linked_invoice_payment_id.to_s) unless @linked_invoice_payment_id.nil?
@@ -87,7 +87,7 @@ module Killbill
87
87
  @payment_cookie_id = @payment_cookie_id.to_s unless @payment_cookie_id.nil?
88
88
 
89
89
  # conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
90
- @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@processed_currency.to_s}") unless @processed_currency.nil?
90
+ @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @processed_currency.to_s ) unless @processed_currency.nil?
91
91
  self
92
92
  end
93
93
 
@@ -344,7 +344,7 @@ module Killbill
344
344
  end
345
345
 
346
346
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
347
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
347
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
348
348
 
349
349
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
350
350
  context = context.to_java unless context.nil?
@@ -380,7 +380,7 @@ module Killbill
380
380
  end
381
381
 
382
382
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
383
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
383
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
384
384
 
385
385
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
386
386
  context = context.to_java unless context.nil?
@@ -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
@@ -56,7 +56,7 @@ module Killbill
56
56
  @bill_cycle_day_local = @bill_cycle_day_local
57
57
 
58
58
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
59
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
59
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
60
60
 
61
61
  # conversion for payment_method_id [type = java.util.UUID]
62
62
  @payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil?
@@ -106,7 +106,7 @@ module Killbill
106
106
  @is_auth_voided = @is_auth_voided.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_auth_voided)
107
107
 
108
108
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
109
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
109
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
110
110
 
111
111
  # conversion for transactions [type = java.util.List]
112
112
  tmp = java.util.ArrayList.new
@@ -59,7 +59,7 @@ module Killbill
59
59
  end
60
60
 
61
61
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
62
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
62
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
63
63
 
64
64
  # conversion for paymentExternalKey [type = java.lang.String]
65
65
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -108,7 +108,7 @@ module Killbill
108
108
  end
109
109
 
110
110
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
111
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
111
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
112
112
 
113
113
  # conversion for paymentExternalKey [type = java.lang.String]
114
114
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -157,7 +157,7 @@ module Killbill
157
157
  end
158
158
 
159
159
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
160
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
160
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
161
161
 
162
162
  # conversion for paymentTransactionExternalKey [type = java.lang.String]
163
163
  paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
@@ -203,7 +203,7 @@ module Killbill
203
203
  end
204
204
 
205
205
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
206
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
206
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
207
207
 
208
208
  # conversion for paymentExternalKey [type = java.lang.String]
209
209
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -252,7 +252,7 @@ module Killbill
252
252
  end
253
253
 
254
254
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
255
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
255
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
256
256
 
257
257
  # conversion for paymentExternalKey [type = java.lang.String]
258
258
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -334,7 +334,7 @@ module Killbill
334
334
  end
335
335
 
336
336
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
337
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
337
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
338
338
 
339
339
  # conversion for paymentTransactionExternalKey [type = java.lang.String]
340
340
  paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
@@ -377,7 +377,7 @@ module Killbill
377
377
  end
378
378
 
379
379
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
380
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
380
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
381
381
 
382
382
  # conversion for paymentTransactionExternalKey [type = java.lang.String]
383
383
  paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
@@ -426,7 +426,7 @@ module Killbill
426
426
  end
427
427
 
428
428
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
429
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
429
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
430
430
 
431
431
  # conversion for paymentExternalKey [type = java.lang.String]
432
432
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -475,7 +475,7 @@ module Killbill
475
475
  end
476
476
 
477
477
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
478
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
478
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
479
479
 
480
480
  # conversion for paymentExternalKey [type = java.lang.String]
481
481
  paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
@@ -524,7 +524,7 @@ module Killbill
524
524
  end
525
525
 
526
526
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
527
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
527
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
528
528
 
529
529
  # conversion for paymentTransactionExternalKey [type = java.lang.String]
530
530
  paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
@@ -558,7 +558,7 @@ module Killbill
558
558
  end
559
559
 
560
560
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
561
- currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
561
+ currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
562
562
 
563
563
  # conversion for paymentTransactionExternalKey [type = java.lang.String]
564
564
  paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
@@ -62,7 +62,7 @@ module Killbill
62
62
  @external_key = @external_key.to_s unless @external_key.nil?
63
63
 
64
64
  # conversion for transaction_type [type = org.killbill.billing.payment.api.TransactionType]
65
- @transaction_type = Java::org.killbill.billing.payment.api.TransactionType.value_of("#{@transaction_type.to_s}") unless @transaction_type.nil?
65
+ @transaction_type = Java::org.killbill.billing.payment.api.TransactionType.value_of( @transaction_type.to_s ) unless @transaction_type.nil?
66
66
 
67
67
  # conversion for effective_date [type = org.joda.time.DateTime]
68
68
  if !@effective_date.nil?
@@ -78,7 +78,7 @@ module Killbill
78
78
  end
79
79
 
80
80
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
81
- @currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
81
+ @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
82
82
 
83
83
  # conversion for processed_amount [type = java.math.BigDecimal]
84
84
  if @processed_amount.nil?
@@ -88,7 +88,7 @@ module Killbill
88
88
  end
89
89
 
90
90
  # conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
91
- @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@processed_currency.to_s}") unless @processed_currency.nil?
91
+ @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @processed_currency.to_s ) unless @processed_currency.nil?
92
92
 
93
93
  # conversion for gateway_error_code [type = java.lang.String]
94
94
  @gateway_error_code = @gateway_error_code.to_s unless @gateway_error_code.nil?
@@ -97,7 +97,7 @@ module Killbill
97
97
  @gateway_error_msg = @gateway_error_msg.to_s unless @gateway_error_msg.nil?
98
98
 
99
99
  # conversion for transaction_status [type = org.killbill.billing.payment.api.TransactionStatus]
100
- @transaction_status = Java::org.killbill.billing.payment.api.TransactionStatus.value_of("#{@transaction_status.to_s}") unless @transaction_status.nil?
100
+ @transaction_status = Java::org.killbill.billing.payment.api.TransactionStatus.value_of( @transaction_status.to_s ) unless @transaction_status.nil?
101
101
 
102
102
  # conversion for payment_info_plugin [type = org.killbill.billing.payment.plugin.api.PaymentTransactionInfoPlugin]
103
103
  @payment_info_plugin = @payment_info_plugin.to_java unless @payment_info_plugin.nil?