killbill 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -13
- data/Jarfile +1 -1
- data/Jarfile.lock +8 -8
- data/gen_config/api.conf +2 -0
- data/generators/active_merchant/templates/Jarfile.rb +1 -1
- data/lib/killbill.rb +4 -0
- data/lib/killbill/gen/api/entitlement_api.rb +110 -0
- data/lib/killbill/gen/api/entitlement_specifier.rb +77 -0
- data/lib/killbill/gen/api/killbill_nodes_api.rb +74 -0
- data/lib/killbill/gen/api/node_command.rb +76 -0
- data/lib/killbill/gen/api/node_command_metadata.rb +70 -0
- data/lib/killbill/gen/api/node_command_property.rb +61 -0
- data/lib/killbill/gen/api/node_info.rb +134 -0
- data/lib/killbill/gen/api/osgi_killbill.rb +15 -1
- data/lib/killbill/gen/api/plugin_info.rb +100 -0
- data/lib/killbill/gen/api/plugin_node_command_metadata.rb +80 -0
- data/lib/killbill/gen/api/plugin_service_info.rb +63 -0
- data/lib/killbill/gen/api/plugins_info_api.rb +75 -0
- data/lib/killbill/gen/api/require_gen.rb +11 -0
- data/lib/killbill/gen/api/security_api.rb +236 -0
- data/lib/killbill/gen/plugin-api/broadcast_metadata.rb +67 -0
- data/lib/killbill/gen/plugin-api/entitlement_context.rb +11 -18
- data/lib/killbill/gen/plugin-api/prior_entitlement_result.rb +11 -18
- data/lib/killbill/gen/plugin-api/require_gen.rb +1 -0
- data/lib/killbill/version.rb +1 -1
- metadata +156 -154
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58e06c0d27b8a12a97a1b4086e9cd5affac28dac
|
4
|
+
data.tar.gz: 18d3148bbeb16564e501f608765e482280db7e2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd060629ff7bd0e98a897952c191028b17cae8d2997c8e2eb8de9ea3e712bc0fb9bf3d14754129b35168098ce0f3672a745e4f0676988e1b3c708d95558e13b5
|
7
|
+
data.tar.gz: 8897e434887466b72cb452937431e478a218fd7baf4f0a327c1af4b6616ef5e588b070d1c380b3ce420f1e966c3cf6498d67bfbc49404b61dc1b2bb281fac3a3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
killbill (
|
4
|
+
killbill (6.0.0)
|
5
5
|
rack (>= 1.5.2)
|
6
6
|
sinatra (~> 1.3.4)
|
7
7
|
typhoeus (~> 0.6.9)
|
@@ -34,10 +34,6 @@ GEM
|
|
34
34
|
activemodel (= 4.1.10)
|
35
35
|
activesupport (= 4.1.10)
|
36
36
|
arel (~> 5.0.0)
|
37
|
-
activerecord-bogacs (0.3.0)
|
38
|
-
thread_safe (~> 0.3)
|
39
|
-
activerecord-jdbc-adapter (1.3.16)
|
40
|
-
activerecord (>= 2.2)
|
41
37
|
activesupport (4.1.10)
|
42
38
|
i18n (~> 0.6, >= 0.6.9)
|
43
39
|
json (~> 1.7, >= 1.7.7)
|
@@ -48,15 +44,14 @@ GEM
|
|
48
44
|
builder (3.2.2)
|
49
45
|
diff-lcs (1.1.3)
|
50
46
|
erubis (2.7.0)
|
51
|
-
ethon (0.
|
47
|
+
ethon (0.8.0)
|
52
48
|
ffi (>= 1.3.0)
|
53
|
-
ffi (1.9.
|
49
|
+
ffi (1.9.10)
|
50
|
+
ffi (1.9.10-java)
|
54
51
|
i18n (0.7.0)
|
55
52
|
jbundler (0.4.3)
|
56
53
|
maven-tools (~> 0.32.1)
|
57
54
|
ruby-maven (~> 3.0.4)
|
58
|
-
jdbc-mariadb (1.1.8)
|
59
|
-
jdbc-sqlite3 (3.8.10.1)
|
60
55
|
json (1.8.2)
|
61
56
|
json (1.8.2-java)
|
62
57
|
maven-tools (0.32.5)
|
@@ -98,6 +93,7 @@ GEM
|
|
98
93
|
rack (~> 1.4)
|
99
94
|
rack-protection (~> 1.3)
|
100
95
|
tilt (~> 1.3, >= 1.3.3)
|
96
|
+
sqlite3 (1.3.11)
|
101
97
|
thor (0.19.1)
|
102
98
|
thread_safe (0.3.5)
|
103
99
|
thread_safe (0.3.5-java)
|
@@ -116,16 +112,13 @@ DEPENDENCIES
|
|
116
112
|
actionview (~> 4.1.0)
|
117
113
|
activemerchant (~> 1.48.0)
|
118
114
|
activerecord (~> 4.1.0)
|
119
|
-
activerecord-bogacs (~> 0.3)
|
120
|
-
activerecord-jdbc-adapter (~> 1.3)
|
121
115
|
jbundler (~> 0.4.3)
|
122
|
-
jdbc-mariadb (~> 1.1.8)
|
123
|
-
jdbc-sqlite3 (~> 3.7)
|
124
116
|
killbill!
|
125
117
|
monetize (~> 1.1.0)
|
126
118
|
money (~> 6.5.1)
|
127
119
|
offsite_payments (~> 2.1.0)
|
128
120
|
rake (>= 10.0.0)
|
129
121
|
rspec (~> 2.12.0)
|
122
|
+
sqlite3 (~> 1.3.7)
|
130
123
|
thor (~> 0.19.1)
|
131
124
|
thread_safe (~> 0.3.4)
|
data/Jarfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.26'
|
2
2
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.16'
|
3
3
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.16'
|
4
4
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.16'
|
data/Jarfile.lock
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
org.kill-bill.billing:killbill-api:jar:0.
|
1
|
+
org.kill-bill.billing:killbill-api:jar:0.26
|
2
2
|
com.fasterxml.jackson.core:jackson-annotations:jar:2.4.3
|
3
3
|
joda-time:joda-time:jar:2.3
|
4
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.
|
5
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.
|
6
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.
|
7
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.
|
8
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.
|
9
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.
|
10
|
-
org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.
|
4
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-currency:jar:0.16
|
5
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-invoice:jar:0.16
|
6
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-notification:jar:0.16
|
7
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-payment:jar:0.16
|
8
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-control:jar:0.16
|
9
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-catalog:jar:0.16
|
10
|
+
org.kill-bill.billing.plugin:killbill-plugin-api-entitlement:jar:0.16
|
11
11
|
org.kill-bill.billing:killbill-util:jar:tests:0.14.0
|
12
12
|
com.fasterxml.jackson.core:jackson-databind:jar:2.4.3
|
13
13
|
com.fasterxml.jackson.core:jackson-core:jar:2.4.3
|
data/gen_config/api.conf
CHANGED
@@ -39,7 +39,9 @@ org.killbill.billing.util.callcontext, \
|
|
39
39
|
org.killbill.billing.util.customfield, \
|
40
40
|
org.killbill.billing.util.entity, \
|
41
41
|
org.killbill.billing.util.tag, \
|
42
|
+
org.killbill.billing.util.nodes, \
|
42
43
|
org.killbill.billing.security, \
|
44
|
+
org.killbill.billing.security.api, \
|
43
45
|
org.killbill.billing.currency.api \
|
44
46
|
-x \
|
45
47
|
ExportUserApi, \
|
@@ -1,4 +1,4 @@
|
|
1
|
-
jar 'org.kill-bill.billing:killbill-api', '0.
|
1
|
+
jar 'org.kill-bill.billing:killbill-api', '0.26'
|
2
2
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-currency', '0.16'
|
3
3
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-invoice', '0.16'
|
4
4
|
jar 'org.kill-bill.billing.plugin:killbill-plugin-api-notification', '0.16'
|
data/lib/killbill.rb
CHANGED
@@ -35,9 +35,13 @@ begin
|
|
35
35
|
org.killbill.billing.util.api.AuditUserApi
|
36
36
|
org.killbill.billing.util.api.CustomFieldUserApi
|
37
37
|
org.killbill.billing.util.api.TagUserApi
|
38
|
+
org.killbill.billing.security.api.SecurityApi
|
39
|
+
org.killbill.billing.osgi.api.PluginsInfoApi
|
40
|
+
org.killbill.billing.util.nodes.KillbillNodesApi
|
38
41
|
javax.servlet.http.HttpServlet
|
39
42
|
)
|
40
43
|
|
44
|
+
|
41
45
|
begin
|
42
46
|
IMPORT_KILLBILL_APIS.each { |api| java_import api }
|
43
47
|
rescue NameError
|
@@ -86,6 +86,50 @@ module Killbill
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
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::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
90
|
+
def create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, effectiveDate, properties, context)
|
91
|
+
|
92
|
+
# conversion for accountId [type = java.util.UUID]
|
93
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
94
|
+
|
95
|
+
# conversion for externalKey [type = java.lang.String]
|
96
|
+
externalKey = externalKey.to_s unless externalKey.nil?
|
97
|
+
|
98
|
+
# conversion for entitlementSpecifier [type = java.lang.Iterable]
|
99
|
+
tmp = java.util.ArrayList.new
|
100
|
+
(entitlementSpecifier || []).each do |m|
|
101
|
+
# conversion for m [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
|
102
|
+
m = m.to_java unless m.nil?
|
103
|
+
tmp.add(m)
|
104
|
+
end
|
105
|
+
entitlementSpecifier = tmp
|
106
|
+
|
107
|
+
# conversion for effectiveDate [type = org.joda.time.LocalDate]
|
108
|
+
if !effectiveDate.nil?
|
109
|
+
effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
|
110
|
+
end
|
111
|
+
|
112
|
+
# conversion for properties [type = java.lang.Iterable]
|
113
|
+
tmp = java.util.ArrayList.new
|
114
|
+
(properties || []).each do |m|
|
115
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
116
|
+
m = m.to_java unless m.nil?
|
117
|
+
tmp.add(m)
|
118
|
+
end
|
119
|
+
properties = tmp
|
120
|
+
|
121
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
122
|
+
context = context.to_java unless context.nil?
|
123
|
+
begin
|
124
|
+
res = @real_java_api.create_base_entitlement_with_add_ons(accountId, externalKey, entitlementSpecifier, effectiveDate, properties, context)
|
125
|
+
# conversion for res [type = org.killbill.billing.entitlement.api.Entitlement]
|
126
|
+
res = Killbill::Plugin::Model::Entitlement.new.to_ruby(res) unless res.nil?
|
127
|
+
return res
|
128
|
+
rescue Java::org.killbill.billing.entitlement.api.EntitlementApiException => e
|
129
|
+
raise Killbill::Plugin::Model::EntitlementApiException.new.to_ruby(e)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
89
133
|
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::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
90
134
|
def add_entitlement(bundleId, spec, overrides, effectiveDate, properties, context)
|
91
135
|
|
@@ -212,6 +256,72 @@ module Killbill
|
|
212
256
|
@real_java_api.resume(bundleId, effectiveDate, properties, context)
|
213
257
|
end
|
214
258
|
|
259
|
+
java_signature 'Java::void setBlockingState(Java::java.util.UUID, Java::java.lang.String, Java::java.lang.String, Java::org.joda.time.LocalDate, Java::boolean, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
260
|
+
def set_blocking_state(bundleId, stateName, serviceName, effectiveDate, blockBilling, blockEntitlement, blockChange, properties, context)
|
261
|
+
|
262
|
+
# conversion for bundleId [type = java.util.UUID]
|
263
|
+
bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
|
264
|
+
|
265
|
+
# conversion for stateName [type = java.lang.String]
|
266
|
+
stateName = stateName.to_s unless stateName.nil?
|
267
|
+
|
268
|
+
# conversion for serviceName [type = java.lang.String]
|
269
|
+
serviceName = serviceName.to_s unless serviceName.nil?
|
270
|
+
|
271
|
+
# conversion for effectiveDate [type = org.joda.time.LocalDate]
|
272
|
+
if !effectiveDate.nil?
|
273
|
+
effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
|
274
|
+
end
|
275
|
+
|
276
|
+
# conversion for blockBilling [type = boolean]
|
277
|
+
blockBilling = blockBilling.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockBilling)
|
278
|
+
|
279
|
+
# conversion for blockEntitlement [type = boolean]
|
280
|
+
blockEntitlement = blockEntitlement.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockEntitlement)
|
281
|
+
|
282
|
+
# conversion for blockChange [type = boolean]
|
283
|
+
blockChange = blockChange.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(blockChange)
|
284
|
+
|
285
|
+
# conversion for properties [type = java.lang.Iterable]
|
286
|
+
tmp = java.util.ArrayList.new
|
287
|
+
(properties || []).each do |m|
|
288
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
289
|
+
m = m.to_java unless m.nil?
|
290
|
+
tmp.add(m)
|
291
|
+
end
|
292
|
+
properties = tmp
|
293
|
+
|
294
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
295
|
+
context = context.to_java unless context.nil?
|
296
|
+
@real_java_api.set_blocking_state(bundleId, stateName, serviceName, effectiveDate, blockBilling, blockEntitlement, blockChange, properties, context)
|
297
|
+
end
|
298
|
+
|
299
|
+
java_signature 'Java::java.lang.Iterable getBlockingStatesForServiceAndType(Java::java.util.UUID, Java::org.killbill.billing.entitlement.api.BlockingStateType, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
300
|
+
def get_blocking_states_for_service_and_type(blockableId, type, serviceName, context)
|
301
|
+
|
302
|
+
# conversion for blockableId [type = java.util.UUID]
|
303
|
+
blockableId = java.util.UUID.fromString(blockableId.to_s) unless blockableId.nil?
|
304
|
+
|
305
|
+
# conversion for type [type = org.killbill.billing.entitlement.api.BlockingStateType]
|
306
|
+
type = Java::org.killbill.billing.entitlement.api.BlockingStateType.value_of( type.to_s ) unless type.nil?
|
307
|
+
|
308
|
+
# conversion for serviceName [type = java.lang.String]
|
309
|
+
serviceName = serviceName.to_s unless serviceName.nil?
|
310
|
+
|
311
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
312
|
+
context = context.to_java unless context.nil?
|
313
|
+
res = @real_java_api.get_blocking_states_for_service_and_type(blockableId, type, serviceName, context)
|
314
|
+
# conversion for res [type = java.lang.Iterable]
|
315
|
+
tmp = []
|
316
|
+
(res.nil? ? [] : res.iterator).each do |m|
|
317
|
+
# conversion for m [type = org.killbill.billing.entitlement.api.BlockingState]
|
318
|
+
m = Killbill::Plugin::Model::BlockingState.new.to_ruby(m) unless m.nil?
|
319
|
+
tmp << m
|
320
|
+
end
|
321
|
+
res = tmp
|
322
|
+
return res
|
323
|
+
end
|
324
|
+
|
215
325
|
java_signature 'Java::org.killbill.billing.entitlement.api.Entitlement getEntitlementForId(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
216
326
|
def get_entitlement_for_id(id, context)
|
217
327
|
|
@@ -0,0 +1,77 @@
|
|
1
|
+
#############################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
6
|
+
# #
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
9
|
+
# License. You may obtain a copy of the License at: #
|
10
|
+
# #
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
12
|
+
# #
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
16
|
+
# License for the specific language governing permissions and limitations #
|
17
|
+
# under the License. #
|
18
|
+
# #
|
19
|
+
#############################################################################################
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# DO NOT EDIT!!!
|
24
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
module Killbill
|
29
|
+
module Plugin
|
30
|
+
module Model
|
31
|
+
|
32
|
+
java_package 'org.killbill.billing.entitlement.api'
|
33
|
+
class EntitlementSpecifier
|
34
|
+
|
35
|
+
include org.killbill.billing.entitlement.api.EntitlementSpecifier
|
36
|
+
|
37
|
+
attr_accessor :plan_phase_specifier, :overrides
|
38
|
+
|
39
|
+
def initialize()
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_java()
|
43
|
+
# conversion for plan_phase_specifier [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
|
44
|
+
@plan_phase_specifier = @plan_phase_specifier.to_java unless @plan_phase_specifier.nil?
|
45
|
+
|
46
|
+
# conversion for overrides [type = java.util.List]
|
47
|
+
tmp = java.util.ArrayList.new
|
48
|
+
(@overrides || []).each do |m|
|
49
|
+
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
50
|
+
m = m.to_java unless m.nil?
|
51
|
+
tmp.add(m)
|
52
|
+
end
|
53
|
+
@overrides = tmp
|
54
|
+
self
|
55
|
+
end
|
56
|
+
|
57
|
+
def to_ruby(j_obj)
|
58
|
+
# conversion for plan_phase_specifier [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
|
59
|
+
@plan_phase_specifier = j_obj.plan_phase_specifier
|
60
|
+
@plan_phase_specifier = Killbill::Plugin::Model::PlanPhaseSpecifier.new.to_ruby(@plan_phase_specifier) unless @plan_phase_specifier.nil?
|
61
|
+
|
62
|
+
# conversion for overrides [type = java.util.List]
|
63
|
+
@overrides = j_obj.overrides
|
64
|
+
tmp = []
|
65
|
+
(@overrides || []).each do |m|
|
66
|
+
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
67
|
+
m = Killbill::Plugin::Model::PlanPhasePriceOverride.new.to_ruby(m) unless m.nil?
|
68
|
+
tmp << m
|
69
|
+
end
|
70
|
+
@overrides = tmp
|
71
|
+
self
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#############################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
6
|
+
# #
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
9
|
+
# License. You may obtain a copy of the License at: #
|
10
|
+
# #
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
12
|
+
# #
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
16
|
+
# License for the specific language governing permissions and limitations #
|
17
|
+
# under the License. #
|
18
|
+
# #
|
19
|
+
#############################################################################################
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# DO NOT EDIT!!!
|
24
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
module Killbill
|
29
|
+
module Plugin
|
30
|
+
module Api
|
31
|
+
|
32
|
+
java_package 'org.killbill.billing.util.nodes'
|
33
|
+
class KillbillNodesApi
|
34
|
+
|
35
|
+
include org.killbill.billing.util.nodes.KillbillNodesApi
|
36
|
+
|
37
|
+
def initialize(real_java_api)
|
38
|
+
@real_java_api = real_java_api
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
java_signature 'Java::java.lang.Iterable getNodesInfo()'
|
43
|
+
def get_nodes_info()
|
44
|
+
res = @real_java_api.get_nodes_info()
|
45
|
+
# conversion for res [type = java.lang.Iterable]
|
46
|
+
tmp = []
|
47
|
+
(res.nil? ? [] : res.iterator).each do |m|
|
48
|
+
# conversion for m [type = org.killbill.billing.util.nodes.NodeInfo]
|
49
|
+
m = Killbill::Plugin::Model::NodeInfo.new.to_ruby(m) unless m.nil?
|
50
|
+
tmp << m
|
51
|
+
end
|
52
|
+
res = tmp
|
53
|
+
return res
|
54
|
+
end
|
55
|
+
|
56
|
+
java_signature 'Java::void triggerNodeCommand(Java::org.killbill.billing.util.nodes.NodeCommand)'
|
57
|
+
def trigger_node_command(nodeCommand)
|
58
|
+
|
59
|
+
# conversion for nodeCommand [type = org.killbill.billing.util.nodes.NodeCommand]
|
60
|
+
nodeCommand = nodeCommand.to_java unless nodeCommand.nil?
|
61
|
+
@real_java_api.trigger_node_command(nodeCommand)
|
62
|
+
end
|
63
|
+
|
64
|
+
java_signature 'Java::void notifyPluginChanged(Java::org.killbill.billing.osgi.api.PluginInfo)'
|
65
|
+
def notify_plugin_changed(plugin)
|
66
|
+
|
67
|
+
# conversion for plugin [type = org.killbill.billing.osgi.api.PluginInfo]
|
68
|
+
plugin = plugin.to_java unless plugin.nil?
|
69
|
+
@real_java_api.notify_plugin_changed(plugin)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
#############################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
6
|
+
# #
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
9
|
+
# License. You may obtain a copy of the License at: #
|
10
|
+
# #
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
12
|
+
# #
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
16
|
+
# License for the specific language governing permissions and limitations #
|
17
|
+
# under the License. #
|
18
|
+
# #
|
19
|
+
#############################################################################################
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# DO NOT EDIT!!!
|
24
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
module Killbill
|
29
|
+
module Plugin
|
30
|
+
module Model
|
31
|
+
|
32
|
+
java_package 'org.killbill.billing.util.nodes'
|
33
|
+
class NodeCommand
|
34
|
+
|
35
|
+
include org.killbill.billing.util.nodes.NodeCommand
|
36
|
+
|
37
|
+
attr_accessor :is_system_command_type, :node_command_type, :node_command_metadata
|
38
|
+
|
39
|
+
def initialize()
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_java()
|
43
|
+
# conversion for is_system_command_type [type = boolean]
|
44
|
+
@is_system_command_type = @is_system_command_type.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_system_command_type)
|
45
|
+
|
46
|
+
# conversion for node_command_type [type = java.lang.String]
|
47
|
+
@node_command_type = @node_command_type.to_s unless @node_command_type.nil?
|
48
|
+
|
49
|
+
# conversion for node_command_metadata [type = org.killbill.billing.util.nodes.NodeCommandMetadata]
|
50
|
+
@node_command_metadata = @node_command_metadata.to_java unless @node_command_metadata.nil?
|
51
|
+
self
|
52
|
+
end
|
53
|
+
|
54
|
+
def to_ruby(j_obj)
|
55
|
+
# conversion for is_system_command_type [type = boolean]
|
56
|
+
@is_system_command_type = j_obj.is_system_command_type
|
57
|
+
if @is_system_command_type.nil?
|
58
|
+
@is_system_command_type = false
|
59
|
+
else
|
60
|
+
tmp_bool = (@is_system_command_type.java_kind_of? java.lang.Boolean) ? @is_system_command_type.boolean_value : @is_system_command_type
|
61
|
+
@is_system_command_type = tmp_bool ? true : false
|
62
|
+
end
|
63
|
+
|
64
|
+
# conversion for node_command_type [type = java.lang.String]
|
65
|
+
@node_command_type = j_obj.node_command_type
|
66
|
+
|
67
|
+
# conversion for node_command_metadata [type = org.killbill.billing.util.nodes.NodeCommandMetadata]
|
68
|
+
@node_command_metadata = j_obj.node_command_metadata
|
69
|
+
@node_command_metadata = Killbill::Plugin::Model::NodeCommandMetadata.new.to_ruby(@node_command_metadata) unless @node_command_metadata.nil?
|
70
|
+
self
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|