killbill 8.2.0 → 8.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -0
  3. data/Gemfile.lock +8 -6
  4. data/Jarfile +10 -10
  5. data/Jarfile.lock +23 -23
  6. data/NEWS +7 -0
  7. data/README.md +10 -15
  8. data/generators/active_merchant/templates/spec/spec_helper.rb +9 -5
  9. data/killbill.gemspec +1 -0
  10. data/lib/killbill/gen/api/account.rb +7 -1
  11. data/lib/killbill/gen/api/account_data.rb +7 -1
  12. data/lib/killbill/gen/api/base_entitlement_with_add_ons_specifier.rb +117 -0
  13. data/lib/killbill/gen/api/catalog_user_api.rb +14 -0
  14. data/lib/killbill/gen/api/entitlement_api.rb +15 -25
  15. data/lib/killbill/gen/api/mutable_account_data.rb +7 -1
  16. data/lib/killbill/gen/api/mutable_static_catalog.rb +10 -10
  17. data/lib/killbill/gen/api/payment_api.rb +44 -0
  18. data/lib/killbill/gen/api/price_list.rb +5 -5
  19. data/lib/killbill/gen/api/product.rb +11 -11
  20. data/lib/killbill/gen/api/require_gen.rb +1 -0
  21. data/lib/killbill/gen/api/simple_plan_descriptor.rb +28 -3
  22. data/lib/killbill/gen/api/static_catalog.rb +10 -10
  23. data/lib/killbill/gen/api/tenant_user_api.rb +32 -0
  24. data/lib/killbill/gen/plugin-api/payment_metadata.rb +102 -0
  25. data/lib/killbill/gen/plugin-api/require_gen.rb +3 -7
  26. data/lib/killbill/gen/plugin-api/subscription_metadata.rb +56 -0
  27. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +0 -1
  28. data/lib/killbill/helpers/active_merchant/payment_plugin.rb +6 -1
  29. data/lib/killbill/migration.rb +13 -2
  30. data/lib/killbill/version.rb +1 -1
  31. data/spec/killbill/helpers/payment_method_spec.rb +8 -8
  32. data/spec/killbill/helpers/payment_plugin_spec.rb +13 -0
  33. data/spec/killbill/helpers/response_spec.rb +4 -4
  34. data/spec/killbill/killbill_integration_spec.rb +3 -1
  35. data/spec/spec_helper.rb +1 -1
  36. metadata +19 -2
@@ -86,6 +86,20 @@ module Killbill
86
86
  @real_java_api.upload_catalog(catalogXML, context)
87
87
  end
88
88
 
89
+ java_signature 'Java::void createDefaultEmptyCatalog(Java::org.joda.time.DateTime, Java::org.killbill.billing.util.callcontext.CallContext)'
90
+ def create_default_empty_catalog(effectiveDate, callContext)
91
+
92
+ # conversion for effectiveDate [type = org.joda.time.DateTime]
93
+ if !effectiveDate.nil?
94
+ effectiveDate = (effectiveDate.kind_of? Time) ? DateTime.parse(effectiveDate.to_s) : effectiveDate
95
+ effectiveDate = Java::org.joda.time.DateTime.new(effectiveDate.to_s, Java::org.joda.time.DateTimeZone::UTC)
96
+ end
97
+
98
+ # conversion for callContext [type = org.killbill.billing.util.callcontext.CallContext]
99
+ callContext = callContext.to_java unless callContext.nil?
100
+ @real_java_api.create_default_empty_catalog(effectiveDate, callContext)
101
+ end
102
+
89
103
  java_signature 'Java::void addSimplePlan(Java::org.killbill.billing.catalog.api.SimplePlanDescriptor, Java::org.joda.time.DateTime, Java::org.killbill.billing.util.callcontext.CallContext)'
90
104
  def add_simple_plan(planDescriptor, requestedDate, context)
91
105
 
@@ -94,36 +94,20 @@ module Killbill
94
94
  end
95
95
  end
96
96
 
97
- java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement createBaseEntitlementWithAddOns(Java::java.util.UUID, Java::java.lang.String, Java::java.lang.Iterable, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
98
- def create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
97
+ java_signature 'Java::java.util.List createBaseEntitlementsWithAddOns(Java::java.util.UUID, Java::java.lang.Iterable, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
98
+ def create_base_entitlements_with_add_ons(accountId, baseEntitlementWithAddOnsSpecifier, properties, context)
99
99
 
100
100
  # conversion for accountId [type = java.util.UUID]
101
101
  accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
102
102
 
103
- # conversion for externalKey [type = java.lang.String]
104
- externalKey = externalKey.to_s unless externalKey.nil?
105
-
106
- # conversion for entitlementSpecifier [type = java.lang.Iterable]
103
+ # conversion for baseEntitlementWithAddOnsSpecifier [type = java.lang.Iterable]
107
104
  tmp = java.util.ArrayList.new
108
- (entitlementSpecifier || []).each do |m|
109
- # conversion for m [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
105
+ (baseEntitlementWithAddOnsSpecifier || []).each do |m|
106
+ # conversion for m [type = org.killbill.billing.entitlement.api.BaseEntitlementWithAddOnsSpecifier]
110
107
  m = m.to_java unless m.nil?
111
108
  tmp.add(m)
112
109
  end
113
- entitlementSpecifier = tmp
114
-
115
- # conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
116
- if !entitlementEffectiveDate.nil?
117
- entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
118
- end
119
-
120
- # conversion for billingEffectiveDate [type = org.joda.time.LocalDate]
121
- if !billingEffectiveDate.nil?
122
- billingEffectiveDate = Java::org.joda.time.LocalDate.parse(billingEffectiveDate.to_s)
123
- end
124
-
125
- # conversion for isMigrated [type = boolean]
126
- isMigrated = isMigrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isMigrated)
110
+ baseEntitlementWithAddOnsSpecifier = tmp
127
111
 
128
112
  # conversion for properties [type = java.lang.Iterable]
129
113
  tmp = java.util.ArrayList.new
@@ -137,9 +121,15 @@ module Killbill
137
121
  # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
138
122
  context = context.to_java unless context.nil?
139
123
  begin
140
- res = @real_java_api.create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
141
- # conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
142
- res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
124
+ res = @real_java_api.create_base_entitlements_with_add_ons(accountId, baseEntitlementWithAddOnsSpecifier, properties, context)
125
+ # conversion for res [type = java.util.List]
126
+ tmp = []
127
+ (res || []).each do |m|
128
+ # conversion for m [type = org.killbill.billing.entitlement.api.Entitlement]
129
+ m = Killbill::Plugin::Model::Entitlement.new.to_ruby(m) unless m.nil?
130
+ tmp << m
131
+ end
132
+ res = tmp
143
133
  return res
144
134
  rescue Java::org.killbill.billing.entitlement.api.EntitlementApiException => e
145
135
  raise Killbill::Plugin::Model::EntitlementApiException.new.to_ruby(e)
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.account.api.MutableAccountData
36
36
 
37
- attr_accessor :external_key, :name, :first_name_length, :email, :bill_cycle_day_local, :currency, :payment_method_id, :time_zone, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices, :parent_account_id, :is_payment_delegated_to_parent
37
+ attr_accessor :external_key, :name, :first_name_length, :email, :bill_cycle_day_local, :currency, :payment_method_id, :time_zone, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices, :parent_account_id, :is_payment_delegated_to_parent, :notes
38
38
 
39
39
  def initialize()
40
40
  end
@@ -104,6 +104,9 @@ module Killbill
104
104
 
105
105
  # conversion for is_payment_delegated_to_parent [type = java.lang.Boolean]
106
106
  @is_payment_delegated_to_parent = @is_payment_delegated_to_parent.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_payment_delegated_to_parent)
107
+
108
+ # conversion for notes [type = java.lang.String]
109
+ @notes = @notes.to_s unless @notes.nil?
107
110
  self
108
111
  end
109
112
 
@@ -194,6 +197,9 @@ module Killbill
194
197
  tmp_bool = (@is_payment_delegated_to_parent.java_kind_of? java.lang.Boolean) ? @is_payment_delegated_to_parent.boolean_value : @is_payment_delegated_to_parent
195
198
  @is_payment_delegated_to_parent = tmp_bool ? true : false
196
199
  end
200
+
201
+ # conversion for notes [type = java.lang.String]
202
+ @notes = j_obj.notes
197
203
  self
198
204
  end
199
205
 
@@ -62,14 +62,14 @@ module Killbill
62
62
  end
63
63
  @current_supported_currencies = tmp.to_java Java::org.killbill.billing.catalog.api.Currency
64
64
 
65
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
66
- tmp = []
65
+ # conversion for current_products [type = java.util.Collection]
66
+ tmp = java.util.ArrayList.new
67
67
  (@current_products || []).each do |m|
68
68
  # conversion for m [type = org.killbill.billing.catalog.api.Product]
69
69
  m = m.to_java unless m.nil?
70
- tmp << m
70
+ tmp.add(m)
71
71
  end
72
- @current_products = tmp.to_java Java::org.killbill.billing.catalog.api.Product
72
+ @current_products = tmp
73
73
 
74
74
  # conversion for current_units [type = org.killbill.billing.catalog.api.Unit[]]
75
75
  tmp = []
@@ -80,14 +80,14 @@ module Killbill
80
80
  end
81
81
  @current_units = tmp.to_java Java::org.killbill.billing.catalog.api.Unit
82
82
 
83
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
84
- tmp = []
83
+ # conversion for current_plans [type = java.util.Collection]
84
+ tmp = java.util.ArrayList.new
85
85
  (@current_plans || []).each do |m|
86
86
  # conversion for m [type = org.killbill.billing.catalog.api.Plan]
87
87
  m = m.to_java unless m.nil?
88
- tmp << m
88
+ tmp.add(m)
89
89
  end
90
- @current_plans = tmp.to_java Java::org.killbill.billing.catalog.api.Plan
90
+ @current_plans = tmp
91
91
 
92
92
  # conversion for available_base_plan_listings [type = java.util.List]
93
93
  tmp = java.util.ArrayList.new
@@ -127,7 +127,7 @@ module Killbill
127
127
  end
128
128
  @current_supported_currencies = tmp
129
129
 
130
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
130
+ # conversion for current_products [type = java.util.Collection]
131
131
  @current_products = j_obj.current_products
132
132
  tmp = []
133
133
  (@current_products || []).each do |m|
@@ -147,7 +147,7 @@ module Killbill
147
147
  end
148
148
  @current_units = tmp
149
149
 
150
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
150
+ # conversion for current_plans [type = java.util.Collection]
151
151
  @current_plans = j_obj.current_plans
152
152
  tmp = []
153
153
  (@current_plans || []).each do |m|
@@ -589,6 +589,17 @@ module Killbill
589
589
  end
590
590
  end
591
591
 
592
+ java_signature 'Java::void cancelScheduledPaymentTransaction(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
593
+ def cancel_scheduled_payment_transaction(paymentTransactionExternalKey, context)
594
+
595
+ # conversion for paymentTransactionExternalKey [type = java.lang.String]
596
+ paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
597
+
598
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
599
+ context = context.to_java unless context.nil?
600
+ @real_java_api.cancel_scheduled_payment_transaction(paymentTransactionExternalKey, context)
601
+ end
602
+
592
603
  java_signature 'Java::org.killbill.billing.payment.api.Payment createChargeback(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
593
604
  def create_chargeback(account, paymentId, amount, currency, paymentTransactionExternalKey, context)
594
605
 
@@ -867,6 +878,39 @@ module Killbill
867
878
  end
868
879
  end
869
880
 
881
+ java_signature 'Java::org.killbill.billing.payment.api.Payment getPaymentByTransactionId(Java::java.util.UUID, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
882
+ def get_payment_by_transaction_id(transactionId, withPluginInfo, withAttempts, properties, context)
883
+
884
+ # conversion for transactionId [type = java.util.UUID]
885
+ transactionId = java.util.UUID.fromString(transactionId.to_s) unless transactionId.nil?
886
+
887
+ # conversion for withPluginInfo [type = boolean]
888
+ withPluginInfo = withPluginInfo.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withPluginInfo)
889
+
890
+ # conversion for withAttempts [type = boolean]
891
+ withAttempts = withAttempts.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(withAttempts)
892
+
893
+ # conversion for properties [type = java.lang.Iterable]
894
+ tmp = java.util.ArrayList.new
895
+ (properties || []).each do |m|
896
+ # conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
897
+ m = m.to_java unless m.nil?
898
+ tmp.add(m)
899
+ end
900
+ properties = tmp
901
+
902
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
903
+ context = context.to_java unless context.nil?
904
+ begin
905
+ res = @real_java_api.get_payment_by_transaction_id(transactionId, withPluginInfo, withAttempts, properties, context)
906
+ # conversion for res [type = org.killbill.billing.payment.api.Payment]
907
+ res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
908
+ return res
909
+ rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
910
+ raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
911
+ end
912
+ end
913
+
870
914
  java_signature 'Java::org.killbill.billing.util.entity.Pagination getPayments(Java::java.lang.Long, Java::java.lang.Long, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.TenantContext)'
871
915
  def get_payments(offset, limit, withPluginInfo, withAttempts, properties, context)
872
916
 
@@ -43,14 +43,14 @@ module Killbill
43
43
  # conversion for name [type = java.lang.String]
44
44
  @name = @name.to_s unless @name.nil?
45
45
 
46
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan[]]
47
- tmp = []
46
+ # conversion for plans [type = java.util.Collection]
47
+ tmp = java.util.ArrayList.new
48
48
  (@plans || []).each do |m|
49
49
  # conversion for m [type = org.killbill.billing.catalog.api.Plan]
50
50
  m = m.to_java unless m.nil?
51
- tmp << m
51
+ tmp.add(m)
52
52
  end
53
- @plans = tmp.to_java Java::org.killbill.billing.catalog.api.Plan
53
+ @plans = tmp
54
54
  self
55
55
  end
56
56
 
@@ -58,7 +58,7 @@ module Killbill
58
58
  # conversion for name [type = java.lang.String]
59
59
  @name = j_obj.name
60
60
 
61
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan[]]
61
+ # conversion for plans [type = java.util.Collection]
62
62
  @plans = j_obj.plans
63
63
  tmp = []
64
64
  (@plans || []).each do |m|
@@ -43,23 +43,23 @@ module Killbill
43
43
  # conversion for name [type = java.lang.String]
44
44
  @name = @name.to_s unless @name.nil?
45
45
 
46
- # conversion for available [type = org.killbill.billing.catalog.api.Product[]]
47
- tmp = []
46
+ # conversion for available [type = java.util.Collection]
47
+ tmp = java.util.ArrayList.new
48
48
  (@available || []).each do |m|
49
49
  # conversion for m [type = org.killbill.billing.catalog.api.Product]
50
50
  m = m.to_java unless m.nil?
51
- tmp << m
51
+ tmp.add(m)
52
52
  end
53
- @available = tmp.to_java Java::org.killbill.billing.catalog.api.Product
53
+ @available = tmp
54
54
 
55
- # conversion for included [type = org.killbill.billing.catalog.api.Product[]]
56
- tmp = []
55
+ # conversion for included [type = java.util.Collection]
56
+ tmp = java.util.ArrayList.new
57
57
  (@included || []).each do |m|
58
58
  # conversion for m [type = org.killbill.billing.catalog.api.Product]
59
59
  m = m.to_java unless m.nil?
60
- tmp << m
60
+ tmp.add(m)
61
61
  end
62
- @included = tmp.to_java Java::org.killbill.billing.catalog.api.Product
62
+ @included = tmp
63
63
 
64
64
  # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory]
65
65
  @category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @category.to_s ) unless @category.nil?
@@ -82,7 +82,7 @@ module Killbill
82
82
  # conversion for name [type = java.lang.String]
83
83
  @name = j_obj.name
84
84
 
85
- # conversion for available [type = org.killbill.billing.catalog.api.Product[]]
85
+ # conversion for available [type = java.util.Collection]
86
86
  @available = j_obj.available
87
87
  tmp = []
88
88
  (@available || []).each do |m|
@@ -92,8 +92,8 @@ module Killbill
92
92
  end
93
93
  @available = tmp
94
94
 
95
- # conversion for included [type = org.killbill.billing.catalog.api.Product[]]
96
- @included = j_obj.get_included
95
+ # conversion for included [type = java.util.Collection]
96
+ @included = j_obj.included
97
97
  tmp = []
98
98
  (@included || []).each do |m|
99
99
  # conversion for m [type = org.killbill.billing.catalog.api.Product]
@@ -81,6 +81,7 @@ require 'killbill/gen/api/currency_conversion'
81
81
  require 'killbill/gen/api/currency_conversion_api'
82
82
  require 'killbill/gen/api/currency_conversion_exception'
83
83
  require 'killbill/gen/api/rate'
84
+ require 'killbill/gen/api/base_entitlement_with_add_ons_specifier'
84
85
  require 'killbill/gen/api/blockable'
85
86
  require 'killbill/gen/api/blocking_api_exception'
86
87
  require 'killbill/gen/api/blocking_state'
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.SimplePlanDescriptor
36
36
 
37
- attr_accessor :plan_id, :product_name, :currency, :amount, :billing_period, :trial_length, :trial_time_unit
37
+ attr_accessor :plan_id, :product_name, :product_category, :available_base_products, :currency, :amount, :billing_period, :trial_length, :trial_time_unit
38
38
 
39
39
  def initialize()
40
40
  end
@@ -46,6 +46,18 @@ module Killbill
46
46
  # conversion for product_name [type = java.lang.String]
47
47
  @product_name = @product_name.to_s unless @product_name.nil?
48
48
 
49
+ # conversion for product_category [type = org.killbill.billing.catalog.api.ProductCategory]
50
+ @product_category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of( @product_category.to_s ) unless @product_category.nil?
51
+
52
+ # conversion for available_base_products [type = java.util.List]
53
+ tmp = java.util.ArrayList.new
54
+ (@available_base_products || []).each do |m|
55
+ # conversion for m [type = java.lang.String]
56
+ m = m.to_s unless m.nil?
57
+ tmp.add(m)
58
+ end
59
+ @available_base_products = tmp
60
+
49
61
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
50
62
  @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil?
51
63
 
@@ -59,7 +71,7 @@ module Killbill
59
71
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
60
72
  @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of( @billing_period.to_s ) unless @billing_period.nil?
61
73
 
62
- # conversion for trial_length [type = int]
74
+ # conversion for trial_length [type = java.lang.Integer]
63
75
  @trial_length = @trial_length
64
76
 
65
77
  # conversion for trial_time_unit [type = org.killbill.billing.catalog.api.TimeUnit]
@@ -74,6 +86,19 @@ module Killbill
74
86
  # conversion for product_name [type = java.lang.String]
75
87
  @product_name = j_obj.product_name
76
88
 
89
+ # conversion for product_category [type = org.killbill.billing.catalog.api.ProductCategory]
90
+ @product_category = j_obj.product_category
91
+ @product_category = @product_category.to_s.to_sym unless @product_category.nil?
92
+
93
+ # conversion for available_base_products [type = java.util.List]
94
+ @available_base_products = j_obj.available_base_products
95
+ tmp = []
96
+ (@available_base_products || []).each do |m|
97
+ # conversion for m [type = java.lang.String]
98
+ tmp << m
99
+ end
100
+ @available_base_products = tmp
101
+
77
102
  # conversion for currency [type = org.killbill.billing.catalog.api.Currency]
78
103
  @currency = j_obj.currency
79
104
  @currency = @currency.to_s.to_sym unless @currency.nil?
@@ -86,7 +111,7 @@ module Killbill
86
111
  @billing_period = j_obj.billing_period
87
112
  @billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
88
113
 
89
- # conversion for trial_length [type = int]
114
+ # conversion for trial_length [type = java.lang.Integer]
90
115
  @trial_length = j_obj.trial_length
91
116
 
92
117
  # conversion for trial_time_unit [type = org.killbill.billing.catalog.api.TimeUnit]
@@ -62,14 +62,14 @@ module Killbill
62
62
  end
63
63
  @current_supported_currencies = tmp.to_java Java::org.killbill.billing.catalog.api.Currency
64
64
 
65
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
66
- tmp = []
65
+ # conversion for current_products [type = java.util.Collection]
66
+ tmp = java.util.ArrayList.new
67
67
  (@current_products || []).each do |m|
68
68
  # conversion for m [type = org.killbill.billing.catalog.api.Product]
69
69
  m = m.to_java unless m.nil?
70
- tmp << m
70
+ tmp.add(m)
71
71
  end
72
- @current_products = tmp.to_java Java::org.killbill.billing.catalog.api.Product
72
+ @current_products = tmp
73
73
 
74
74
  # conversion for current_units [type = org.killbill.billing.catalog.api.Unit[]]
75
75
  tmp = []
@@ -80,14 +80,14 @@ module Killbill
80
80
  end
81
81
  @current_units = tmp.to_java Java::org.killbill.billing.catalog.api.Unit
82
82
 
83
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
84
- tmp = []
83
+ # conversion for current_plans [type = java.util.Collection]
84
+ tmp = java.util.ArrayList.new
85
85
  (@current_plans || []).each do |m|
86
86
  # conversion for m [type = org.killbill.billing.catalog.api.Plan]
87
87
  m = m.to_java unless m.nil?
88
- tmp << m
88
+ tmp.add(m)
89
89
  end
90
- @current_plans = tmp.to_java Java::org.killbill.billing.catalog.api.Plan
90
+ @current_plans = tmp
91
91
 
92
92
  # conversion for available_base_plan_listings [type = java.util.List]
93
93
  tmp = java.util.ArrayList.new
@@ -127,7 +127,7 @@ module Killbill
127
127
  end
128
128
  @current_supported_currencies = tmp
129
129
 
130
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
130
+ # conversion for current_products [type = java.util.Collection]
131
131
  @current_products = j_obj.current_products
132
132
  tmp = []
133
133
  (@current_products || []).each do |m|
@@ -147,7 +147,7 @@ module Killbill
147
147
  end
148
148
  @current_units = tmp
149
149
 
150
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
150
+ # conversion for current_plans [type = java.util.Collection]
151
151
  @current_plans = j_obj.current_plans
152
152
  tmp = []
153
153
  (@current_plans || []).each do |m|
@@ -110,6 +110,38 @@ module Killbill
110
110
  end
111
111
  end
112
112
 
113
+ java_signature 'Java::java.util.Map searchTenantKeyValues(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
114
+ def search_tenant_key_values(searchKey, context)
115
+
116
+ # conversion for searchKey [type = java.lang.String]
117
+ searchKey = searchKey.to_s unless searchKey.nil?
118
+
119
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
120
+ context = context.to_java unless context.nil?
121
+ begin
122
+ res = @real_java_api.search_tenant_key_values(searchKey, context)
123
+ # conversion for res [type = java.util.Map]
124
+ tmp = {}
125
+ jtmp0 = res || java.util.HashMap.new
126
+ jtmp0.key_set.each do |k|
127
+ # conversion for k [type = java.lang.String]
128
+ v = jtmp0.get(k)
129
+ # conversion for v [type = java.util.List]
130
+ tmp1 = []
131
+ (v || []).each do |m|
132
+ # conversion for m [type = java.lang.String]
133
+ tmp1 << m
134
+ end
135
+ v = tmp1
136
+ tmp[k] = v
137
+ end
138
+ res = tmp
139
+ return res
140
+ rescue Java::org.killbill.billing.tenant.api.TenantApiException => e
141
+ raise Killbill::Plugin::Model::TenantApiException.new.to_ruby(e)
142
+ end
143
+ end
144
+
113
145
  java_signature 'Java::void addTenantKeyValue(Java::java.lang.String, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
114
146
  def add_tenant_key_value(key, value, context)
115
147