killbill 1.0.19 → 1.1.1
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.
- 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
|
@@ -1,31 +1,165 @@
|
|
|
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.junction.api'
|
|
9
31
|
class BlockingState
|
|
10
32
|
|
|
11
33
|
include com.ning.billing.junction.api.BlockingState
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def initialize(
|
|
16
|
-
@id = id
|
|
17
|
-
@created_date = created_date
|
|
18
|
-
@updated_date = updated_date
|
|
19
|
-
@blocked_id = blocked_id
|
|
20
|
-
@state_name = state_name
|
|
21
|
-
@type = type
|
|
22
|
-
@timestamp = timestamp
|
|
23
|
-
@is_block_change = is_block_change
|
|
24
|
-
@is_block_entitlement = is_block_entitlement
|
|
25
|
-
@is_block_billing = is_block_billing
|
|
26
|
-
@description = description
|
|
27
|
-
@service = service
|
|
35
|
+
attr_accessor :id, :created_date, :updated_date, :blocked_id, :state_name, :type, :timestamp, :is_block_change, :is_block_entitlement, :is_block_billing, :description, :service
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
28
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 blocked_id [type = java.util.UUID]
|
|
57
|
+
@blocked_id = java.util.UUID.fromString(@blocked_id.to_s) unless @blocked_id.nil?
|
|
58
|
+
|
|
59
|
+
# conversion for state_name [type = java.lang.String]
|
|
60
|
+
@state_name = @state_name.to_s unless @state_name.nil?
|
|
61
|
+
|
|
62
|
+
# conversion for type [type = com.ning.billing.junction.api.Type]
|
|
63
|
+
@type = Java::com.ning.billing.junction.api.Type.value_of("#{@type.to_s}") unless @type.nil?
|
|
64
|
+
|
|
65
|
+
# conversion for timestamp [type = org.joda.time.DateTime]
|
|
66
|
+
if !@timestamp.nil?
|
|
67
|
+
@timestamp = (@timestamp.kind_of? Time) ? DateTime.parse(@timestamp.to_s) : @timestamp
|
|
68
|
+
@timestamp = Java::org.joda.time.DateTime.new(@timestamp.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# conversion for is_block_change [type = boolean]
|
|
72
|
+
@is_block_change = @is_block_change.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_block_change)
|
|
73
|
+
|
|
74
|
+
# conversion for is_block_entitlement [type = boolean]
|
|
75
|
+
@is_block_entitlement = @is_block_entitlement.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_block_entitlement)
|
|
76
|
+
|
|
77
|
+
# conversion for is_block_billing [type = boolean]
|
|
78
|
+
@is_block_billing = @is_block_billing.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_block_billing)
|
|
79
|
+
|
|
80
|
+
# conversion for description [type = java.lang.String]
|
|
81
|
+
@description = @description.to_s unless @description.nil?
|
|
82
|
+
|
|
83
|
+
# conversion for service [type = java.lang.String]
|
|
84
|
+
@service = @service.to_s unless @service.nil?
|
|
85
|
+
self
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def to_ruby(j_obj)
|
|
89
|
+
# conversion for id [type = java.util.UUID]
|
|
90
|
+
@id = j_obj.id
|
|
91
|
+
@id = @id.nil? ? nil : @id.to_s
|
|
92
|
+
|
|
93
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
|
94
|
+
@created_date = j_obj.created_date
|
|
95
|
+
if !@created_date.nil?
|
|
96
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
97
|
+
str = fmt.print(@created_date)
|
|
98
|
+
@created_date = DateTime.iso8601(str)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
|
102
|
+
@updated_date = j_obj.updated_date
|
|
103
|
+
if !@updated_date.nil?
|
|
104
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
105
|
+
str = fmt.print(@updated_date)
|
|
106
|
+
@updated_date = DateTime.iso8601(str)
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# conversion for blocked_id [type = java.util.UUID]
|
|
110
|
+
@blocked_id = j_obj.blocked_id
|
|
111
|
+
@blocked_id = @blocked_id.nil? ? nil : @blocked_id.to_s
|
|
112
|
+
|
|
113
|
+
# conversion for state_name [type = java.lang.String]
|
|
114
|
+
@state_name = j_obj.state_name
|
|
115
|
+
|
|
116
|
+
# conversion for type [type = com.ning.billing.junction.api.Type]
|
|
117
|
+
@type = j_obj.type
|
|
118
|
+
@type = @type.to_s.to_sym unless @type.nil?
|
|
119
|
+
|
|
120
|
+
# conversion for timestamp [type = org.joda.time.DateTime]
|
|
121
|
+
@timestamp = j_obj.timestamp
|
|
122
|
+
if !@timestamp.nil?
|
|
123
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
124
|
+
str = fmt.print(@timestamp)
|
|
125
|
+
@timestamp = DateTime.iso8601(str)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# conversion for is_block_change [type = boolean]
|
|
129
|
+
@is_block_change = j_obj.is_block_change
|
|
130
|
+
if @is_block_change.nil?
|
|
131
|
+
@is_block_change = false
|
|
132
|
+
else
|
|
133
|
+
tmp_bool = (@is_block_change.java_kind_of? java.lang.Boolean) ? @is_block_change.boolean_value : @is_block_change
|
|
134
|
+
@is_block_change = tmp_bool ? true : false
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# conversion for is_block_entitlement [type = boolean]
|
|
138
|
+
@is_block_entitlement = j_obj.is_block_entitlement
|
|
139
|
+
if @is_block_entitlement.nil?
|
|
140
|
+
@is_block_entitlement = false
|
|
141
|
+
else
|
|
142
|
+
tmp_bool = (@is_block_entitlement.java_kind_of? java.lang.Boolean) ? @is_block_entitlement.boolean_value : @is_block_entitlement
|
|
143
|
+
@is_block_entitlement = tmp_bool ? true : false
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# conversion for is_block_billing [type = boolean]
|
|
147
|
+
@is_block_billing = j_obj.is_block_billing
|
|
148
|
+
if @is_block_billing.nil?
|
|
149
|
+
@is_block_billing = false
|
|
150
|
+
else
|
|
151
|
+
tmp_bool = (@is_block_billing.java_kind_of? java.lang.Boolean) ? @is_block_billing.boolean_value : @is_block_billing
|
|
152
|
+
@is_block_billing = tmp_bool ? true : false
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# conversion for description [type = java.lang.String]
|
|
156
|
+
@description = j_obj.description
|
|
157
|
+
|
|
158
|
+
# conversion for service [type = java.lang.String]
|
|
159
|
+
@service = j_obj.service
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
29
163
|
end
|
|
30
164
|
end
|
|
31
165
|
end
|
|
@@ -1,28 +1,122 @@
|
|
|
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.callcontext'
|
|
9
31
|
class CallContext
|
|
10
32
|
|
|
11
33
|
include com.ning.billing.util.callcontext.CallContext
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def initialize(
|
|
16
|
-
@tenant_id = tenant_id
|
|
17
|
-
@user_token = user_token
|
|
18
|
-
@user_name = user_name
|
|
19
|
-
@call_origin = call_origin
|
|
20
|
-
@user_type = user_type
|
|
21
|
-
@reason_code = reason_code
|
|
22
|
-
@comments = comments
|
|
23
|
-
@created_date = created_date
|
|
24
|
-
@updated_date = updated_date
|
|
35
|
+
attr_accessor :tenant_id, :user_token, :user_name, :call_origin, :user_type, :reason_code, :comments, :created_date, :updated_date
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
25
38
|
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for tenant_id [type = java.util.UUID]
|
|
42
|
+
@tenant_id = java.util.UUID.fromString(@tenant_id.to_s) unless @tenant_id.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for user_token [type = java.util.UUID]
|
|
45
|
+
@user_token = java.util.UUID.fromString(@user_token.to_s) unless @user_token.nil?
|
|
46
|
+
|
|
47
|
+
# conversion for user_name [type = java.lang.String]
|
|
48
|
+
@user_name = @user_name.to_s unless @user_name.nil?
|
|
49
|
+
|
|
50
|
+
# conversion for call_origin [type = com.ning.billing.util.callcontext.CallOrigin]
|
|
51
|
+
@call_origin = Java::com.ning.billing.util.callcontext.CallOrigin.value_of("#{@call_origin.to_s}") unless @call_origin.nil?
|
|
52
|
+
|
|
53
|
+
# conversion for user_type [type = com.ning.billing.util.callcontext.UserType]
|
|
54
|
+
@user_type = Java::com.ning.billing.util.callcontext.UserType.value_of("#{@user_type.to_s}") unless @user_type.nil?
|
|
55
|
+
|
|
56
|
+
# conversion for reason_code [type = java.lang.String]
|
|
57
|
+
@reason_code = @reason_code.to_s unless @reason_code.nil?
|
|
58
|
+
|
|
59
|
+
# conversion for comments [type = java.lang.String]
|
|
60
|
+
@comments = @comments.to_s unless @comments.nil?
|
|
61
|
+
|
|
62
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
|
63
|
+
if !@created_date.nil?
|
|
64
|
+
@created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
|
|
65
|
+
@created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
|
69
|
+
if !@updated_date.nil?
|
|
70
|
+
@updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
|
|
71
|
+
@updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
|
72
|
+
end
|
|
73
|
+
self
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def to_ruby(j_obj)
|
|
77
|
+
# conversion for tenant_id [type = java.util.UUID]
|
|
78
|
+
@tenant_id = j_obj.tenant_id
|
|
79
|
+
@tenant_id = @tenant_id.nil? ? nil : @tenant_id.to_s
|
|
80
|
+
|
|
81
|
+
# conversion for user_token [type = java.util.UUID]
|
|
82
|
+
@user_token = j_obj.user_token
|
|
83
|
+
@user_token = @user_token.nil? ? nil : @user_token.to_s
|
|
84
|
+
|
|
85
|
+
# conversion for user_name [type = java.lang.String]
|
|
86
|
+
@user_name = j_obj.user_name
|
|
87
|
+
|
|
88
|
+
# conversion for call_origin [type = com.ning.billing.util.callcontext.CallOrigin]
|
|
89
|
+
@call_origin = j_obj.call_origin
|
|
90
|
+
@call_origin = @call_origin.to_s.to_sym unless @call_origin.nil?
|
|
91
|
+
|
|
92
|
+
# conversion for user_type [type = com.ning.billing.util.callcontext.UserType]
|
|
93
|
+
@user_type = j_obj.user_type
|
|
94
|
+
@user_type = @user_type.to_s.to_sym unless @user_type.nil?
|
|
95
|
+
|
|
96
|
+
# conversion for reason_code [type = java.lang.String]
|
|
97
|
+
@reason_code = j_obj.reason_code
|
|
98
|
+
|
|
99
|
+
# conversion for comments [type = java.lang.String]
|
|
100
|
+
@comments = j_obj.comments
|
|
101
|
+
|
|
102
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
|
103
|
+
@created_date = j_obj.created_date
|
|
104
|
+
if !@created_date.nil?
|
|
105
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
106
|
+
str = fmt.print(@created_date)
|
|
107
|
+
@created_date = DateTime.iso8601(str)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
|
111
|
+
@updated_date = j_obj.updated_date
|
|
112
|
+
if !@updated_date.nil?
|
|
113
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
114
|
+
str = fmt.print(@updated_date)
|
|
115
|
+
@updated_date = DateTime.iso8601(str)
|
|
116
|
+
end
|
|
117
|
+
self
|
|
118
|
+
end
|
|
119
|
+
|
|
26
120
|
end
|
|
27
121
|
end
|
|
28
122
|
end
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
java_package 'com.ning.billing.catalog.api'
|
|
31
|
+
class Catalog
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.catalog.api.Catalog
|
|
34
|
+
|
|
35
|
+
attr_accessor :catalog_name, :supported_currencies, :products, :plans
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for catalog_name [type = java.lang.String]
|
|
42
|
+
@catalog_name = @catalog_name.to_s unless @catalog_name.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for supported_currencies [type = com.ning.billing.catalog.api.Currency]
|
|
45
|
+
@supported_currencies = Java::com.ning.billing.catalog.api.Currency.value_of("#{@supported_currencies.to_s}") unless @supported_currencies.nil?
|
|
46
|
+
|
|
47
|
+
# conversion for products [type = com.ning.billing.catalog.api.Product]
|
|
48
|
+
@products = @products.to_java unless @products.nil?
|
|
49
|
+
|
|
50
|
+
# conversion for plans [type = com.ning.billing.catalog.api.Plan]
|
|
51
|
+
@plans = @plans.to_java unless @plans.nil?
|
|
52
|
+
self
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def to_ruby(j_obj)
|
|
56
|
+
# conversion for catalog_name [type = java.lang.String]
|
|
57
|
+
@catalog_name = j_obj.catalog_name
|
|
58
|
+
|
|
59
|
+
# conversion for supported_currencies [type = com.ning.billing.catalog.api.Currency]
|
|
60
|
+
@supported_currencies = j_obj.supported_currencies
|
|
61
|
+
@supported_currencies = @supported_currencies.to_s.to_sym unless @supported_currencies.nil?
|
|
62
|
+
|
|
63
|
+
# conversion for products [type = com.ning.billing.catalog.api.Product]
|
|
64
|
+
@products = j_obj.products
|
|
65
|
+
@products = Killbill::Plugin::Model::Product.new.to_ruby(@products) unless @products.nil?
|
|
66
|
+
|
|
67
|
+
# conversion for plans [type = com.ning.billing.catalog.api.Plan]
|
|
68
|
+
@plans = j_obj.plans
|
|
69
|
+
@plans = Killbill::Plugin::Model::Plan.new.to_ruby(@plans) unless @plans.nil?
|
|
70
|
+
self
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
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 CatalogApiException
|
|
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.catalog.api.CatalogApiException.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
|