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,59 @@
|
|
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 PaymentPluginApiException
|
31
|
+
|
32
|
+
|
33
|
+
attr_accessor :error_type, :error_message
|
34
|
+
|
35
|
+
def initialize()
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_java()
|
39
|
+
# conversion for error_type [type = java.lang.String]
|
40
|
+
@error_type = @error_type.to_s unless @error_type.nil?
|
41
|
+
|
42
|
+
# conversion for error_message [type = java.lang.String]
|
43
|
+
@error_message = @error_message.to_s unless @error_message.nil?
|
44
|
+
Java::com.ning.billing.payment.plugin.api.PaymentPluginApiException.new(@error_type, @error_message)
|
45
|
+
end
|
46
|
+
|
47
|
+
def to_ruby(j_obj)
|
48
|
+
# conversion for error_type [type = java.lang.String]
|
49
|
+
@error_type = j_obj.error_type
|
50
|
+
|
51
|
+
# conversion for error_message [type = java.lang.String]
|
52
|
+
@error_message = j_obj.error_message
|
53
|
+
self
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
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.payment.api'
|
31
|
+
class PaymentService
|
32
|
+
|
33
|
+
include com.ning.billing.payment.api.PaymentService
|
34
|
+
|
35
|
+
attr_accessor :name, :payment_api
|
36
|
+
|
37
|
+
def initialize()
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_java()
|
41
|
+
# conversion for name [type = java.lang.String]
|
42
|
+
@name = @name.to_s unless @name.nil?
|
43
|
+
|
44
|
+
# conversion for payment_api [type = com.ning.billing.payment.api.PaymentApi]
|
45
|
+
@payment_api = @payment_api.to_java unless @payment_api.nil?
|
46
|
+
self
|
47
|
+
end
|
48
|
+
|
49
|
+
def to_ruby(j_obj)
|
50
|
+
# conversion for name [type = java.lang.String]
|
51
|
+
@name = j_obj.name
|
52
|
+
|
53
|
+
# conversion for payment_api [type = com.ning.billing.payment.api.PaymentApi]
|
54
|
+
@payment_api = j_obj.payment_api
|
55
|
+
@payment_api = Killbill::Plugin::Model::PaymentApi.new.to_ruby(@payment_api) unless @payment_api.nil?
|
56
|
+
self
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,143 @@
|
|
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 Plan
|
32
|
+
|
33
|
+
include com.ning.billing.catalog.api.Plan
|
34
|
+
|
35
|
+
attr_accessor :initial_phases, :product, :name, :is_retired, :initial_phase_iterator, :final_phase, :billing_period, :plans_allowed_in_bundle, :all_phases, :effective_date_for_existing_subscriptons
|
36
|
+
|
37
|
+
def initialize()
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_java()
|
41
|
+
# conversion for initial_phases [type = com.ning.billing.catalog.api.PlanPhase]
|
42
|
+
@initial_phases = @initial_phases.to_java unless @initial_phases.nil?
|
43
|
+
|
44
|
+
# conversion for product [type = com.ning.billing.catalog.api.Product]
|
45
|
+
@product = @product.to_java unless @product.nil?
|
46
|
+
|
47
|
+
# conversion for name [type = java.lang.String]
|
48
|
+
@name = @name.to_s unless @name.nil?
|
49
|
+
|
50
|
+
# conversion for is_retired [type = boolean]
|
51
|
+
@is_retired = @is_retired.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_retired)
|
52
|
+
|
53
|
+
# conversion for initial_phase_iterator [type = java.util.Iterator]
|
54
|
+
tmp = java.util.ArrayList.new
|
55
|
+
(@initial_phase_iterator || []).each do |m|
|
56
|
+
# conversion for m [type = com.ning.billing.catalog.api.PlanPhase]
|
57
|
+
m = m.to_java unless m.nil?
|
58
|
+
tmp.add(m)
|
59
|
+
end
|
60
|
+
@initial_phase_iterator = tmp
|
61
|
+
|
62
|
+
# conversion for final_phase [type = com.ning.billing.catalog.api.PlanPhase]
|
63
|
+
@final_phase = @final_phase.to_java unless @final_phase.nil?
|
64
|
+
|
65
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
66
|
+
@billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
|
67
|
+
|
68
|
+
# conversion for plans_allowed_in_bundle [type = int]
|
69
|
+
@plans_allowed_in_bundle = @plans_allowed_in_bundle
|
70
|
+
|
71
|
+
# conversion for all_phases [type = com.ning.billing.catalog.api.PlanPhase]
|
72
|
+
@all_phases = @all_phases.to_java unless @all_phases.nil?
|
73
|
+
|
74
|
+
# conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
|
75
|
+
if !@effective_date_for_existing_subscriptons.nil?
|
76
|
+
@effective_date_for_existing_subscriptons = (@effective_date_for_existing_subscriptons.kind_of? Time) ? DateTime.parse(@effective_date_for_existing_subscriptons.to_s) : @effective_date_for_existing_subscriptons
|
77
|
+
@effective_date_for_existing_subscriptons = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptons.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
78
|
+
@effective_date_for_existing_subscriptons = @effective_date_for_existing_subscriptons.to_date
|
79
|
+
end
|
80
|
+
self
|
81
|
+
end
|
82
|
+
|
83
|
+
def to_ruby(j_obj)
|
84
|
+
# conversion for initial_phases [type = com.ning.billing.catalog.api.PlanPhase]
|
85
|
+
@initial_phases = j_obj.initial_phases
|
86
|
+
@initial_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@initial_phases) unless @initial_phases.nil?
|
87
|
+
|
88
|
+
# conversion for product [type = com.ning.billing.catalog.api.Product]
|
89
|
+
@product = j_obj.product
|
90
|
+
@product = Killbill::Plugin::Model::Product.new.to_ruby(@product) unless @product.nil?
|
91
|
+
|
92
|
+
# conversion for name [type = java.lang.String]
|
93
|
+
@name = j_obj.name
|
94
|
+
|
95
|
+
# conversion for is_retired [type = boolean]
|
96
|
+
@is_retired = j_obj.is_retired
|
97
|
+
if @is_retired.nil?
|
98
|
+
@is_retired = false
|
99
|
+
else
|
100
|
+
tmp_bool = (@is_retired.java_kind_of? java.lang.Boolean) ? @is_retired.boolean_value : @is_retired
|
101
|
+
@is_retired = tmp_bool ? true : false
|
102
|
+
end
|
103
|
+
|
104
|
+
# conversion for initial_phase_iterator [type = java.util.Iterator]
|
105
|
+
@initial_phase_iterator = j_obj.initial_phase_iterator
|
106
|
+
tmp = []
|
107
|
+
(@initial_phase_iterator || []).each do |m|
|
108
|
+
# conversion for m [type = com.ning.billing.catalog.api.PlanPhase]
|
109
|
+
m = Killbill::Plugin::Model::PlanPhase.new.to_ruby(m) unless m.nil?
|
110
|
+
tmp << m
|
111
|
+
end
|
112
|
+
@initial_phase_iterator = tmp
|
113
|
+
|
114
|
+
# conversion for final_phase [type = com.ning.billing.catalog.api.PlanPhase]
|
115
|
+
@final_phase = j_obj.final_phase
|
116
|
+
@final_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@final_phase) unless @final_phase.nil?
|
117
|
+
|
118
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
119
|
+
@billing_period = j_obj.billing_period
|
120
|
+
@billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
|
121
|
+
|
122
|
+
# conversion for plans_allowed_in_bundle [type = int]
|
123
|
+
@plans_allowed_in_bundle = j_obj.plans_allowed_in_bundle
|
124
|
+
|
125
|
+
# conversion for all_phases [type = com.ning.billing.catalog.api.PlanPhase]
|
126
|
+
@all_phases = j_obj.all_phases
|
127
|
+
@all_phases = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@all_phases) unless @all_phases.nil?
|
128
|
+
|
129
|
+
# conversion for effective_date_for_existing_subscriptons [type = java.util.Date]
|
130
|
+
@effective_date_for_existing_subscriptons = j_obj.effective_date_for_existing_subscriptons
|
131
|
+
if !@effective_date_for_existing_subscriptons.nil?
|
132
|
+
@effective_date_for_existing_subscriptons = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptons)
|
133
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
134
|
+
str = fmt.print(@effective_date_for_existing_subscriptons)
|
135
|
+
@effective_date_for_existing_subscriptons = DateTime.iso8601(str)
|
136
|
+
end
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
@@ -0,0 +1,68 @@
|
|
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 PlanChangeResult
|
31
|
+
|
32
|
+
|
33
|
+
attr_accessor :new_price_list, :policy, :alignment
|
34
|
+
|
35
|
+
def initialize()
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_java()
|
39
|
+
# conversion for new_price_list [type = com.ning.billing.catalog.api.PriceList]
|
40
|
+
@new_price_list = @new_price_list.to_java unless @new_price_list.nil?
|
41
|
+
|
42
|
+
# conversion for policy [type = com.ning.billing.catalog.api.ActionPolicy]
|
43
|
+
@policy = Java::com.ning.billing.catalog.api.ActionPolicy.value_of("#{@policy.to_s}") unless @policy.nil?
|
44
|
+
|
45
|
+
# conversion for alignment [type = com.ning.billing.catalog.api.PlanAlignmentChange]
|
46
|
+
@alignment = Java::com.ning.billing.catalog.api.PlanAlignmentChange.value_of("#{@alignment.to_s}") unless @alignment.nil?
|
47
|
+
Java::com.ning.billing.catalog.api.PlanChangeResult.new(@new_price_list, @policy, @alignment)
|
48
|
+
end
|
49
|
+
|
50
|
+
def to_ruby(j_obj)
|
51
|
+
# conversion for new_price_list [type = com.ning.billing.catalog.api.PriceList]
|
52
|
+
@new_price_list = j_obj.new_price_list
|
53
|
+
@new_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@new_price_list) unless @new_price_list.nil?
|
54
|
+
|
55
|
+
# conversion for policy [type = com.ning.billing.catalog.api.ActionPolicy]
|
56
|
+
@policy = j_obj.policy
|
57
|
+
@policy = @policy.to_s.to_sym unless @policy.nil?
|
58
|
+
|
59
|
+
# conversion for alignment [type = com.ning.billing.catalog.api.PlanAlignmentChange]
|
60
|
+
@alignment = j_obj.alignment
|
61
|
+
@alignment = @alignment.to_s.to_sym unless @alignment.nil?
|
62
|
+
self
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,104 @@
|
|
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 PlanPhase
|
32
|
+
|
33
|
+
include com.ning.billing.catalog.api.PlanPhase
|
34
|
+
|
35
|
+
attr_accessor :recurring_price, :fixed_price, :billing_period, :name, :plan, :duration, :phase_type, :limits
|
36
|
+
|
37
|
+
def initialize()
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_java()
|
41
|
+
# conversion for recurring_price [type = com.ning.billing.catalog.api.InternationalPrice]
|
42
|
+
@recurring_price = @recurring_price.to_java unless @recurring_price.nil?
|
43
|
+
|
44
|
+
# conversion for fixed_price [type = com.ning.billing.catalog.api.InternationalPrice]
|
45
|
+
@fixed_price = @fixed_price.to_java unless @fixed_price.nil?
|
46
|
+
|
47
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
48
|
+
@billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
|
49
|
+
|
50
|
+
# conversion for name [type = java.lang.String]
|
51
|
+
@name = @name.to_s unless @name.nil?
|
52
|
+
|
53
|
+
# conversion for plan [type = com.ning.billing.catalog.api.Plan]
|
54
|
+
@plan = @plan.to_java unless @plan.nil?
|
55
|
+
|
56
|
+
# conversion for duration [type = com.ning.billing.catalog.api.Duration]
|
57
|
+
@duration = @duration.to_java unless @duration.nil?
|
58
|
+
|
59
|
+
# conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
|
60
|
+
@phase_type = Java::com.ning.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
|
61
|
+
|
62
|
+
# conversion for limits [type = com.ning.billing.catalog.api.Limit]
|
63
|
+
@limits = @limits.to_java unless @limits.nil?
|
64
|
+
self
|
65
|
+
end
|
66
|
+
|
67
|
+
def to_ruby(j_obj)
|
68
|
+
# conversion for recurring_price [type = com.ning.billing.catalog.api.InternationalPrice]
|
69
|
+
@recurring_price = j_obj.recurring_price
|
70
|
+
@recurring_price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@recurring_price) unless @recurring_price.nil?
|
71
|
+
|
72
|
+
# conversion for fixed_price [type = com.ning.billing.catalog.api.InternationalPrice]
|
73
|
+
@fixed_price = j_obj.fixed_price
|
74
|
+
@fixed_price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@fixed_price) unless @fixed_price.nil?
|
75
|
+
|
76
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
77
|
+
@billing_period = j_obj.billing_period
|
78
|
+
@billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
|
79
|
+
|
80
|
+
# conversion for name [type = java.lang.String]
|
81
|
+
@name = j_obj.name
|
82
|
+
|
83
|
+
# conversion for plan [type = com.ning.billing.catalog.api.Plan]
|
84
|
+
@plan = j_obj.plan
|
85
|
+
@plan = Killbill::Plugin::Model::Plan.new.to_ruby(@plan) unless @plan.nil?
|
86
|
+
|
87
|
+
# conversion for duration [type = com.ning.billing.catalog.api.Duration]
|
88
|
+
@duration = j_obj.duration
|
89
|
+
@duration = Killbill::Plugin::Model::Duration.new.to_ruby(@duration) unless @duration.nil?
|
90
|
+
|
91
|
+
# conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
|
92
|
+
@phase_type = j_obj.phase_type
|
93
|
+
@phase_type = @phase_type.to_s.to_sym unless @phase_type.nil?
|
94
|
+
|
95
|
+
# conversion for limits [type = com.ning.billing.catalog.api.Limit]
|
96
|
+
@limits = j_obj.limits
|
97
|
+
@limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
|
98
|
+
self
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,80 @@
|
|
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 PlanPhaseSpecifier
|
31
|
+
|
32
|
+
|
33
|
+
attr_accessor :product_name, :product_category, :billing_period, :price_list_name, :phase_type
|
34
|
+
|
35
|
+
def initialize()
|
36
|
+
end
|
37
|
+
|
38
|
+
def to_java()
|
39
|
+
# conversion for product_name [type = java.lang.String]
|
40
|
+
@product_name = @product_name.to_s unless @product_name.nil?
|
41
|
+
|
42
|
+
# conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
|
43
|
+
@product_category = Java::com.ning.billing.catalog.api.ProductCategory.value_of("#{@product_category.to_s}") unless @product_category.nil?
|
44
|
+
|
45
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
46
|
+
@billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
|
47
|
+
|
48
|
+
# conversion for price_list_name [type = java.lang.String]
|
49
|
+
@price_list_name = @price_list_name.to_s unless @price_list_name.nil?
|
50
|
+
|
51
|
+
# conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
|
52
|
+
@phase_type = Java::com.ning.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
|
53
|
+
Java::com.ning.billing.catalog.api.PlanPhaseSpecifier.new(@product_name, @product_category, @billing_period, @price_list_name, @phase_type)
|
54
|
+
end
|
55
|
+
|
56
|
+
def to_ruby(j_obj)
|
57
|
+
# conversion for product_name [type = java.lang.String]
|
58
|
+
@product_name = j_obj.product_name
|
59
|
+
|
60
|
+
# conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
|
61
|
+
@product_category = j_obj.product_category
|
62
|
+
@product_category = @product_category.to_s.to_sym unless @product_category.nil?
|
63
|
+
|
64
|
+
# conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
|
65
|
+
@billing_period = j_obj.billing_period
|
66
|
+
@billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
|
67
|
+
|
68
|
+
# conversion for price_list_name [type = java.lang.String]
|
69
|
+
@price_list_name = j_obj.price_list_name
|
70
|
+
|
71
|
+
# conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
|
72
|
+
@phase_type = j_obj.phase_type
|
73
|
+
@phase_type = @phase_type.to_s.to_sym unless @phase_type.nil?
|
74
|
+
self
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|