killbill 3.2.0 → 3.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 965d63f0683725af63c46999dd4b3bce2ed2bab6
4
- data.tar.gz: 6a722d920223f7123dab21b7f1dbbb2277abbf12
3
+ metadata.gz: 3336dc6cd112f6b516306599a87b91a0e40ad173
4
+ data.tar.gz: 03519858360b4d15c0e31150839e9bf552404428
5
5
  SHA512:
6
- metadata.gz: ad59ce23431fcceb7352641ac951e642bc1cd5d91f501ad0022984f32afc68bf25d6312ce31d0c7fc87c5511a990302c65b60258127b0a481f3ab6ac06856e00
7
- data.tar.gz: 1a670e318c45f7c630a2d8c238aa888e08427c423123c63214397f2ecaaf365e3b4347e25013e4398813df0f73b258952e8c45eef44904c3ab6e601137bcffbd
6
+ metadata.gz: 478800fd4c8c6cdd40e4df01c8f3ed93c5de4280a2a7103d03872f9d7d362152b5847ee2189f7ddb7447102f6fe0d00f535793b7bcb9df33bf1e4a368bfa0981
7
+ data.tar.gz: 8d36533b6e1bcdf452fd9571e8fd6250b3025df5d872939a65b17213ec9df94d8ca1e9d657c1d8cade011de1b1aa14b16614d9f56234ae3cddf9b4579d332241
data/NEWS CHANGED
@@ -1,3 +1,6 @@
1
+ 3.2.1
2
+ Regenerate models
3
+
1
4
  3.2.0
2
5
  ActiveMerchant:
3
6
  - fix openssl require error with the latest version of active_utils
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.0
1
+ 3.2.1
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.rdoc_options << '--exclude' << '.'
24
24
 
25
- s.add_dependency 'killbill', '~> 3.1.11'
25
+ s.add_dependency 'killbill', '~> 3.2.0'
26
26
  s.add_dependency 'activemerchant', '~> 1.44.1'
27
27
  s.add_dependency 'offsite_payments', '~> 2.0.1'
28
28
  s.add_dependency 'activerecord', '~> 4.1.0'
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.util.audit.AccountAuditLogs
36
36
 
37
- attr_accessor :audit_logs_for_account, :audit_logs_for_bundle, :audit_logs_for_subscription, :audit_logs_for_subscription_event, :audit_logs_for_blocking_state, :audit_logs_for_invoice, :audit_logs_for_invoice_item, :audit_logs_for_invoice_payment, :audit_logs_for_payment, :audit_logs_for_payment_transaction, :audit_logs_for_payment_method, :audit_logs_for_tag, :audit_logs_for_custom_field, :audit_logs
37
+ attr_accessor :audit_logs_for_account
38
38
 
39
39
  def initialize()
40
40
  end
@@ -48,117 +48,6 @@ module Killbill
48
48
  tmp.add(m)
49
49
  end
50
50
  @audit_logs_for_account = tmp
51
-
52
- # conversion for audit_logs_for_bundle [type = java.util.List]
53
- tmp = java.util.ArrayList.new
54
- (@audit_logs_for_bundle || []).each do |m|
55
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
56
- m = m.to_java unless m.nil?
57
- tmp.add(m)
58
- end
59
- @audit_logs_for_bundle = tmp
60
-
61
- # conversion for audit_logs_for_subscription [type = java.util.List]
62
- tmp = java.util.ArrayList.new
63
- (@audit_logs_for_subscription || []).each do |m|
64
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
65
- m = m.to_java unless m.nil?
66
- tmp.add(m)
67
- end
68
- @audit_logs_for_subscription = tmp
69
-
70
- # conversion for audit_logs_for_subscription_event [type = java.util.List]
71
- tmp = java.util.ArrayList.new
72
- (@audit_logs_for_subscription_event || []).each do |m|
73
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
74
- m = m.to_java unless m.nil?
75
- tmp.add(m)
76
- end
77
- @audit_logs_for_subscription_event = tmp
78
-
79
- # conversion for audit_logs_for_blocking_state [type = java.util.List]
80
- tmp = java.util.ArrayList.new
81
- (@audit_logs_for_blocking_state || []).each do |m|
82
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
83
- m = m.to_java unless m.nil?
84
- tmp.add(m)
85
- end
86
- @audit_logs_for_blocking_state = tmp
87
-
88
- # conversion for audit_logs_for_invoice [type = java.util.List]
89
- tmp = java.util.ArrayList.new
90
- (@audit_logs_for_invoice || []).each do |m|
91
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
92
- m = m.to_java unless m.nil?
93
- tmp.add(m)
94
- end
95
- @audit_logs_for_invoice = tmp
96
-
97
- # conversion for audit_logs_for_invoice_item [type = java.util.List]
98
- tmp = java.util.ArrayList.new
99
- (@audit_logs_for_invoice_item || []).each do |m|
100
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
101
- m = m.to_java unless m.nil?
102
- tmp.add(m)
103
- end
104
- @audit_logs_for_invoice_item = tmp
105
-
106
- # conversion for audit_logs_for_invoice_payment [type = java.util.List]
107
- tmp = java.util.ArrayList.new
108
- (@audit_logs_for_invoice_payment || []).each do |m|
109
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
110
- m = m.to_java unless m.nil?
111
- tmp.add(m)
112
- end
113
- @audit_logs_for_invoice_payment = tmp
114
-
115
- # conversion for audit_logs_for_payment [type = java.util.List]
116
- tmp = java.util.ArrayList.new
117
- (@audit_logs_for_payment || []).each do |m|
118
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
119
- m = m.to_java unless m.nil?
120
- tmp.add(m)
121
- end
122
- @audit_logs_for_payment = tmp
123
-
124
- # conversion for audit_logs_for_payment_transaction [type = java.util.List]
125
- tmp = java.util.ArrayList.new
126
- (@audit_logs_for_payment_transaction || []).each do |m|
127
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
128
- m = m.to_java unless m.nil?
129
- tmp.add(m)
130
- end
131
- @audit_logs_for_payment_transaction = tmp
132
-
133
- # conversion for audit_logs_for_payment_method [type = java.util.List]
134
- tmp = java.util.ArrayList.new
135
- (@audit_logs_for_payment_method || []).each do |m|
136
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
137
- m = m.to_java unless m.nil?
138
- tmp.add(m)
139
- end
140
- @audit_logs_for_payment_method = tmp
141
-
142
- # conversion for audit_logs_for_tag [type = java.util.List]
143
- tmp = java.util.ArrayList.new
144
- (@audit_logs_for_tag || []).each do |m|
145
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
146
- m = m.to_java unless m.nil?
147
- tmp.add(m)
148
- end
149
- @audit_logs_for_tag = tmp
150
-
151
- # conversion for audit_logs_for_custom_field [type = java.util.List]
152
- tmp = java.util.ArrayList.new
153
- (@audit_logs_for_custom_field || []).each do |m|
154
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
155
- m = m.to_java unless m.nil?
156
- tmp.add(m)
157
- end
158
- @audit_logs_for_custom_field = tmp
159
-
160
- # conversion for audit_logs [type = org.killbill.billing.util.audit.AccountAuditLogsForObjectType]
161
- @audit_logs = @audit_logs.to_java unless @audit_logs.nil?
162
51
  self
163
52
  end
164
53
 
@@ -172,130 +61,6 @@ module Killbill
172
61
  tmp << m
173
62
  end
174
63
  @audit_logs_for_account = tmp
175
-
176
- # conversion for audit_logs_for_bundle [type = java.util.List]
177
- @audit_logs_for_bundle = j_obj.audit_logs_for_bundle
178
- tmp = []
179
- (@audit_logs_for_bundle || []).each do |m|
180
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
181
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
182
- tmp << m
183
- end
184
- @audit_logs_for_bundle = tmp
185
-
186
- # conversion for audit_logs_for_subscription [type = java.util.List]
187
- @audit_logs_for_subscription = j_obj.audit_logs_for_subscription
188
- tmp = []
189
- (@audit_logs_for_subscription || []).each do |m|
190
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
191
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
192
- tmp << m
193
- end
194
- @audit_logs_for_subscription = tmp
195
-
196
- # conversion for audit_logs_for_subscription_event [type = java.util.List]
197
- @audit_logs_for_subscription_event = j_obj.audit_logs_for_subscription_event
198
- tmp = []
199
- (@audit_logs_for_subscription_event || []).each do |m|
200
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
201
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
202
- tmp << m
203
- end
204
- @audit_logs_for_subscription_event = tmp
205
-
206
- # conversion for audit_logs_for_blocking_state [type = java.util.List]
207
- @audit_logs_for_blocking_state = j_obj.audit_logs_for_blocking_state
208
- tmp = []
209
- (@audit_logs_for_blocking_state || []).each do |m|
210
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
211
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
212
- tmp << m
213
- end
214
- @audit_logs_for_blocking_state = tmp
215
-
216
- # conversion for audit_logs_for_invoice [type = java.util.List]
217
- @audit_logs_for_invoice = j_obj.audit_logs_for_invoice
218
- tmp = []
219
- (@audit_logs_for_invoice || []).each do |m|
220
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
221
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
222
- tmp << m
223
- end
224
- @audit_logs_for_invoice = tmp
225
-
226
- # conversion for audit_logs_for_invoice_item [type = java.util.List]
227
- @audit_logs_for_invoice_item = j_obj.audit_logs_for_invoice_item
228
- tmp = []
229
- (@audit_logs_for_invoice_item || []).each do |m|
230
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
231
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
232
- tmp << m
233
- end
234
- @audit_logs_for_invoice_item = tmp
235
-
236
- # conversion for audit_logs_for_invoice_payment [type = java.util.List]
237
- @audit_logs_for_invoice_payment = j_obj.audit_logs_for_invoice_payment
238
- tmp = []
239
- (@audit_logs_for_invoice_payment || []).each do |m|
240
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
241
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
242
- tmp << m
243
- end
244
- @audit_logs_for_invoice_payment = tmp
245
-
246
- # conversion for audit_logs_for_payment [type = java.util.List]
247
- @audit_logs_for_payment = j_obj.audit_logs_for_payment
248
- tmp = []
249
- (@audit_logs_for_payment || []).each do |m|
250
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
251
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
252
- tmp << m
253
- end
254
- @audit_logs_for_payment = tmp
255
-
256
- # conversion for audit_logs_for_payment_transaction [type = java.util.List]
257
- @audit_logs_for_payment_transaction = j_obj.audit_logs_for_payment_transaction
258
- tmp = []
259
- (@audit_logs_for_payment_transaction || []).each do |m|
260
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
261
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
262
- tmp << m
263
- end
264
- @audit_logs_for_payment_transaction = tmp
265
-
266
- # conversion for audit_logs_for_payment_method [type = java.util.List]
267
- @audit_logs_for_payment_method = j_obj.audit_logs_for_payment_method
268
- tmp = []
269
- (@audit_logs_for_payment_method || []).each do |m|
270
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
271
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
272
- tmp << m
273
- end
274
- @audit_logs_for_payment_method = tmp
275
-
276
- # conversion for audit_logs_for_tag [type = java.util.List]
277
- @audit_logs_for_tag = j_obj.audit_logs_for_tag
278
- tmp = []
279
- (@audit_logs_for_tag || []).each do |m|
280
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
281
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
282
- tmp << m
283
- end
284
- @audit_logs_for_tag = tmp
285
-
286
- # conversion for audit_logs_for_custom_field [type = java.util.List]
287
- @audit_logs_for_custom_field = j_obj.audit_logs_for_custom_field
288
- tmp = []
289
- (@audit_logs_for_custom_field || []).each do |m|
290
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
291
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
292
- tmp << m
293
- end
294
- @audit_logs_for_custom_field = tmp
295
-
296
- # conversion for audit_logs [type = org.killbill.billing.util.audit.AccountAuditLogsForObjectType]
297
- @audit_logs = j_obj.audit_logs
298
- @audit_logs = Killbill::Plugin::Model::AccountAuditLogsForObjectType.new.to_ruby(@audit_logs) unless @audit_logs.nil?
299
64
  self
300
65
  end
301
66
 
@@ -34,33 +34,14 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.util.audit.AccountAuditLogsForObjectType
36
36
 
37
- attr_accessor :audit_logs
38
-
39
37
  def initialize()
40
38
  end
41
39
 
42
40
  def to_java()
43
- # conversion for audit_logs [type = java.util.List]
44
- tmp = java.util.ArrayList.new
45
- (@audit_logs || []).each do |m|
46
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
47
- m = m.to_java unless m.nil?
48
- tmp.add(m)
49
- end
50
- @audit_logs = tmp
51
41
  self
52
42
  end
53
43
 
54
44
  def to_ruby(j_obj)
55
- # conversion for audit_logs [type = java.util.List]
56
- @audit_logs = j_obj.audit_logs
57
- tmp = []
58
- (@audit_logs || []).each do |m|
59
- # conversion for m [type = org.killbill.billing.util.audit.AuditLog]
60
- m = Killbill::Plugin::Model::AuditLog.new.to_ruby(m) unless m.nil?
61
- tmp << m
62
- end
63
- @audit_logs = tmp
64
45
  self
65
46
  end
66
47
 
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.Catalog
36
36
 
37
- attr_accessor :catalog_name, :supported_currencies, :products, :plans
37
+ attr_accessor :catalog_name
38
38
 
39
39
  def initialize()
40
40
  end
@@ -42,33 +42,12 @@ module Killbill
42
42
  def to_java()
43
43
  # conversion for catalog_name [type = java.lang.String]
44
44
  @catalog_name = @catalog_name.to_s unless @catalog_name.nil?
45
-
46
- # conversion for supported_currencies [type = org.killbill.billing.catalog.api.Currency]
47
- @supported_currencies = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@supported_currencies.to_s}") unless @supported_currencies.nil?
48
-
49
- # conversion for products [type = org.killbill.billing.catalog.api.Product]
50
- @products = @products.to_java unless @products.nil?
51
-
52
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan]
53
- @plans = @plans.to_java unless @plans.nil?
54
45
  self
55
46
  end
56
47
 
57
48
  def to_ruby(j_obj)
58
49
  # conversion for catalog_name [type = java.lang.String]
59
50
  @catalog_name = j_obj.catalog_name
60
-
61
- # conversion for supported_currencies [type = org.killbill.billing.catalog.api.Currency]
62
- @supported_currencies = j_obj.supported_currencies
63
- @supported_currencies = @supported_currencies.to_s.to_sym unless @supported_currencies.nil?
64
-
65
- # conversion for products [type = org.killbill.billing.catalog.api.Product]
66
- @products = j_obj.products
67
- @products = Killbill::Plugin::Model::Product.new.to_ruby(@products) unless @products.nil?
68
-
69
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan]
70
- @plans = j_obj.plans
71
- @plans = Killbill::Plugin::Model::Plan.new.to_ruby(@plans) unless @plans.nil?
72
51
  self
73
52
  end
74
53
 
@@ -34,21 +34,20 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.InternationalPrice
36
36
 
37
- attr_accessor :prices, :price, :is_zero
37
+ attr_accessor :prices, :is_zero
38
38
 
39
39
  def initialize()
40
40
  end
41
41
 
42
42
  def to_java()
43
- # conversion for prices [type = org.killbill.billing.catalog.api.Price]
44
- @prices = @prices.to_java unless @prices.nil?
45
-
46
- # conversion for price [type = java.math.BigDecimal]
47
- if @price.nil?
48
- @price = java.math.BigDecimal::ZERO
49
- else
50
- @price = java.math.BigDecimal.new(@price.to_s)
43
+ # conversion for prices [type = org.killbill.billing.catalog.api.Price[]]
44
+ tmp = java.util.ArrayList.new
45
+ (@prices || []).each do |m|
46
+ # conversion for m [type = org.killbill.billing.catalog.api.Price]
47
+ m = m.to_java unless m.nil?
48
+ tmp.add(m)
51
49
  end
50
+ @prices = tmp.toArray
52
51
 
53
52
  # conversion for is_zero [type = boolean]
54
53
  @is_zero = @is_zero.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_zero)
@@ -56,13 +55,15 @@ module Killbill
56
55
  end
57
56
 
58
57
  def to_ruby(j_obj)
59
- # conversion for prices [type = org.killbill.billing.catalog.api.Price]
58
+ # conversion for prices [type = org.killbill.billing.catalog.api.Price[]]
60
59
  @prices = j_obj.prices
61
- @prices = Killbill::Plugin::Model::Price.new.to_ruby(@prices) unless @prices.nil?
62
-
63
- # conversion for price [type = java.math.BigDecimal]
64
- @price = j_obj.price
65
- @price = @price.nil? ? 0 : BigDecimal.new(@price.to_s)
60
+ tmp = []
61
+ (@prices || []).each do |m|
62
+ # conversion for m [type = org.killbill.billing.catalog.api.Price]
63
+ m = Killbill::Plugin::Model::Price.new.to_ruby(m) unless m.nil?
64
+ tmp << m
65
+ end
66
+ @prices = tmp
66
67
 
67
68
  # conversion for is_zero [type = boolean]
68
69
  @is_zero = j_obj.is_zero
@@ -40,8 +40,14 @@ module Killbill
40
40
  end
41
41
 
42
42
  def to_java()
43
- # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase]
44
- @initial_phases = @initial_phases.to_java unless @initial_phases.nil?
43
+ # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
44
+ tmp = java.util.ArrayList.new
45
+ (@initial_phases || []).each do |m|
46
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
47
+ m = m.to_java unless m.nil?
48
+ tmp.add(m)
49
+ end
50
+ @initial_phases = tmp.toArray
45
51
 
46
52
  # conversion for product [type = org.killbill.billing.catalog.api.Product]
47
53
  @product = @product.to_java unless @product.nil?
@@ -64,8 +70,14 @@ module Killbill
64
70
  # conversion for plans_allowed_in_bundle [type = int]
65
71
  @plans_allowed_in_bundle = @plans_allowed_in_bundle
66
72
 
67
- # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase]
68
- @all_phases = @all_phases.to_java unless @all_phases.nil?
73
+ # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
74
+ tmp = java.util.ArrayList.new
75
+ (@all_phases || []).each do |m|
76
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
77
+ m = m.to_java unless m.nil?
78
+ tmp.add(m)
79
+ end
80
+ @all_phases = tmp.toArray
69
81
 
70
82
  # conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
71
83
  if !@effective_date_for_existing_subscriptons.nil?
@@ -77,9 +89,15 @@ module Killbill
77
89
  end
78
90
 
79
91
  def to_ruby(j_obj)
80
- # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase]
92
+ # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
81
93
  @initial_phases = j_obj.initial_phases
82
- @initial_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@initial_phases) unless @initial_phases.nil?
94
+ tmp = []
95
+ (@initial_phases || []).each do |m|
96
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
97
+ m = Killbill::Plugin::Model::PlanPhase.new.to_ruby(m) unless m.nil?
98
+ tmp << m
99
+ end
100
+ @initial_phases = tmp
83
101
 
84
102
  # conversion for product [type = org.killbill.billing.catalog.api.Product]
85
103
  @product = j_obj.product
@@ -111,9 +129,15 @@ module Killbill
111
129
  # conversion for plans_allowed_in_bundle [type = int]
112
130
  @plans_allowed_in_bundle = j_obj.plans_allowed_in_bundle
113
131
 
114
- # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase]
132
+ # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
115
133
  @all_phases = j_obj.all_phases
116
- @all_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@all_phases) unless @all_phases.nil?
134
+ tmp = []
135
+ (@all_phases || []).each do |m|
136
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
137
+ m = Killbill::Plugin::Model::PlanPhase.new.to_ruby(m) unless m.nil?
138
+ tmp << m
139
+ end
140
+ @all_phases = tmp
117
141
 
118
142
  # conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
119
143
  @effective_date_for_existing_subscriptons = j_obj.effective_date_for_existing_subscriptons
@@ -40,8 +40,14 @@ module Killbill
40
40
  end
41
41
 
42
42
  def to_java()
43
- # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase]
44
- @initial_phases = @initial_phases.to_java unless @initial_phases.nil?
43
+ # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
44
+ tmp = java.util.ArrayList.new
45
+ (@initial_phases || []).each do |m|
46
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
47
+ m = m.to_java unless m.nil?
48
+ tmp.add(m)
49
+ end
50
+ @initial_phases = tmp.toArray
45
51
 
46
52
  # conversion for product [type = org.killbill.billing.catalog.api.Product]
47
53
  @product = @product.to_java unless @product.nil?
@@ -64,8 +70,14 @@ module Killbill
64
70
  # conversion for plans_allowed_in_bundle [type = int]
65
71
  @plans_allowed_in_bundle = @plans_allowed_in_bundle
66
72
 
67
- # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase]
68
- @all_phases = @all_phases.to_java unless @all_phases.nil?
73
+ # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
74
+ tmp = java.util.ArrayList.new
75
+ (@all_phases || []).each do |m|
76
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
77
+ m = m.to_java unless m.nil?
78
+ tmp.add(m)
79
+ end
80
+ @all_phases = tmp.toArray
69
81
 
70
82
  # conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
71
83
  if !@effective_date_for_existing_subscriptons.nil?
@@ -77,9 +89,15 @@ module Killbill
77
89
  end
78
90
 
79
91
  def to_ruby(j_obj)
80
- # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase]
92
+ # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
81
93
  @initial_phases = j_obj.initial_phases
82
- @initial_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@initial_phases) unless @initial_phases.nil?
94
+ tmp = []
95
+ (@initial_phases || []).each do |m|
96
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
97
+ m = Killbill::Plugin::Model::PlanPhase.new.to_ruby(m) unless m.nil?
98
+ tmp << m
99
+ end
100
+ @initial_phases = tmp
83
101
 
84
102
  # conversion for product [type = org.killbill.billing.catalog.api.Product]
85
103
  @product = j_obj.product
@@ -111,9 +129,15 @@ module Killbill
111
129
  # conversion for plans_allowed_in_bundle [type = int]
112
130
  @plans_allowed_in_bundle = j_obj.plans_allowed_in_bundle
113
131
 
114
- # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase]
132
+ # conversion for all_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
115
133
  @all_phases = j_obj.all_phases
116
- @all_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@all_phases) unless @all_phases.nil?
134
+ tmp = []
135
+ (@all_phases || []).each do |m|
136
+ # conversion for m [type = org.killbill.billing.catalog.api.PlanPhase]
137
+ m = Killbill::Plugin::Model::PlanPhase.new.to_ruby(m) unless m.nil?
138
+ tmp << m
139
+ end
140
+ @all_phases = tmp
117
141
 
118
142
  # conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
119
143
  @effective_date_for_existing_subscriptons = j_obj.effective_date_for_existing_subscriptons
@@ -46,8 +46,14 @@ module Killbill
46
46
  # conversion for recurring [type = org.killbill.billing.catalog.api.Recurring]
47
47
  @recurring = @recurring.to_java unless @recurring.nil?
48
48
 
49
- # conversion for usages [type = org.killbill.billing.catalog.api.Usage]
50
- @usages = @usages.to_java unless @usages.nil?
49
+ # conversion for usages [type = org.killbill.billing.catalog.api.Usage[]]
50
+ tmp = java.util.ArrayList.new
51
+ (@usages || []).each do |m|
52
+ # conversion for m [type = org.killbill.billing.catalog.api.Usage]
53
+ m = m.to_java unless m.nil?
54
+ tmp.add(m)
55
+ end
56
+ @usages = tmp.toArray
51
57
 
52
58
  # conversion for name [type = java.lang.String]
53
59
  @name = @name.to_s unless @name.nil?
@@ -72,16 +78,22 @@ module Killbill
72
78
  @recurring = j_obj.recurring
73
79
  @recurring = Killbill::Plugin::Model::Recurring.new.to_ruby(@recurring) unless @recurring.nil?
74
80
 
75
- # conversion for usages [type = org.killbill.billing.catalog.api.Usage]
81
+ # conversion for usages [type = org.killbill.billing.catalog.api.Usage[]]
76
82
  @usages = j_obj.usages
77
- @usages = Killbill::Plugin::Model::Usage.new.to_ruby(@usages) unless @usages.nil?
83
+ tmp = []
84
+ (@usages || []).each do |m|
85
+ # conversion for m [type = org.killbill.billing.catalog.api.Usage]
86
+ m = Killbill::Plugin::Model::Usage.new.to_ruby(m) unless m.nil?
87
+ tmp << m
88
+ end
89
+ @usages = tmp
78
90
 
79
91
  # conversion for name [type = java.lang.String]
80
92
  @name = j_obj.name
81
93
 
82
94
  # conversion for plan [type = org.killbill.billing.catalog.api.Plan]
83
- @plan = j_obj.plan
84
- @plan = Killbill::Plugin::Model::Plan.new.to_ruby(@plan) unless @plan.nil?
95
+ #@plan = j_obj.plan
96
+ #@plan = Killbill::Plugin::Model::Plan.new.to_ruby(@plan) unless @plan.nil?
85
97
 
86
98
  # conversion for duration [type = org.killbill.billing.catalog.api.Duration]
87
99
  @duration = j_obj.duration
@@ -46,8 +46,14 @@ module Killbill
46
46
  # conversion for is_retired [type = boolean]
47
47
  @is_retired = @is_retired.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_retired)
48
48
 
49
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan]
50
- @plans = @plans.to_java unless @plans.nil?
49
+ # conversion for plans [type = org.killbill.billing.catalog.api.Plan[]]
50
+ tmp = java.util.ArrayList.new
51
+ (@plans || []).each do |m|
52
+ # conversion for m [type = org.killbill.billing.catalog.api.Plan]
53
+ m = m.to_java unless m.nil?
54
+ tmp.add(m)
55
+ end
56
+ @plans = tmp.toArray
51
57
  self
52
58
  end
53
59
 
@@ -64,9 +70,15 @@ module Killbill
64
70
  @is_retired = tmp_bool ? true : false
65
71
  end
66
72
 
67
- # conversion for plans [type = org.killbill.billing.catalog.api.Plan]
73
+ # conversion for plans [type = org.killbill.billing.catalog.api.Plan[]]
68
74
  @plans = j_obj.plans
69
- @plans = Killbill::Plugin::Model::Plan.new.to_ruby(@plans) unless @plans.nil?
75
+ tmp = []
76
+ (@plans || []).each do |m|
77
+ # conversion for m [type = org.killbill.billing.catalog.api.Plan]
78
+ m = Killbill::Plugin::Model::Plan.new.to_ruby(m) unless m.nil?
79
+ tmp << m
80
+ end
81
+ @plans = tmp
70
82
  self
71
83
  end
72
84
 
@@ -34,21 +34,14 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.PriceListSet
36
36
 
37
- attr_accessor :plan_list_from
38
-
39
37
  def initialize()
40
38
  end
41
39
 
42
40
  def to_java()
43
- # conversion for plan_list_from [type = org.killbill.billing.catalog.api.Plan]
44
- @plan_list_from = @plan_list_from.to_java unless @plan_list_from.nil?
45
41
  self
46
42
  end
47
43
 
48
44
  def to_ruby(j_obj)
49
- # conversion for plan_list_from [type = org.killbill.billing.catalog.api.Plan]
50
- @plan_list_from = j_obj.plan_list_from
51
- @plan_list_from = Killbill::Plugin::Model::Plan.new.to_ruby(@plan_list_from) unless @plan_list_from.nil?
52
45
  self
53
46
  end
54
47
 
@@ -46,11 +46,23 @@ module Killbill
46
46
  # conversion for is_retired [type = boolean]
47
47
  @is_retired = @is_retired.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_retired)
48
48
 
49
- # conversion for available [type = org.killbill.billing.catalog.api.Product]
50
- @available = @available.to_java unless @available.nil?
51
-
52
- # conversion for included [type = org.killbill.billing.catalog.api.Product]
53
- @included = @included.to_java unless @included.nil?
49
+ # conversion for available [type = org.killbill.billing.catalog.api.Product[]]
50
+ tmp = java.util.ArrayList.new
51
+ (@available || []).each do |m|
52
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
53
+ m = m.to_java unless m.nil?
54
+ tmp.add(m)
55
+ end
56
+ @available = tmp.toArray
57
+
58
+ # conversion for included [type = org.killbill.billing.catalog.api.Product[]]
59
+ tmp = java.util.ArrayList.new
60
+ (@included || []).each do |m|
61
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
62
+ m = m.to_java unless m.nil?
63
+ tmp.add(m)
64
+ end
65
+ @included = tmp.toArray
54
66
 
55
67
  # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory]
56
68
  @category = Java::org.killbill.billing.catalog.api.ProductCategory.value_of("#{@category.to_s}") unless @category.nil?
@@ -58,8 +70,14 @@ module Killbill
58
70
  # conversion for catalog_name [type = java.lang.String]
59
71
  @catalog_name = @catalog_name.to_s unless @catalog_name.nil?
60
72
 
61
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
62
- @limits = @limits.to_java unless @limits.nil?
73
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
74
+ tmp = java.util.ArrayList.new
75
+ (@limits || []).each do |m|
76
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
77
+ m = m.to_java unless m.nil?
78
+ tmp.add(m)
79
+ end
80
+ @limits = tmp.toArray
63
81
  self
64
82
  end
65
83
 
@@ -76,13 +94,25 @@ module Killbill
76
94
  @is_retired = tmp_bool ? true : false
77
95
  end
78
96
 
79
- # conversion for available [type = org.killbill.billing.catalog.api.Product]
97
+ # conversion for available [type = org.killbill.billing.catalog.api.Product[]]
80
98
  @available = j_obj.available
81
- @available = Killbill::Plugin::Model::Product.new.to_ruby(@available) unless @available.nil?
82
-
83
- # conversion for included [type = org.killbill.billing.catalog.api.Product]
84
- @included = j_obj.included
85
- @included = Killbill::Plugin::Model::Product.new.to_ruby(@included) unless @included.nil?
99
+ tmp = []
100
+ (@available || []).each do |m|
101
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
102
+ m = Killbill::Plugin::Model::Product.new.to_ruby(m) unless m.nil?
103
+ tmp << m
104
+ end
105
+ @available = tmp
106
+
107
+ # conversion for included [type = org.killbill.billing.catalog.api.Product[]]
108
+ @included = j_obj.get_included
109
+ tmp = []
110
+ (@included || []).each do |m|
111
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
112
+ m = Killbill::Plugin::Model::Product.new.to_ruby(m) unless m.nil?
113
+ tmp << m
114
+ end
115
+ @included = tmp
86
116
 
87
117
  # conversion for category [type = org.killbill.billing.catalog.api.ProductCategory]
88
118
  @category = j_obj.category
@@ -91,9 +121,15 @@ module Killbill
91
121
  # conversion for catalog_name [type = java.lang.String]
92
122
  @catalog_name = j_obj.catalog_name
93
123
 
94
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
124
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
95
125
  @limits = j_obj.limits
96
- @limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
126
+ tmp = []
127
+ (@limits || []).each do |m|
128
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
129
+ m = Killbill::Plugin::Model::Limit.new.to_ruby(m) unless m.nil?
130
+ tmp << m
131
+ end
132
+ @limits = tmp
97
133
  self
98
134
  end
99
135
 
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.StaticCatalog
36
36
 
37
- attr_accessor :catalog_name, :recurring_billing_mode, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings, :available_add_on_listings
37
+ attr_accessor :catalog_name, :recurring_billing_mode, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings
38
38
 
39
39
  def initialize()
40
40
  end
@@ -53,35 +53,50 @@ module Killbill
53
53
  @effective_date = @effective_date.to_date
54
54
  end
55
55
 
56
- # conversion for current_supported_currencies [type = org.killbill.billing.catalog.api.Currency]
57
- @current_supported_currencies = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@current_supported_currencies.to_s}") unless @current_supported_currencies.nil?
58
-
59
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product]
60
- @current_products = @current_products.to_java unless @current_products.nil?
56
+ # conversion for current_supported_currencies [type = org.killbill.billing.catalog.api.Currency[]]
57
+ tmp = java.util.ArrayList.new
58
+ (@current_supported_currencies || []).each do |m|
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?
61
+ tmp.add(m)
62
+ end
63
+ @current_supported_currencies = tmp.toArray
61
64
 
62
- # conversion for current_units [type = org.killbill.billing.catalog.api.Unit]
63
- @current_units = @current_units.to_java unless @current_units.nil?
65
+ # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
66
+ tmp = java.util.ArrayList.new
67
+ (@current_products || []).each do |m|
68
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
69
+ m = m.to_java unless m.nil?
70
+ tmp.add(m)
71
+ end
72
+ @current_products = tmp.toArray
64
73
 
65
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan]
66
- @current_plans = @current_plans.to_java unless @current_plans.nil?
74
+ # conversion for current_units [type = org.killbill.billing.catalog.api.Unit[]]
75
+ tmp = java.util.ArrayList.new
76
+ (@current_units || []).each do |m|
77
+ # conversion for m [type = org.killbill.billing.catalog.api.Unit]
78
+ m = m.to_java unless m.nil?
79
+ tmp.add(m)
80
+ end
81
+ @current_units = tmp.toArray
67
82
 
68
- # conversion for available_base_plan_listings [type = java.util.List]
83
+ # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
69
84
  tmp = java.util.ArrayList.new
70
- (@available_base_plan_listings || []).each do |m|
71
- # conversion for m [type = org.killbill.billing.catalog.api.Listing]
85
+ (@current_plans || []).each do |m|
86
+ # conversion for m [type = org.killbill.billing.catalog.api.Plan]
72
87
  m = m.to_java unless m.nil?
73
88
  tmp.add(m)
74
89
  end
75
- @available_base_plan_listings = tmp
90
+ @current_plans = tmp.toArray
76
91
 
77
- # conversion for available_add_on_listings [type = java.util.List]
92
+ # conversion for available_base_plan_listings [type = java.util.List]
78
93
  tmp = java.util.ArrayList.new
79
- (@available_add_on_listings || []).each do |m|
94
+ (@available_base_plan_listings || []).each do |m|
80
95
  # conversion for m [type = org.killbill.billing.catalog.api.Listing]
81
96
  m = m.to_java unless m.nil?
82
97
  tmp.add(m)
83
98
  end
84
- @available_add_on_listings = tmp
99
+ @available_base_plan_listings = tmp
85
100
  self
86
101
  end
87
102
 
@@ -102,21 +117,45 @@ module Killbill
102
117
  @effective_date = DateTime.iso8601(str)
103
118
  end
104
119
 
105
- # conversion for current_supported_currencies [type = org.killbill.billing.catalog.api.Currency]
120
+ # conversion for current_supported_currencies [type = org.killbill.billing.catalog.api.Currency[]]
106
121
  @current_supported_currencies = j_obj.current_supported_currencies
107
- @current_supported_currencies = @current_supported_currencies.to_s.to_sym unless @current_supported_currencies.nil?
122
+ tmp = []
123
+ (@current_supported_currencies || []).each do |m|
124
+ # conversion for m [type = org.killbill.billing.catalog.api.Currency]
125
+ m = m.to_s.to_sym unless m.nil?
126
+ tmp << m
127
+ end
128
+ @current_supported_currencies = tmp
108
129
 
109
- # conversion for current_products [type = org.killbill.billing.catalog.api.Product]
130
+ # conversion for current_products [type = org.killbill.billing.catalog.api.Product[]]
110
131
  @current_products = j_obj.current_products
111
- @current_products = Killbill::Plugin::Model::Product.new.to_ruby(@current_products) unless @current_products.nil?
132
+ tmp = []
133
+ (@current_products || []).each do |m|
134
+ # conversion for m [type = org.killbill.billing.catalog.api.Product]
135
+ m = Killbill::Plugin::Model::Product.new.to_ruby(m) unless m.nil?
136
+ tmp << m
137
+ end
138
+ @current_products = tmp
112
139
 
113
- # conversion for current_units [type = org.killbill.billing.catalog.api.Unit]
140
+ # conversion for current_units [type = org.killbill.billing.catalog.api.Unit[]]
114
141
  @current_units = j_obj.current_units
115
- @current_units = Killbill::Plugin::Model::Unit.new.to_ruby(@current_units) unless @current_units.nil?
142
+ tmp = []
143
+ (@current_units || []).each do |m|
144
+ # conversion for m [type = org.killbill.billing.catalog.api.Unit]
145
+ m = Killbill::Plugin::Model::Unit.new.to_ruby(m) unless m.nil?
146
+ tmp << m
147
+ end
148
+ @current_units = tmp
116
149
 
117
- # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan]
150
+ # conversion for current_plans [type = org.killbill.billing.catalog.api.Plan[]]
118
151
  @current_plans = j_obj.current_plans
119
- @current_plans = Killbill::Plugin::Model::Plan.new.to_ruby(@current_plans) unless @current_plans.nil?
152
+ tmp = []
153
+ (@current_plans || []).each do |m|
154
+ # conversion for m [type = org.killbill.billing.catalog.api.Plan]
155
+ m = Killbill::Plugin::Model::Plan.new.to_ruby(m) unless m.nil?
156
+ tmp << m
157
+ end
158
+ @current_plans = tmp
120
159
 
121
160
  # conversion for available_base_plan_listings [type = java.util.List]
122
161
  @available_base_plan_listings = j_obj.available_base_plan_listings
@@ -127,16 +166,6 @@ module Killbill
127
166
  tmp << m
128
167
  end
129
168
  @available_base_plan_listings = tmp
130
-
131
- # conversion for available_add_on_listings [type = java.util.List]
132
- @available_add_on_listings = j_obj.available_add_on_listings
133
- tmp = []
134
- (@available_add_on_listings || []).each do |m|
135
- # conversion for m [type = org.killbill.billing.catalog.api.Listing]
136
- m = Killbill::Plugin::Model::Listing.new.to_ruby(m) unless m.nil?
137
- tmp << m
138
- end
139
- @available_add_on_listings = tmp
140
169
  self
141
170
  end
142
171
 
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.entitlement.api.Subscription
36
36
 
37
- attr_accessor :base_entitlement_id, :bundle_id, :account_id, :external_key, :state, :source_type, :effective_start_date, :effective_end_date, :last_active_product, :last_active_plan, :last_active_phase, :last_active_price_list, :last_active_product_category, :id, :created_date, :updated_date, :billing_start_date, :billing_end_date, :charged_through_date, :current_state_for_service
37
+ attr_accessor :base_entitlement_id, :bundle_id, :account_id, :external_key, :state, :source_type, :effective_start_date, :effective_end_date, :last_active_product, :last_active_plan, :last_active_phase, :last_active_price_list, :last_active_product_category, :id, :created_date, :updated_date, :billing_start_date, :billing_end_date, :charged_through_date
38
38
 
39
39
  def initialize()
40
40
  end
@@ -112,9 +112,6 @@ module Killbill
112
112
  if !@charged_through_date.nil?
113
113
  @charged_through_date = Java::org.joda.time.LocalDate.parse(@charged_through_date.to_s)
114
114
  end
115
-
116
- # conversion for current_state_for_service [type = java.lang.String]
117
- @current_state_for_service = @current_state_for_service.to_s unless @current_state_for_service.nil?
118
115
  self
119
116
  end
120
117
 
@@ -211,9 +208,6 @@ module Killbill
211
208
  if !@charged_through_date.nil?
212
209
  @charged_through_date = @charged_through_date.to_s
213
210
  end
214
-
215
- # conversion for current_state_for_service [type = java.lang.String]
216
- @current_state_for_service = j_obj.current_state_for_service
217
211
  self
218
212
  end
219
213
 
@@ -40,11 +40,23 @@ module Killbill
40
40
  end
41
41
 
42
42
  def to_java()
43
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
44
- @limits = @limits.to_java unless @limits.nil?
45
-
46
- # conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock]
47
- @tiered_blocks = @tiered_blocks.to_java unless @tiered_blocks.nil?
43
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
44
+ tmp = java.util.ArrayList.new
45
+ (@limits || []).each do |m|
46
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
47
+ m = m.to_java unless m.nil?
48
+ tmp.add(m)
49
+ end
50
+ @limits = tmp.toArray
51
+
52
+ # conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock[]]
53
+ tmp = java.util.ArrayList.new
54
+ (@tiered_blocks || []).each do |m|
55
+ # conversion for m [type = org.killbill.billing.catalog.api.TieredBlock]
56
+ m = m.to_java unless m.nil?
57
+ tmp.add(m)
58
+ end
59
+ @tiered_blocks = tmp.toArray
48
60
 
49
61
  # conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
50
62
  @fixed_price = @fixed_price.to_java unless @fixed_price.nil?
@@ -55,13 +67,25 @@ module Killbill
55
67
  end
56
68
 
57
69
  def to_ruby(j_obj)
58
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
70
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
59
71
  @limits = j_obj.limits
60
- @limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
61
-
62
- # conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock]
72
+ tmp = []
73
+ (@limits || []).each do |m|
74
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
75
+ m = Killbill::Plugin::Model::Limit.new.to_ruby(m) unless m.nil?
76
+ tmp << m
77
+ end
78
+ @limits = tmp
79
+
80
+ # conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock[]]
63
81
  @tiered_blocks = j_obj.tiered_blocks
64
- @tiered_blocks = Killbill::Plugin::Model::TieredBlock.new.to_ruby(@tiered_blocks) unless @tiered_blocks.nil?
82
+ tmp = []
83
+ (@tiered_blocks || []).each do |m|
84
+ # conversion for m [type = org.killbill.billing.catalog.api.TieredBlock]
85
+ m = Killbill::Plugin::Model::TieredBlock.new.to_ruby(m) unless m.nil?
86
+ tmp << m
87
+ end
88
+ @tiered_blocks = tmp
65
89
 
66
90
  # conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
67
91
  @fixed_price = j_obj.fixed_price
@@ -77,7 +77,7 @@ module Killbill
77
77
  @price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@price) unless @price.nil?
78
78
 
79
79
  # conversion for min_top_up_credit [type = java.lang.Double]
80
- @min_top_up_credit = j_obj.min_top_up_credit
80
+ #@min_top_up_credit = j_obj.min_top_up_credit
81
81
 
82
82
  # conversion for max [type = java.lang.Double]
83
83
  @max = j_obj.max
@@ -52,14 +52,32 @@ module Killbill
52
52
  # conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
53
53
  @billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
54
54
 
55
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
56
- @limits = @limits.to_java unless @limits.nil?
57
-
58
- # conversion for tiers [type = org.killbill.billing.catalog.api.Tier]
59
- @tiers = @tiers.to_java unless @tiers.nil?
60
-
61
- # conversion for blocks [type = org.killbill.billing.catalog.api.Block]
62
- @blocks = @blocks.to_java unless @blocks.nil?
55
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
56
+ tmp = java.util.ArrayList.new
57
+ (@limits || []).each do |m|
58
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
59
+ m = m.to_java unless m.nil?
60
+ tmp.add(m)
61
+ end
62
+ @limits = tmp.toArray
63
+
64
+ # conversion for tiers [type = org.killbill.billing.catalog.api.Tier[]]
65
+ tmp = java.util.ArrayList.new
66
+ (@tiers || []).each do |m|
67
+ # conversion for m [type = org.killbill.billing.catalog.api.Tier]
68
+ m = m.to_java unless m.nil?
69
+ tmp.add(m)
70
+ end
71
+ @tiers = tmp.toArray
72
+
73
+ # conversion for blocks [type = org.killbill.billing.catalog.api.Block[]]
74
+ tmp = java.util.ArrayList.new
75
+ (@blocks || []).each do |m|
76
+ # conversion for m [type = org.killbill.billing.catalog.api.Block]
77
+ m = m.to_java unless m.nil?
78
+ tmp.add(m)
79
+ end
80
+ @blocks = tmp.toArray
63
81
 
64
82
  # conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
65
83
  @fixed_price = @fixed_price.to_java unless @fixed_price.nil?
@@ -85,17 +103,35 @@ module Killbill
85
103
  @billing_period = j_obj.billing_period
86
104
  @billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
87
105
 
88
- # conversion for limits [type = org.killbill.billing.catalog.api.Limit]
106
+ # conversion for limits [type = org.killbill.billing.catalog.api.Limit[]]
89
107
  @limits = j_obj.limits
90
- @limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
91
-
92
- # conversion for tiers [type = org.killbill.billing.catalog.api.Tier]
108
+ tmp = []
109
+ (@limits || []).each do |m|
110
+ # conversion for m [type = org.killbill.billing.catalog.api.Limit]
111
+ m = Killbill::Plugin::Model::Limit.new.to_ruby(m) unless m.nil?
112
+ tmp << m
113
+ end
114
+ @limits = tmp
115
+
116
+ # conversion for tiers [type = org.killbill.billing.catalog.api.Tier[]]
93
117
  @tiers = j_obj.tiers
94
- @tiers = Killbill::Plugin::Model::Tier.new.to_ruby(@tiers) unless @tiers.nil?
95
-
96
- # conversion for blocks [type = org.killbill.billing.catalog.api.Block]
118
+ tmp = []
119
+ (@tiers || []).each do |m|
120
+ # conversion for m [type = org.killbill.billing.catalog.api.Tier]
121
+ m = Killbill::Plugin::Model::Tier.new.to_ruby(m) unless m.nil?
122
+ tmp << m
123
+ end
124
+ @tiers = tmp
125
+
126
+ # conversion for blocks [type = org.killbill.billing.catalog.api.Block[]]
97
127
  @blocks = j_obj.blocks
98
- @blocks = Killbill::Plugin::Model::Block.new.to_ruby(@blocks) unless @blocks.nil?
128
+ tmp = []
129
+ (@blocks || []).each do |m|
130
+ # conversion for m [type = org.killbill.billing.catalog.api.Block]
131
+ m = Killbill::Plugin::Model::Block.new.to_ruby(m) unless m.nil?
132
+ tmp << m
133
+ end
134
+ @blocks = tmp
99
135
 
100
136
  # conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
101
137
  @fixed_price = j_obj.fixed_price
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-01 00:00:00.000000000 Z
11
+ date: 2015-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra