killbill 1.0.19 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Jarfile +4 -2
- data/VERSION +1 -1
- data/killbill.gemspec +4 -3
- data/lib/killbill.rb +7 -51
- data/lib/killbill/creator.rb +10 -18
- data/lib/killbill/gen/account.rb +208 -27
- data/lib/killbill/gen/account_api_exception.rb +66 -0
- data/lib/killbill/gen/account_data.rb +166 -23
- data/lib/killbill/gen/account_email.rb +80 -8
- data/lib/killbill/gen/account_service.rb +55 -0
- data/lib/killbill/gen/account_user_api.rb +187 -0
- data/lib/killbill/gen/audit_user_api.rb +196 -0
- data/lib/killbill/gen/beatrix_service.rb +55 -0
- data/lib/killbill/gen/billing_exception_base.rb +66 -0
- data/lib/killbill/gen/blockable.rb +91 -0
- data/lib/killbill/gen/blocking_api_exception.rb +66 -0
- data/lib/killbill/gen/blocking_state.rb +150 -16
- data/lib/killbill/gen/call_context.rb +107 -13
- data/lib/killbill/gen/catalog.rb +76 -0
- data/lib/killbill/gen/catalog_api_exception.rb +66 -0
- data/lib/killbill/gen/catalog_service.rb +69 -0
- data/lib/killbill/gen/catalog_user_api.rb +54 -0
- data/lib/killbill/gen/column_info.rb +67 -0
- data/lib/killbill/gen/control_tag.rb +112 -0
- data/lib/killbill/gen/currency_value_null.rb +66 -0
- data/lib/killbill/gen/custom_field.rb +93 -10
- data/lib/killbill/gen/custom_field_api_exception.rb +66 -0
- data/lib/killbill/gen/custom_field_user_api.rb +115 -0
- data/lib/killbill/gen/database_export_output_stream.rb +51 -0
- data/lib/killbill/gen/default_mutable_account_data.rb +180 -0
- data/lib/killbill/gen/duration.rb +62 -0
- data/lib/killbill/gen/entitlement_service.rb +55 -0
- data/lib/killbill/gen/entitlement_user_api.rb +272 -0
- data/lib/killbill/gen/entitlement_user_api_exception.rb +66 -0
- data/lib/killbill/gen/entity.rb +84 -0
- data/lib/killbill/gen/entity_persistence_exception.rb +66 -0
- data/lib/killbill/gen/export_user_api.rb +17 -0
- data/lib/killbill/gen/ext_bus_event.rb +68 -9
- data/lib/killbill/gen/external_bus.rb +51 -0
- data/lib/killbill/gen/illegal_plan_change.rb +66 -0
- data/lib/killbill/gen/international_price.rb +79 -0
- data/lib/killbill/gen/invalid_config_exception.rb +49 -0
- data/lib/killbill/gen/invoice.rb +238 -23
- data/lib/killbill/gen/invoice_api_exception.rb +66 -0
- data/lib/killbill/gen/invoice_creation_event.rb +51 -0
- data/lib/killbill/gen/invoice_item.rb +179 -21
- data/lib/killbill/gen/invoice_migration_api.rb +66 -0
- data/lib/killbill/gen/invoice_notifier.rb +51 -0
- data/lib/killbill/gen/invoice_payment.rb +135 -15
- data/lib/killbill/gen/invoice_payment_api.rb +208 -0
- data/lib/killbill/gen/invoice_service.rb +55 -0
- data/lib/killbill/gen/invoice_user_api.rb +461 -0
- data/lib/killbill/gen/junction_api.rb +60 -0
- data/lib/killbill/gen/limit.rb +68 -0
- data/lib/killbill/gen/listing.rb +63 -0
- data/lib/killbill/gen/migration_account_data.rb +228 -0
- data/lib/killbill/gen/migration_plan.rb +143 -0
- data/lib/killbill/gen/mutable_account_data.rb +182 -0
- data/lib/killbill/gen/no_op_payment_plugin_api.rb +254 -0
- data/lib/killbill/gen/payment.rb +183 -20
- data/lib/killbill/gen/payment_api.rb +433 -0
- data/lib/killbill/gen/payment_api_exception.rb +66 -0
- data/lib/killbill/gen/payment_attempt.rb +100 -10
- data/lib/killbill/gen/payment_info_plugin.rb +103 -12
- data/lib/killbill/gen/payment_method.rb +116 -0
- data/lib/killbill/gen/payment_method_info_plugin.rb +64 -7
- data/lib/killbill/gen/payment_method_kv_info.rb +56 -6
- data/lib/killbill/gen/payment_method_plugin.rb +142 -20
- data/lib/killbill/gen/payment_plugin_api.rb +232 -0
- data/lib/killbill/gen/payment_plugin_api_exception.rb +59 -0
- data/lib/killbill/gen/payment_service.rb +62 -0
- data/lib/killbill/gen/plan.rb +143 -0
- data/lib/killbill/gen/plan_change_result.rb +68 -0
- data/lib/killbill/gen/plan_phase.rb +104 -0
- data/lib/killbill/gen/plan_phase_specifier.rb +80 -0
- data/lib/killbill/gen/plan_specifier.rb +73 -0
- data/lib/killbill/gen/price.rb +67 -0
- data/lib/killbill/gen/price_list.rb +74 -0
- data/lib/killbill/gen/price_list_set.rb +56 -0
- data/lib/killbill/gen/product.rb +101 -0
- data/lib/killbill/gen/record_id_api.rb +55 -0
- data/lib/killbill/gen/refund.rb +126 -13
- data/lib/killbill/gen/refund_info_plugin.rb +96 -10
- data/lib/killbill/gen/require_gen.rb +97 -15
- data/lib/killbill/gen/static_catalog.rb +137 -0
- data/lib/killbill/gen/subscription.rb +258 -28
- data/lib/killbill/gen/subscription_bundle.rb +94 -10
- data/lib/killbill/gen/subscription_status_dry_run.rb +89 -0
- data/lib/killbill/gen/subscription_transition.rb +196 -0
- data/lib/killbill/gen/tag.rb +88 -9
- data/lib/killbill/gen/tag_api_exception.rb +66 -0
- data/lib/killbill/gen/tag_definition.rb +110 -10
- data/lib/killbill/gen/tag_definition_api_exception.rb +66 -0
- data/lib/killbill/gen/tag_user_api.rb +239 -0
- data/lib/killbill/gen/tenant.rb +102 -0
- data/lib/killbill/gen/tenant_api_exception.rb +66 -0
- data/lib/killbill/gen/tenant_context.rb +39 -4
- data/lib/killbill/gen/tenant_data.rb +67 -0
- data/lib/killbill/gen/tenant_kv.rb +96 -0
- data/lib/killbill/gen/tenant_service.rb +55 -0
- data/lib/killbill/gen/tenant_user_api.rb +127 -0
- data/lib/killbill/gen/unit.rb +55 -0
- data/lib/killbill/jnotification.rb +1 -1
- data/lib/killbill/jpayment.rb +10 -7
- data/lib/killbill/jplugin.rb +63 -61
- data/lib/killbill/killbill_api.rb +42 -9
- data/spec/killbill/jnotification_spec.rb +15 -1
- data/spec/killbill/jpayment_spec.rb +12 -8
- data/spec/killbill/killbillapi_spec.rb +23 -21
- data/spec/killbill/payment_plugin_spec.rb +1 -9
- data/spec/killbill/payment_test.rb +21 -5
- metadata +96 -22
- data/lib/killbill/gen/audit_log.rb +0 -28
- data/lib/killbill/gen/call_origin.rb +0 -34
- data/lib/killbill/gen/currency.rb +0 -34
- data/lib/killbill/gen/date_time_zone.rb +0 -35
- data/lib/killbill/gen/ext_bus_event_type.rb +0 -34
- data/lib/killbill/gen/invoice_payment_type.rb +0 -34
- data/lib/killbill/gen/object_type.rb +0 -34
- data/lib/killbill/gen/payment_plugin_status.rb +0 -34
- data/lib/killbill/gen/refund_plugin_status.rb +0 -34
- data/lib/killbill/gen/subscription_source_type.rb +0 -34
- data/lib/killbill/gen/subscription_state.rb +0 -34
- data/lib/killbill/gen/user_type.rb +0 -34
- data/lib/killbill/gen/uuid.rb +0 -22
- data/lib/killbill/jconverter.rb +0 -537
- data/lib/killbill/jkillbill_api.rb +0 -137
- data/spec/killbill/jconverter_spec.rb +0 -193
@@ -0,0 +1,66 @@
|
|
1
|
+
###################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# #
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
7
|
+
# License. You may obtain a copy of the License at: #
|
8
|
+
# #
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
10
|
+
# #
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
14
|
+
# License for the specific language governing permissions and limitations #
|
15
|
+
# under the License. #
|
16
|
+
# #
|
17
|
+
###################################################################################
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# DO NOT EDIT!!!
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
23
|
+
#
|
24
|
+
|
25
|
+
|
26
|
+
module Killbill
|
27
|
+
module Plugin
|
28
|
+
module Model
|
29
|
+
|
30
|
+
class TagApiException
|
31
|
+
|
32
|
+
|
33
|
+
attr_accessor :message, :cause, :code
|
34
|
+
|
35
|
+
def initialize()
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_java()
|
39
|
+
# conversion for message [type = java.lang.String]
|
40
|
+
@message = @message.to_s unless @message.nil?
|
41
|
+
|
42
|
+
# conversion for cause [type = java.lang.Throwable]
|
43
|
+
@cause = @cause.to_s unless cause.nil?
|
44
|
+
|
45
|
+
# conversion for code [type = int]
|
46
|
+
@code = @code
|
47
|
+
Java::com.ning.billing.util.api.TagApiException.new(@message, @cause, @code)
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_ruby(j_obj)
|
51
|
+
# conversion for message [type = java.lang.String]
|
52
|
+
@message = j_obj.message
|
53
|
+
|
54
|
+
# conversion for cause [type = java.lang.Throwable]
|
55
|
+
@cause = j_obj.cause
|
56
|
+
@cause = @cause.to_s unless @cause.nil?
|
57
|
+
|
58
|
+
# conversion for code [type = int]
|
59
|
+
@code = j_obj.code
|
60
|
+
self
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -1,26 +1,126 @@
|
|
1
|
+
###################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# #
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
7
|
+
# License. You may obtain a copy of the License at: #
|
8
|
+
# #
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
10
|
+
# #
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
14
|
+
# License for the specific language governing permissions and limitations #
|
15
|
+
# under the License. #
|
16
|
+
# #
|
17
|
+
###################################################################################
|
18
|
+
|
1
19
|
|
2
20
|
#
|
3
|
-
#
|
21
|
+
# DO NOT EDIT!!!
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
4
23
|
#
|
24
|
+
|
25
|
+
|
5
26
|
module Killbill
|
6
27
|
module Plugin
|
7
28
|
module Model
|
8
29
|
|
30
|
+
java_package 'com.ning.billing.util.tag'
|
9
31
|
class TagDefinition
|
10
32
|
|
11
33
|
include com.ning.billing.util.tag.TagDefinition
|
12
34
|
|
13
|
-
|
35
|
+
attr_accessor :id, :created_date, :updated_date, :name, :description, :is_control_tag, :applicable_object_types
|
36
|
+
|
37
|
+
def initialize()
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_java()
|
41
|
+
# conversion for id [type = java.util.UUID]
|
42
|
+
@id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
|
43
|
+
|
44
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
45
|
+
if !@created_date.nil?
|
46
|
+
@created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
|
47
|
+
@created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
48
|
+
end
|
49
|
+
|
50
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
51
|
+
if !@updated_date.nil?
|
52
|
+
@updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
|
53
|
+
@updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
54
|
+
end
|
55
|
+
|
56
|
+
# conversion for name [type = java.lang.String]
|
57
|
+
@name = @name.to_s unless @name.nil?
|
58
|
+
|
59
|
+
# conversion for description [type = java.lang.String]
|
60
|
+
@description = @description.to_s unless @description.nil?
|
14
61
|
|
15
|
-
|
16
|
-
@
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
@
|
21
|
-
|
22
|
-
|
62
|
+
# conversion for is_control_tag [type = java.lang.Boolean]
|
63
|
+
@is_control_tag = @is_control_tag.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_control_tag)
|
64
|
+
|
65
|
+
# conversion for applicable_object_types [type = java.util.List]
|
66
|
+
tmp = java.util.ArrayList.new
|
67
|
+
(@applicable_object_types || []).each do |m|
|
68
|
+
# conversion for m [type = com.ning.billing.ObjectType]
|
69
|
+
m = Java::com.ning.billing.ObjectType.value_of("#{m.to_s}") unless m.nil?
|
70
|
+
tmp.add(m)
|
71
|
+
end
|
72
|
+
@applicable_object_types = tmp
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
def to_ruby(j_obj)
|
77
|
+
# conversion for id [type = java.util.UUID]
|
78
|
+
@id = j_obj.id
|
79
|
+
@id = @id.nil? ? nil : @id.to_s
|
80
|
+
|
81
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
82
|
+
@created_date = j_obj.created_date
|
83
|
+
if !@created_date.nil?
|
84
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
85
|
+
str = fmt.print(@created_date)
|
86
|
+
@created_date = DateTime.iso8601(str)
|
87
|
+
end
|
88
|
+
|
89
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
90
|
+
@updated_date = j_obj.updated_date
|
91
|
+
if !@updated_date.nil?
|
92
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
93
|
+
str = fmt.print(@updated_date)
|
94
|
+
@updated_date = DateTime.iso8601(str)
|
95
|
+
end
|
96
|
+
|
97
|
+
# conversion for name [type = java.lang.String]
|
98
|
+
@name = j_obj.name
|
99
|
+
|
100
|
+
# conversion for description [type = java.lang.String]
|
101
|
+
@description = j_obj.description
|
102
|
+
|
103
|
+
# conversion for is_control_tag [type = java.lang.Boolean]
|
104
|
+
@is_control_tag = j_obj.is_control_tag
|
105
|
+
if @is_control_tag.nil?
|
106
|
+
@is_control_tag = false
|
107
|
+
else
|
108
|
+
tmp_bool = (@is_control_tag.java_kind_of? java.lang.Boolean) ? @is_control_tag.boolean_value : @is_control_tag
|
109
|
+
@is_control_tag = tmp_bool ? true : false
|
110
|
+
end
|
111
|
+
|
112
|
+
# conversion for applicable_object_types [type = java.util.List]
|
113
|
+
@applicable_object_types = j_obj.applicable_object_types
|
114
|
+
tmp = []
|
115
|
+
(@applicable_object_types || []).each do |m|
|
116
|
+
# conversion for m [type = com.ning.billing.ObjectType]
|
117
|
+
m = m.to_s.to_sym unless m.nil?
|
118
|
+
tmp << m
|
119
|
+
end
|
120
|
+
@applicable_object_types = tmp
|
121
|
+
self
|
23
122
|
end
|
123
|
+
|
24
124
|
end
|
25
125
|
end
|
26
126
|
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
###################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# #
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
7
|
+
# License. You may obtain a copy of the License at: #
|
8
|
+
# #
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
10
|
+
# #
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
14
|
+
# License for the specific language governing permissions and limitations #
|
15
|
+
# under the License. #
|
16
|
+
# #
|
17
|
+
###################################################################################
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# DO NOT EDIT!!!
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
23
|
+
#
|
24
|
+
|
25
|
+
|
26
|
+
module Killbill
|
27
|
+
module Plugin
|
28
|
+
module Model
|
29
|
+
|
30
|
+
class TagDefinitionApiException
|
31
|
+
|
32
|
+
|
33
|
+
attr_accessor :message, :cause, :code
|
34
|
+
|
35
|
+
def initialize()
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_java()
|
39
|
+
# conversion for message [type = java.lang.String]
|
40
|
+
@message = @message.to_s unless @message.nil?
|
41
|
+
|
42
|
+
# conversion for cause [type = java.lang.Throwable]
|
43
|
+
@cause = @cause.to_s unless cause.nil?
|
44
|
+
|
45
|
+
# conversion for code [type = int]
|
46
|
+
@code = @code
|
47
|
+
Java::com.ning.billing.util.api.TagDefinitionApiException.new(@message, @cause, @code)
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_ruby(j_obj)
|
51
|
+
# conversion for message [type = java.lang.String]
|
52
|
+
@message = j_obj.message
|
53
|
+
|
54
|
+
# conversion for cause [type = java.lang.Throwable]
|
55
|
+
@cause = j_obj.cause
|
56
|
+
@cause = @cause.to_s unless @cause.nil?
|
57
|
+
|
58
|
+
# conversion for code [type = int]
|
59
|
+
@code = j_obj.code
|
60
|
+
self
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,239 @@
|
|
1
|
+
###################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# #
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
7
|
+
# License. You may obtain a copy of the License at: #
|
8
|
+
# #
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
10
|
+
# #
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
14
|
+
# License for the specific language governing permissions and limitations #
|
15
|
+
# under the License. #
|
16
|
+
# #
|
17
|
+
###################################################################################
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# DO NOT EDIT!!!
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
23
|
+
#
|
24
|
+
|
25
|
+
|
26
|
+
module Killbill
|
27
|
+
module Plugin
|
28
|
+
module Api
|
29
|
+
|
30
|
+
java_package 'com.ning.billing.util.api'
|
31
|
+
class TagUserApi
|
32
|
+
|
33
|
+
include com.ning.billing.util.api.TagUserApi
|
34
|
+
|
35
|
+
def initialize(real_java_api)
|
36
|
+
@real_java_api = real_java_api
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
java_signature 'Java::java.util.List getTagDefinitions(Java::com.ning.billing.util.callcontext.TenantContext)'
|
41
|
+
def get_tag_definitions(context)
|
42
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
43
|
+
context = context.to_java unless context.nil?
|
44
|
+
res = @real_java_api.get_tag_definitions(context)
|
45
|
+
# conversion for res [type = java.util.List]
|
46
|
+
tmp = []
|
47
|
+
(res || []).each do |m|
|
48
|
+
# conversion for m [type = com.ning.billing.util.tag.TagDefinition]
|
49
|
+
m = Killbill::Plugin::Model::TagDefinition.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::com.ning.billing.util.tag.TagDefinition createTagDefinition(Java::java.lang.String, Java::java.lang.String, Java::com.ning.billing.util.callcontext.CallContext)'
|
57
|
+
def create_tag_definition(definitionName, description, context)
|
58
|
+
# conversion for definitionName [type = java.lang.String]
|
59
|
+
definitionName = definitionName.to_s unless definitionName.nil?
|
60
|
+
# conversion for description [type = java.lang.String]
|
61
|
+
description = description.to_s unless description.nil?
|
62
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
63
|
+
context = context.to_java unless context.nil?
|
64
|
+
begin
|
65
|
+
res = @real_java_api.create_tag_definition(definitionName, description, context)
|
66
|
+
# conversion for res [type = com.ning.billing.util.tag.TagDefinition]
|
67
|
+
res = Killbill::Plugin::Model::TagDefinition.new.to_ruby(res) unless res.nil?
|
68
|
+
return res
|
69
|
+
rescue Java::com.ning.billing.util.api.TagDefinitionApiException => e
|
70
|
+
raise Killbill::Plugin::Model::TagDefinitionApiException.new.to_ruby(e)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
java_signature 'Java::void deleteTagDefinition(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.CallContext)'
|
75
|
+
def delete_tag_definition(tagDefinitionId, context)
|
76
|
+
# conversion for tagDefinitionId [type = java.util.UUID]
|
77
|
+
tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
|
78
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
79
|
+
context = context.to_java unless context.nil?
|
80
|
+
@real_java_api.delete_tag_definition(tagDefinitionId, context)
|
81
|
+
end
|
82
|
+
|
83
|
+
java_signature 'Java::com.ning.billing.util.tag.TagDefinition getTagDefinition(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
|
84
|
+
def get_tag_definition(tagDefinitionId, context)
|
85
|
+
# conversion for tagDefinitionId [type = java.util.UUID]
|
86
|
+
tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
|
87
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
88
|
+
context = context.to_java unless context.nil?
|
89
|
+
begin
|
90
|
+
res = @real_java_api.get_tag_definition(tagDefinitionId, context)
|
91
|
+
# conversion for res [type = com.ning.billing.util.tag.TagDefinition]
|
92
|
+
res = Killbill::Plugin::Model::TagDefinition.new.to_ruby(res) unless res.nil?
|
93
|
+
return res
|
94
|
+
rescue Java::com.ning.billing.util.api.TagDefinitionApiException => e
|
95
|
+
raise Killbill::Plugin::Model::TagDefinitionApiException.new.to_ruby(e)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
java_signature 'Java::com.ning.billing.util.tag.TagDefinition getTagDefinitionForName(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
|
100
|
+
def get_tag_definition_for_name(tageDefinitionName, context)
|
101
|
+
# conversion for tageDefinitionName [type = java.lang.String]
|
102
|
+
tageDefinitionName = tageDefinitionName.to_s unless tageDefinitionName.nil?
|
103
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
104
|
+
context = context.to_java unless context.nil?
|
105
|
+
begin
|
106
|
+
res = @real_java_api.get_tag_definition_for_name(tageDefinitionName, context)
|
107
|
+
# conversion for res [type = com.ning.billing.util.tag.TagDefinition]
|
108
|
+
res = Killbill::Plugin::Model::TagDefinition.new.to_ruby(res) unless res.nil?
|
109
|
+
return res
|
110
|
+
rescue Java::com.ning.billing.util.api.TagDefinitionApiException => e
|
111
|
+
raise Killbill::Plugin::Model::TagDefinitionApiException.new.to_ruby(e)
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
java_signature 'Java::void addTags(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::java.util.Collection, Java::com.ning.billing.util.callcontext.CallContext)'
|
116
|
+
def add_tags(objectId, objectType, tagDefinitionIds, context)
|
117
|
+
# conversion for objectId [type = java.util.UUID]
|
118
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
119
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
120
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
121
|
+
# conversion for tagDefinitionIds [type = java.util.Collection]
|
122
|
+
tmp = java.util.ArrayList.new
|
123
|
+
(tagDefinitionIds || []).each do |m|
|
124
|
+
# conversion for m [type = java.util.UUID]
|
125
|
+
m = java.util.UUID.fromString(m.to_s) unless m.nil?
|
126
|
+
tmp.add(m)
|
127
|
+
end
|
128
|
+
tagDefinitionIds = tmp
|
129
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
130
|
+
context = context.to_java unless context.nil?
|
131
|
+
@real_java_api.add_tags(objectId, objectType, tagDefinitionIds, context)
|
132
|
+
end
|
133
|
+
|
134
|
+
java_signature 'Java::void addTag(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::java.util.UUID, Java::com.ning.billing.util.callcontext.CallContext)'
|
135
|
+
def add_tag(objectId, objectType, tagDefinitionId, context)
|
136
|
+
# conversion for objectId [type = java.util.UUID]
|
137
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
138
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
139
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
140
|
+
# conversion for tagDefinitionId [type = java.util.UUID]
|
141
|
+
tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
|
142
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
143
|
+
context = context.to_java unless context.nil?
|
144
|
+
@real_java_api.add_tag(objectId, objectType, tagDefinitionId, context)
|
145
|
+
end
|
146
|
+
|
147
|
+
java_signature 'Java::void removeTags(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::java.util.Collection, Java::com.ning.billing.util.callcontext.CallContext)'
|
148
|
+
def remove_tags(objectId, objectType, tagDefinitions, context)
|
149
|
+
# conversion for objectId [type = java.util.UUID]
|
150
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
151
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
152
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
153
|
+
# conversion for tagDefinitions [type = java.util.Collection]
|
154
|
+
tmp = java.util.ArrayList.new
|
155
|
+
(tagDefinitions || []).each do |m|
|
156
|
+
# conversion for m [type = java.util.UUID]
|
157
|
+
m = java.util.UUID.fromString(m.to_s) unless m.nil?
|
158
|
+
tmp.add(m)
|
159
|
+
end
|
160
|
+
tagDefinitions = tmp
|
161
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
162
|
+
context = context.to_java unless context.nil?
|
163
|
+
@real_java_api.remove_tags(objectId, objectType, tagDefinitions, context)
|
164
|
+
end
|
165
|
+
|
166
|
+
java_signature 'Java::void removeTag(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::java.util.UUID, Java::com.ning.billing.util.callcontext.CallContext)'
|
167
|
+
def remove_tag(objectId, objectType, tagDefinitionId, context)
|
168
|
+
# conversion for objectId [type = java.util.UUID]
|
169
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
170
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
171
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
172
|
+
# conversion for tagDefinitionId [type = java.util.UUID]
|
173
|
+
tagDefinitionId = java.util.UUID.fromString(tagDefinitionId.to_s) unless tagDefinitionId.nil?
|
174
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
175
|
+
context = context.to_java unless context.nil?
|
176
|
+
@real_java_api.remove_tag(objectId, objectType, tagDefinitionId, context)
|
177
|
+
end
|
178
|
+
|
179
|
+
java_signature 'Java::java.util.List getTagsForObject(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::com.ning.billing.util.callcontext.TenantContext)'
|
180
|
+
def get_tags_for_object(objectId, objectType, context)
|
181
|
+
# conversion for objectId [type = java.util.UUID]
|
182
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
183
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
184
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
185
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
186
|
+
context = context.to_java unless context.nil?
|
187
|
+
res = @real_java_api.get_tags_for_object(objectId, objectType, context)
|
188
|
+
# conversion for res [type = java.util.List]
|
189
|
+
tmp = []
|
190
|
+
(res || []).each do |m|
|
191
|
+
# conversion for m [type = com.ning.billing.util.tag.Tag]
|
192
|
+
m = Killbill::Plugin::Model::Tag.new.to_ruby(m) unless m.nil?
|
193
|
+
tmp << m
|
194
|
+
end
|
195
|
+
res = tmp
|
196
|
+
return res
|
197
|
+
end
|
198
|
+
|
199
|
+
java_signature 'Java::java.util.List getTagsForAccountType(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::com.ning.billing.util.callcontext.TenantContext)'
|
200
|
+
def get_tags_for_account_type(accountId, objectType, context)
|
201
|
+
# conversion for accountId [type = java.util.UUID]
|
202
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
203
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
204
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
205
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
206
|
+
context = context.to_java unless context.nil?
|
207
|
+
res = @real_java_api.get_tags_for_account_type(accountId, objectType, context)
|
208
|
+
# conversion for res [type = java.util.List]
|
209
|
+
tmp = []
|
210
|
+
(res || []).each do |m|
|
211
|
+
# conversion for m [type = com.ning.billing.util.tag.Tag]
|
212
|
+
m = Killbill::Plugin::Model::Tag.new.to_ruby(m) unless m.nil?
|
213
|
+
tmp << m
|
214
|
+
end
|
215
|
+
res = tmp
|
216
|
+
return res
|
217
|
+
end
|
218
|
+
|
219
|
+
java_signature 'Java::java.util.List getTagsForAccount(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
|
220
|
+
def get_tags_for_account(accountId, context)
|
221
|
+
# conversion for accountId [type = java.util.UUID]
|
222
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
223
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
224
|
+
context = context.to_java unless context.nil?
|
225
|
+
res = @real_java_api.get_tags_for_account(accountId, context)
|
226
|
+
# conversion for res [type = java.util.List]
|
227
|
+
tmp = []
|
228
|
+
(res || []).each do |m|
|
229
|
+
# conversion for m [type = com.ning.billing.util.tag.Tag]
|
230
|
+
m = Killbill::Plugin::Model::Tag.new.to_ruby(m) unless m.nil?
|
231
|
+
tmp << m
|
232
|
+
end
|
233
|
+
res = tmp
|
234
|
+
return res
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|