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.
@@ -0,0 +1,63 @@
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.osgi.api'
33
+ class PluginServiceInfo
34
+
35
+ include org.killbill.billing.osgi.api.PluginServiceInfo
36
+
37
+ attr_accessor :service_type_name, :registration_name
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for service_type_name [type = java.lang.String]
44
+ @service_type_name = @service_type_name.to_s unless @service_type_name.nil?
45
+
46
+ # conversion for registration_name [type = java.lang.String]
47
+ @registration_name = @registration_name.to_s unless @registration_name.nil?
48
+ self
49
+ end
50
+
51
+ def to_ruby(j_obj)
52
+ # conversion for service_type_name [type = java.lang.String]
53
+ @service_type_name = j_obj.service_type_name
54
+
55
+ # conversion for registration_name [type = java.lang.String]
56
+ @registration_name = j_obj.registration_name
57
+ self
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,75 @@
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.osgi.api'
33
+ class PluginsInfoApi
34
+
35
+ include org.killbill.billing.osgi.api.PluginsInfoApi
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 getPluginsInfo()'
43
+ def get_plugins_info()
44
+ res = @real_java_api.get_plugins_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.osgi.api.PluginInfo]
49
+ m = Killbill::Plugin::Model::PluginInfo.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 notifyOfStateChanged(Java::org.killbill.billing.osgi.api.PluginStateChange, Java::java.lang.String, Java::java.lang.String, Java::org.killbill.billing.osgi.api.config.PluginLanguage)'
57
+ def notify_of_state_changed(newState, pluginName, pluginVersion, pluginLanguage)
58
+
59
+ # conversion for newState [type = org.killbill.billing.osgi.api.PluginStateChange]
60
+ newState = Java::org.killbill.billing.osgi.api.PluginStateChange.value_of( newState.to_s ) unless newState.nil?
61
+
62
+ # conversion for pluginName [type = java.lang.String]
63
+ pluginName = pluginName.to_s unless pluginName.nil?
64
+
65
+ # conversion for pluginVersion [type = java.lang.String]
66
+ pluginVersion = pluginVersion.to_s unless pluginVersion.nil?
67
+
68
+ # conversion for pluginLanguage [type = org.killbill.billing.osgi.api.config.PluginLanguage]
69
+ pluginLanguage = Java::org.killbill.billing.osgi.api.config.PluginLanguage.value_of( pluginLanguage.to_s ) unless pluginLanguage.nil?
70
+ @real_java_api.notify_of_state_changed(newState, pluginName, pluginVersion, pluginLanguage)
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -84,6 +84,7 @@ require 'killbill/gen/api/entitlement'
84
84
  require 'killbill/gen/api/entitlement_ao_status_dry_run'
85
85
  require 'killbill/gen/api/entitlement_api'
86
86
  require 'killbill/gen/api/entitlement_api_exception'
87
+ require 'killbill/gen/api/entitlement_specifier'
87
88
  require 'killbill/gen/api/subscription'
88
89
  require 'killbill/gen/api/subscription_api'
89
90
  require 'killbill/gen/api/subscription_api_exception'
@@ -104,6 +105,9 @@ require 'killbill/gen/api/killbill_api'
104
105
  require 'killbill/gen/api/plugin_config_service_api'
105
106
  require 'killbill/gen/api/osgi_killbill'
106
107
  require 'killbill/gen/api/osgi_plugin_properties'
108
+ require 'killbill/gen/api/plugin_info'
109
+ require 'killbill/gen/api/plugin_service_info'
110
+ require 'killbill/gen/api/plugins_info_api'
107
111
  require 'killbill/gen/api/admin_payment_api'
108
112
  require 'killbill/gen/api/payment'
109
113
  require 'killbill/gen/api/payment_api'
@@ -115,6 +119,7 @@ require 'killbill/gen/api/payment_options'
115
119
  require 'killbill/gen/api/payment_transaction'
116
120
  require 'killbill/gen/api/plugin_property'
117
121
  require 'killbill/gen/api/refund'
122
+ require 'killbill/gen/api/security_api'
118
123
  require 'killbill/gen/api/security_api_exception'
119
124
  require 'killbill/gen/api/tenant'
120
125
  require 'killbill/gen/api/tenant_api_exception'
@@ -144,6 +149,12 @@ require 'killbill/gen/api/tenant_context'
144
149
  require 'killbill/gen/api/custom_field'
145
150
  require 'killbill/gen/api/entity'
146
151
  require 'killbill/gen/api/pagination'
152
+ require 'killbill/gen/api/killbill_nodes_api'
153
+ require 'killbill/gen/api/node_command'
154
+ require 'killbill/gen/api/node_command_metadata'
155
+ require 'killbill/gen/api/node_command_property'
156
+ require 'killbill/gen/api/node_info'
157
+ require 'killbill/gen/api/plugin_node_command_metadata'
147
158
  require 'killbill/gen/api/control_tag'
148
159
  require 'killbill/gen/api/tag'
149
160
  require 'killbill/gen/api/tag_definition'
@@ -0,0 +1,236 @@
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.security.api'
33
+ class SecurityApi
34
+
35
+ include org.killbill.billing.security.api.SecurityApi
36
+
37
+ def initialize(real_java_api)
38
+ @real_java_api = real_java_api
39
+ end
40
+
41
+
42
+ java_signature 'Java::void login(Java::java.lang.Object, Java::java.lang.Object)'
43
+ def login(principal, credentials)
44
+
45
+ # conversion for principal [type = java.lang.Object]
46
+ principal = principal.to_s unless principal.nil?
47
+
48
+ # conversion for credentials [type = java.lang.Object]
49
+ credentials = credentials.to_s unless credentials.nil?
50
+ @real_java_api.login(principal, credentials)
51
+ end
52
+
53
+ java_signature 'Java::void logout()'
54
+ def logout()
55
+ @real_java_api.logout()
56
+ end
57
+
58
+ java_signature 'Java::boolean isSubjectAuthenticated()'
59
+ def is_subject_authenticated()
60
+ res = @real_java_api.is_subject_authenticated()
61
+ # conversion for res [type = boolean]
62
+ if res.nil?
63
+ res = false
64
+ else
65
+ tmp_bool = (res.java_kind_of? java.lang.Boolean) ? res.boolean_value : res
66
+ res = tmp_bool ? true : false
67
+ end
68
+ return res
69
+ end
70
+
71
+ java_signature 'Java::java.util.Set getCurrentUserPermissions(Java::org.killbill.billing.util.callcontext.TenantContext)'
72
+ def get_current_user_permissions(context)
73
+
74
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
75
+ context = context.to_java unless context.nil?
76
+ res = @real_java_api.get_current_user_permissions(context)
77
+ # conversion for res [type = java.util.Set]
78
+ tmp = []
79
+ (res || []).each do |m|
80
+ # conversion for m [type = org.killbill.billing.security.Permission]
81
+ m = m.to_s.to_sym unless m.nil?
82
+ tmp << m
83
+ end
84
+ res = tmp
85
+ return res
86
+ end
87
+
88
+ java_signature 'Java::void checkCurrentUserPermissions(Java::java.util.List, Java::org.killbill.billing.security.Logical, Java::org.killbill.billing.util.callcontext.TenantContext)'
89
+ def check_current_user_permissions(permissions, logical, context)
90
+
91
+ # conversion for permissions [type = java.util.List]
92
+ tmp = java.util.ArrayList.new
93
+ (permissions || []).each do |m|
94
+ # conversion for m [type = org.killbill.billing.security.Permission]
95
+ m = Java::org.killbill.billing.security.Permission.value_of( m.to_s ) unless m.nil?
96
+ tmp.add(m)
97
+ end
98
+ permissions = tmp
99
+
100
+ # conversion for logical [type = org.killbill.billing.security.Logical]
101
+ logical = Java::org.killbill.billing.security.Logical.value_of( logical.to_s ) unless logical.nil?
102
+
103
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
104
+ context = context.to_java unless context.nil?
105
+ @real_java_api.check_current_user_permissions(permissions, logical, context)
106
+ end
107
+
108
+ java_signature 'Java::void addUserRoles(Java::java.lang.String, Java::java.lang.String, Java::java.util.List, Java::org.killbill.billing.util.callcontext.CallContext)'
109
+ def add_user_roles(username, clearPassword, roles, context)
110
+
111
+ # conversion for username [type = java.lang.String]
112
+ username = username.to_s unless username.nil?
113
+
114
+ # conversion for clearPassword [type = java.lang.String]
115
+ clearPassword = clearPassword.to_s unless clearPassword.nil?
116
+
117
+ # conversion for roles [type = java.util.List]
118
+ tmp = java.util.ArrayList.new
119
+ (roles || []).each do |m|
120
+ # conversion for m [type = java.lang.String]
121
+ m = m.to_s unless m.nil?
122
+ tmp.add(m)
123
+ end
124
+ roles = tmp
125
+
126
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
127
+ context = context.to_java unless context.nil?
128
+ @real_java_api.add_user_roles(username, clearPassword, roles, context)
129
+ end
130
+
131
+ java_signature 'Java::void updateUserPassword(Java::java.lang.String, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
132
+ def update_user_password(username, clearPassword, context)
133
+
134
+ # conversion for username [type = java.lang.String]
135
+ username = username.to_s unless username.nil?
136
+
137
+ # conversion for clearPassword [type = java.lang.String]
138
+ clearPassword = clearPassword.to_s unless clearPassword.nil?
139
+
140
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
141
+ context = context.to_java unless context.nil?
142
+ @real_java_api.update_user_password(username, clearPassword, context)
143
+ end
144
+
145
+ java_signature 'Java::void updateUserRoles(Java::java.lang.String, Java::java.util.List, Java::org.killbill.billing.util.callcontext.CallContext)'
146
+ def update_user_roles(username, roles, context)
147
+
148
+ # conversion for username [type = java.lang.String]
149
+ username = username.to_s unless username.nil?
150
+
151
+ # conversion for roles [type = java.util.List]
152
+ tmp = java.util.ArrayList.new
153
+ (roles || []).each do |m|
154
+ # conversion for m [type = java.lang.String]
155
+ m = m.to_s unless m.nil?
156
+ tmp.add(m)
157
+ end
158
+ roles = tmp
159
+
160
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
161
+ context = context.to_java unless context.nil?
162
+ @real_java_api.update_user_roles(username, roles, context)
163
+ end
164
+
165
+ java_signature 'Java::void invalidateUser(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
166
+ def invalidate_user(username, context)
167
+
168
+ # conversion for username [type = java.lang.String]
169
+ username = username.to_s unless username.nil?
170
+
171
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
172
+ context = context.to_java unless context.nil?
173
+ @real_java_api.invalidate_user(username, context)
174
+ end
175
+
176
+ java_signature 'Java::java.util.List getUserRoles(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
177
+ def get_user_roles(username, tenantContext)
178
+
179
+ # conversion for username [type = java.lang.String]
180
+ username = username.to_s unless username.nil?
181
+
182
+ # conversion for tenantContext [type = org.killbill.billing.util.callcontext.TenantContext]
183
+ tenantContext = tenantContext.to_java unless tenantContext.nil?
184
+ res = @real_java_api.get_user_roles(username, tenantContext)
185
+ # conversion for res [type = java.util.List]
186
+ tmp = []
187
+ (res || []).each do |m|
188
+ # conversion for m [type = java.lang.String]
189
+ tmp << m
190
+ end
191
+ res = tmp
192
+ return res
193
+ end
194
+
195
+ java_signature 'Java::void addRoleDefinition(Java::java.lang.String, Java::java.util.List, Java::org.killbill.billing.util.callcontext.CallContext)'
196
+ def add_role_definition(role, permissions, context)
197
+
198
+ # conversion for role [type = java.lang.String]
199
+ role = role.to_s unless role.nil?
200
+
201
+ # conversion for permissions [type = java.util.List]
202
+ tmp = java.util.ArrayList.new
203
+ (permissions || []).each do |m|
204
+ # conversion for m [type = java.lang.String]
205
+ m = m.to_s unless m.nil?
206
+ tmp.add(m)
207
+ end
208
+ permissions = tmp
209
+
210
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
211
+ context = context.to_java unless context.nil?
212
+ @real_java_api.add_role_definition(role, permissions, context)
213
+ end
214
+
215
+ java_signature 'Java::java.util.List getRoleDefinition(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
216
+ def get_role_definition(role, tenantContext)
217
+
218
+ # conversion for role [type = java.lang.String]
219
+ role = role.to_s unless role.nil?
220
+
221
+ # conversion for tenantContext [type = org.killbill.billing.util.callcontext.TenantContext]
222
+ tenantContext = tenantContext.to_java unless tenantContext.nil?
223
+ res = @real_java_api.get_role_definition(role, tenantContext)
224
+ # conversion for res [type = java.util.List]
225
+ tmp = []
226
+ (res || []).each do |m|
227
+ # conversion for m [type = java.lang.String]
228
+ tmp << m
229
+ end
230
+ res = tmp
231
+ return res
232
+ end
233
+ end
234
+ end
235
+ end
236
+ end
@@ -0,0 +1,67 @@
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
+ class BroadcastMetadata
33
+
34
+
35
+ attr_accessor :service, :command_type, :event_json
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for service [type = java.lang.String]
42
+ @service = @service.to_s unless @service.nil?
43
+
44
+ # conversion for command_type [type = java.lang.String]
45
+ @command_type = @command_type.to_s unless @command_type.nil?
46
+
47
+ # conversion for event_json [type = java.lang.String]
48
+ @event_json = @event_json.to_s unless @event_json.nil?
49
+ Java::org.killbill.billing.notification.plugin.api.BroadcastMetadata.new(@service, @command_type, @event_json)
50
+ end
51
+
52
+ def to_ruby(j_obj)
53
+ # conversion for service [type = java.lang.String]
54
+ @service = j_obj.service
55
+
56
+ # conversion for command_type [type = java.lang.String]
57
+ @command_type = j_obj.command_type
58
+
59
+ # conversion for event_json [type = java.lang.String]
60
+ @event_json = j_obj.event_json
61
+ self
62
+ end
63
+
64
+ end
65
+ end
66
+ end
67
+ end