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
|
@@ -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 CustomFieldApiException
|
|
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.CustomFieldApiException.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,115 @@
|
|
|
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 CustomFieldUserApi
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.util.api.CustomFieldUserApi
|
|
34
|
+
|
|
35
|
+
def initialize(real_java_api)
|
|
36
|
+
@real_java_api = real_java_api
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
java_signature 'Java::void addCustomFields(Java::java.util.List, Java::com.ning.billing.util.callcontext.CallContext)'
|
|
41
|
+
def add_custom_fields(fields, context)
|
|
42
|
+
# conversion for fields [type = java.util.List]
|
|
43
|
+
tmp = java.util.ArrayList.new
|
|
44
|
+
(fields || []).each do |m|
|
|
45
|
+
# conversion for m [type = com.ning.billing.util.customfield.CustomField]
|
|
46
|
+
m = m.to_java unless m.nil?
|
|
47
|
+
tmp.add(m)
|
|
48
|
+
end
|
|
49
|
+
fields = tmp
|
|
50
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
|
51
|
+
context = context.to_java unless context.nil?
|
|
52
|
+
@real_java_api.add_custom_fields(fields, context)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
java_signature 'Java::java.util.List getCustomFieldsForObject(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::com.ning.billing.util.callcontext.TenantContext)'
|
|
56
|
+
def get_custom_fields_for_object(objectId, objectType, context)
|
|
57
|
+
# conversion for objectId [type = java.util.UUID]
|
|
58
|
+
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
|
59
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
|
60
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
|
61
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
|
62
|
+
context = context.to_java unless context.nil?
|
|
63
|
+
res = @real_java_api.get_custom_fields_for_object(objectId, objectType, context)
|
|
64
|
+
# conversion for res [type = java.util.List]
|
|
65
|
+
tmp = []
|
|
66
|
+
(res || []).each do |m|
|
|
67
|
+
# conversion for m [type = com.ning.billing.util.customfield.CustomField]
|
|
68
|
+
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
|
69
|
+
tmp << m
|
|
70
|
+
end
|
|
71
|
+
res = tmp
|
|
72
|
+
return res
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
java_signature 'Java::java.util.List getCustomFieldsForAccountType(Java::java.util.UUID, Java::com.ning.billing.ObjectType, Java::com.ning.billing.util.callcontext.TenantContext)'
|
|
76
|
+
def get_custom_fields_for_account_type(accountId, objectType, context)
|
|
77
|
+
# conversion for accountId [type = java.util.UUID]
|
|
78
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
|
79
|
+
# conversion for objectType [type = com.ning.billing.ObjectType]
|
|
80
|
+
objectType = Java::com.ning.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
|
81
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
|
82
|
+
context = context.to_java unless context.nil?
|
|
83
|
+
res = @real_java_api.get_custom_fields_for_account_type(accountId, objectType, context)
|
|
84
|
+
# conversion for res [type = java.util.List]
|
|
85
|
+
tmp = []
|
|
86
|
+
(res || []).each do |m|
|
|
87
|
+
# conversion for m [type = com.ning.billing.util.customfield.CustomField]
|
|
88
|
+
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
|
89
|
+
tmp << m
|
|
90
|
+
end
|
|
91
|
+
res = tmp
|
|
92
|
+
return res
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
java_signature 'Java::java.util.List getCustomFieldsForAccount(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
|
|
96
|
+
def get_custom_fields_for_account(accountId, context)
|
|
97
|
+
# conversion for accountId [type = java.util.UUID]
|
|
98
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
|
99
|
+
# conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
|
|
100
|
+
context = context.to_java unless context.nil?
|
|
101
|
+
res = @real_java_api.get_custom_fields_for_account(accountId, context)
|
|
102
|
+
# conversion for res [type = java.util.List]
|
|
103
|
+
tmp = []
|
|
104
|
+
(res || []).each do |m|
|
|
105
|
+
# conversion for m [type = com.ning.billing.util.customfield.CustomField]
|
|
106
|
+
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
|
107
|
+
tmp << m
|
|
108
|
+
end
|
|
109
|
+
res = tmp
|
|
110
|
+
return res
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
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.util.api'
|
|
31
|
+
class DatabaseExportOutputStream
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.util.api.DatabaseExportOutputStream
|
|
34
|
+
|
|
35
|
+
attr_accessor
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
self
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def to_ruby(j_obj)
|
|
45
|
+
self
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,180 @@
|
|
|
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 DefaultMutableAccountData
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
attr_accessor :external_key, :email, :name, :first_name_length, :currency, :bill_cycle_day_local, :payment_method_id, :time_zone, :locale, :address1, :address2, :company_name, :city, :state_or_province, :country, :postal_code, :phone, :is_migrated, :is_notified_for_invoices
|
|
34
|
+
|
|
35
|
+
def initialize()
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def to_java()
|
|
39
|
+
# conversion for external_key [type = java.lang.String]
|
|
40
|
+
@external_key = @external_key.to_s unless @external_key.nil?
|
|
41
|
+
|
|
42
|
+
# conversion for email [type = java.lang.String]
|
|
43
|
+
@email = @email.to_s unless @email.nil?
|
|
44
|
+
|
|
45
|
+
# conversion for name [type = java.lang.String]
|
|
46
|
+
@name = @name.to_s unless @name.nil?
|
|
47
|
+
|
|
48
|
+
# conversion for first_name_length [type = java.lang.Integer]
|
|
49
|
+
@first_name_length = @first_name_length
|
|
50
|
+
|
|
51
|
+
# conversion for currency [type = com.ning.billing.catalog.api.Currency]
|
|
52
|
+
@currency = Java::com.ning.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
|
53
|
+
|
|
54
|
+
# conversion for bill_cycle_day_local [type = java.lang.Integer]
|
|
55
|
+
@bill_cycle_day_local = @bill_cycle_day_local
|
|
56
|
+
|
|
57
|
+
# conversion for payment_method_id [type = java.util.UUID]
|
|
58
|
+
@payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil?
|
|
59
|
+
|
|
60
|
+
# conversion for time_zone [type = org.joda.time.DateTimeZone]
|
|
61
|
+
if !@time_zone.nil?
|
|
62
|
+
@time_zone = Java::org.joda.time.DateTimeZone.forID((@time_zone.respond_to?(:identifier) ? @time_zone.identifier : @time_zone.to_s))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# conversion for locale [type = java.lang.String]
|
|
66
|
+
@locale = @locale.to_s unless @locale.nil?
|
|
67
|
+
|
|
68
|
+
# conversion for address1 [type = java.lang.String]
|
|
69
|
+
@address1 = @address1.to_s unless @address1.nil?
|
|
70
|
+
|
|
71
|
+
# conversion for address2 [type = java.lang.String]
|
|
72
|
+
@address2 = @address2.to_s unless @address2.nil?
|
|
73
|
+
|
|
74
|
+
# conversion for company_name [type = java.lang.String]
|
|
75
|
+
@company_name = @company_name.to_s unless @company_name.nil?
|
|
76
|
+
|
|
77
|
+
# conversion for city [type = java.lang.String]
|
|
78
|
+
@city = @city.to_s unless @city.nil?
|
|
79
|
+
|
|
80
|
+
# conversion for state_or_province [type = java.lang.String]
|
|
81
|
+
@state_or_province = @state_or_province.to_s unless @state_or_province.nil?
|
|
82
|
+
|
|
83
|
+
# conversion for country [type = java.lang.String]
|
|
84
|
+
@country = @country.to_s unless @country.nil?
|
|
85
|
+
|
|
86
|
+
# conversion for postal_code [type = java.lang.String]
|
|
87
|
+
@postal_code = @postal_code.to_s unless @postal_code.nil?
|
|
88
|
+
|
|
89
|
+
# conversion for phone [type = java.lang.String]
|
|
90
|
+
@phone = @phone.to_s unless @phone.nil?
|
|
91
|
+
|
|
92
|
+
# conversion for is_migrated [type = java.lang.Boolean]
|
|
93
|
+
@is_migrated = @is_migrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_migrated)
|
|
94
|
+
|
|
95
|
+
# conversion for is_notified_for_invoices [type = java.lang.Boolean]
|
|
96
|
+
@is_notified_for_invoices = @is_notified_for_invoices.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_notified_for_invoices)
|
|
97
|
+
Java::com.ning.billing.account.api.DefaultMutableAccountData.new(@external_key, @email, @name, @first_name_length, @currency, @bill_cycle_day_local, @payment_method_id, @time_zone, @locale, @address1, @address2, @company_name, @city, @state_or_province, @country, @postal_code, @phone, @is_migrated, @is_notified_for_invoices)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def to_ruby(j_obj)
|
|
101
|
+
# conversion for external_key [type = java.lang.String]
|
|
102
|
+
@external_key = j_obj.external_key
|
|
103
|
+
|
|
104
|
+
# conversion for email [type = java.lang.String]
|
|
105
|
+
@email = j_obj.email
|
|
106
|
+
|
|
107
|
+
# conversion for name [type = java.lang.String]
|
|
108
|
+
@name = j_obj.name
|
|
109
|
+
|
|
110
|
+
# conversion for first_name_length [type = java.lang.Integer]
|
|
111
|
+
@first_name_length = j_obj.first_name_length
|
|
112
|
+
|
|
113
|
+
# conversion for currency [type = com.ning.billing.catalog.api.Currency]
|
|
114
|
+
@currency = j_obj.currency
|
|
115
|
+
@currency = @currency.to_s.to_sym unless @currency.nil?
|
|
116
|
+
|
|
117
|
+
# conversion for bill_cycle_day_local [type = java.lang.Integer]
|
|
118
|
+
@bill_cycle_day_local = j_obj.bill_cycle_day_local
|
|
119
|
+
|
|
120
|
+
# conversion for payment_method_id [type = java.util.UUID]
|
|
121
|
+
@payment_method_id = j_obj.payment_method_id
|
|
122
|
+
@payment_method_id = @payment_method_id.nil? ? nil : @payment_method_id.to_s
|
|
123
|
+
|
|
124
|
+
# conversion for time_zone [type = org.joda.time.DateTimeZone]
|
|
125
|
+
@time_zone = j_obj.time_zone
|
|
126
|
+
if !@time_zone.nil?
|
|
127
|
+
@time_zone = TZInfo::Timezone.get(@time_zone.get_id)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# conversion for locale [type = java.lang.String]
|
|
131
|
+
@locale = j_obj.locale
|
|
132
|
+
|
|
133
|
+
# conversion for address1 [type = java.lang.String]
|
|
134
|
+
@address1 = j_obj.address1
|
|
135
|
+
|
|
136
|
+
# conversion for address2 [type = java.lang.String]
|
|
137
|
+
@address2 = j_obj.address2
|
|
138
|
+
|
|
139
|
+
# conversion for company_name [type = java.lang.String]
|
|
140
|
+
@company_name = j_obj.company_name
|
|
141
|
+
|
|
142
|
+
# conversion for city [type = java.lang.String]
|
|
143
|
+
@city = j_obj.city
|
|
144
|
+
|
|
145
|
+
# conversion for state_or_province [type = java.lang.String]
|
|
146
|
+
@state_or_province = j_obj.state_or_province
|
|
147
|
+
|
|
148
|
+
# conversion for country [type = java.lang.String]
|
|
149
|
+
@country = j_obj.country
|
|
150
|
+
|
|
151
|
+
# conversion for postal_code [type = java.lang.String]
|
|
152
|
+
@postal_code = j_obj.postal_code
|
|
153
|
+
|
|
154
|
+
# conversion for phone [type = java.lang.String]
|
|
155
|
+
@phone = j_obj.phone
|
|
156
|
+
|
|
157
|
+
# conversion for is_migrated [type = java.lang.Boolean]
|
|
158
|
+
@is_migrated = j_obj.is_migrated
|
|
159
|
+
if @is_migrated.nil?
|
|
160
|
+
@is_migrated = false
|
|
161
|
+
else
|
|
162
|
+
tmp_bool = (@is_migrated.java_kind_of? java.lang.Boolean) ? @is_migrated.boolean_value : @is_migrated
|
|
163
|
+
@is_migrated = tmp_bool ? true : false
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# conversion for is_notified_for_invoices [type = java.lang.Boolean]
|
|
167
|
+
@is_notified_for_invoices = j_obj.is_notified_for_invoices
|
|
168
|
+
if @is_notified_for_invoices.nil?
|
|
169
|
+
@is_notified_for_invoices = false
|
|
170
|
+
else
|
|
171
|
+
tmp_bool = (@is_notified_for_invoices.java_kind_of? java.lang.Boolean) ? @is_notified_for_invoices.boolean_value : @is_notified_for_invoices
|
|
172
|
+
@is_notified_for_invoices = tmp_bool ? true : false
|
|
173
|
+
end
|
|
174
|
+
self
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Duration
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.catalog.api.Duration
|
|
34
|
+
|
|
35
|
+
attr_accessor :unit, :number
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for unit [type = com.ning.billing.catalog.api.TimeUnit]
|
|
42
|
+
@unit = Java::com.ning.billing.catalog.api.TimeUnit.value_of("#{@unit.to_s}") unless @unit.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for number [type = int]
|
|
45
|
+
@number = @number
|
|
46
|
+
self
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def to_ruby(j_obj)
|
|
50
|
+
# conversion for unit [type = com.ning.billing.catalog.api.TimeUnit]
|
|
51
|
+
@unit = j_obj.unit
|
|
52
|
+
@unit = @unit.to_s.to_sym unless @unit.nil?
|
|
53
|
+
|
|
54
|
+
# conversion for number [type = int]
|
|
55
|
+
@number = j_obj.number
|
|
56
|
+
self
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|