killbill 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Jarfile +5 -5
- data/NEWS +4 -0
- data/README.md +45 -8
- data/VERSION +1 -1
- data/generators/active_merchant/active_merchant_generator.rb +38 -0
- data/generators/active_merchant/templates/.gitignore.rb +36 -0
- data/generators/active_merchant/templates/.travis.yml.rb +19 -0
- data/generators/active_merchant/templates/Gemfile.rb +3 -0
- data/generators/active_merchant/templates/Jarfile.rb +6 -0
- data/generators/active_merchant/templates/LICENSE.rb +201 -0
- data/generators/active_merchant/templates/NEWS.rb +2 -0
- data/generators/active_merchant/templates/Rakefile.rb +30 -0
- data/generators/active_merchant/templates/VERSION.rb +1 -0
- data/generators/active_merchant/templates/config.ru.rb +4 -0
- data/generators/active_merchant/templates/config.yml.rb +13 -0
- data/generators/active_merchant/templates/db/ddl.sql.rb +64 -0
- data/generators/active_merchant/templates/db/schema.rb +64 -0
- data/generators/active_merchant/templates/killbill.properties.rb +3 -0
- data/generators/active_merchant/templates/lib/api.rb +119 -0
- data/generators/active_merchant/templates/lib/application.rb +84 -0
- data/generators/active_merchant/templates/lib/models/payment_method.rb +22 -0
- data/generators/active_merchant/templates/lib/models/response.rb +22 -0
- data/generators/active_merchant/templates/lib/models/transaction.rb +11 -0
- data/generators/active_merchant/templates/lib/plugin.rb +23 -0
- data/generators/active_merchant/templates/lib/private_api.rb +6 -0
- data/generators/active_merchant/templates/lib/views/form.erb +8 -0
- data/generators/active_merchant/templates/plugin.gemspec.rb +48 -0
- data/generators/active_merchant/templates/pom.xml.rb +44 -0
- data/generators/active_merchant/templates/release.sh.rb +41 -0
- data/generators/active_merchant/templates/spec/base_plugin_spec.rb +30 -0
- data/generators/active_merchant/templates/spec/integration_spec.rb +31 -0
- data/generators/active_merchant/templates/spec/spec_helper.rb +24 -0
- data/generators/killbill_generator.rb +38 -0
- data/killbill.gemspec +10 -2
- data/lib/killbill/gen/api/block.rb +82 -0
- data/lib/killbill/gen/api/direct_payment.rb +176 -0
- data/lib/killbill/gen/api/direct_payment_api.rb +329 -0
- data/lib/killbill/gen/api/direct_payment_transaction.rb +156 -0
- data/lib/killbill/gen/api/fixed.rb +63 -0
- data/lib/killbill/gen/api/invoice_item.rb +7 -1
- data/lib/killbill/gen/api/invoice_item_formatter.rb +7 -1
- data/lib/killbill/gen/api/invoice_user_api.rb +18 -136
- data/lib/killbill/gen/api/migration_plan.rb +6 -6
- data/lib/killbill/gen/api/payment_api.rb +216 -54
- data/lib/killbill/gen/api/payment_method_plugin.rb +3 -3
- data/lib/killbill/gen/api/plan.rb +6 -6
- data/lib/killbill/gen/api/plan_phase.rb +16 -23
- data/lib/killbill/gen/api/plugin_property.rb +71 -0
- data/lib/killbill/gen/api/recurring.rb +63 -0
- data/lib/killbill/gen/api/require_gen.rb +10 -1
- data/lib/killbill/gen/api/static_catalog.rb +8 -1
- data/lib/killbill/gen/api/tier.rb +77 -0
- data/lib/killbill/gen/api/tiered_block.rb +88 -0
- data/lib/killbill/gen/api/usage.rb +111 -0
- data/lib/killbill/gen/api/usage_user_api.rb +59 -3
- data/lib/killbill/gen/plugin-api/billing_address.rb +85 -0
- data/lib/killbill/gen/plugin-api/customer.rb +73 -0
- data/lib/killbill/gen/plugin-api/hosted_payment_page_descriptor_fields.rb +145 -0
- data/lib/killbill/gen/plugin-api/hosted_payment_page_form_descriptor.rb +80 -0
- data/lib/killbill/gen/plugin-api/hosted_payment_page_notification.rb +129 -0
- data/lib/killbill/gen/plugin-api/payment_info_plugin.rb +20 -1
- data/lib/killbill/gen/plugin-api/payment_plugin_api.rb +358 -39
- data/lib/killbill/gen/plugin-api/refund_info_plugin.rb +20 -1
- data/lib/killbill/gen/plugin-api/require_gen.rb +3 -0
- data/lib/killbill/helpers/active_merchant.rb +21 -0
- data/lib/killbill/helpers/active_merchant/active_record.rb +17 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/helpers.rb +25 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/payment_method.rb +195 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +178 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/streamy_result_set.rb +35 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/transaction.rb +63 -0
- data/lib/killbill/helpers/active_merchant/configuration.rb +54 -0
- data/lib/killbill/helpers/active_merchant/core_ext.rb +41 -0
- data/lib/killbill/helpers/active_merchant/gateway.rb +35 -0
- data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +117 -0
- data/lib/killbill/helpers/active_merchant/payment_plugin.rb +365 -0
- data/lib/killbill/helpers/active_merchant/private_payment_plugin.rb +119 -0
- data/lib/killbill/helpers/active_merchant/properties.rb +20 -0
- data/lib/killbill/helpers/active_merchant/sinatra.rb +30 -0
- data/lib/killbill/helpers/active_merchant/utils.rb +23 -0
- data/lib/killbill/payment.rb +22 -10
- data/script/generate +15 -0
- data/spec/killbill/helpers/payment_method_spec.rb +101 -0
- data/spec/killbill/helpers/response_spec.rb +74 -0
- data/spec/killbill/helpers/test_schema.rb +57 -0
- data/spec/killbill/helpers/utils_spec.rb +22 -0
- data/spec/killbill/payment_plugin_api_spec.rb +23 -18
- data/spec/killbill/payment_plugin_spec.rb +11 -10
- data/spec/killbill/payment_test.rb +9 -9
- data/spec/spec_helper.rb +8 -3
- metadata +130 -5
|
@@ -50,7 +50,7 @@ module Killbill
|
|
|
50
50
|
# conversion for properties [type = java.util.List]
|
|
51
51
|
tmp = java.util.ArrayList.new
|
|
52
52
|
(@properties || []).each do |m|
|
|
53
|
-
# conversion for m [type = org.killbill.billing.payment.api.
|
|
53
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
54
54
|
m = m.to_java unless m.nil?
|
|
55
55
|
tmp.add(m)
|
|
56
56
|
end
|
|
@@ -115,8 +115,8 @@ module Killbill
|
|
|
115
115
|
@properties = j_obj.properties
|
|
116
116
|
tmp = []
|
|
117
117
|
(@properties || []).each do |m|
|
|
118
|
-
# conversion for m [type = org.killbill.billing.payment.api.
|
|
119
|
-
m = Killbill::Plugin::Model::
|
|
118
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
|
119
|
+
m = Killbill::Plugin::Model::PluginProperty.new.to_ruby(m) unless m.nil?
|
|
120
120
|
tmp << m
|
|
121
121
|
end
|
|
122
122
|
@properties = tmp
|
|
@@ -32,7 +32,7 @@ module Killbill
|
|
|
32
32
|
|
|
33
33
|
include org.killbill.billing.catalog.api.Plan
|
|
34
34
|
|
|
35
|
-
attr_accessor :initial_phases, :product, :name, :is_retired, :initial_phase_iterator, :final_phase, :
|
|
35
|
+
attr_accessor :initial_phases, :product, :name, :is_retired, :initial_phase_iterator, :final_phase, :recurring_billing_period, :plans_allowed_in_bundle, :all_phases, :effective_date_for_existing_subscriptons
|
|
36
36
|
|
|
37
37
|
def initialize()
|
|
38
38
|
end
|
|
@@ -56,8 +56,8 @@ module Killbill
|
|
|
56
56
|
# conversion for final_phase [type = org.killbill.billing.catalog.api.PlanPhase]
|
|
57
57
|
@final_phase = @final_phase.to_java unless @final_phase.nil?
|
|
58
58
|
|
|
59
|
-
# conversion for
|
|
60
|
-
@
|
|
59
|
+
# conversion for recurring_billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
|
|
60
|
+
@recurring_billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@recurring_billing_period.to_s}") unless @recurring_billing_period.nil?
|
|
61
61
|
|
|
62
62
|
# conversion for plans_allowed_in_bundle [type = int]
|
|
63
63
|
@plans_allowed_in_bundle = @plans_allowed_in_bundle
|
|
@@ -102,9 +102,9 @@ module Killbill
|
|
|
102
102
|
@final_phase = j_obj.final_phase
|
|
103
103
|
@final_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@final_phase) unless @final_phase.nil?
|
|
104
104
|
|
|
105
|
-
# conversion for
|
|
106
|
-
@
|
|
107
|
-
@
|
|
105
|
+
# conversion for recurring_billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
|
|
106
|
+
@recurring_billing_period = j_obj.recurring_billing_period
|
|
107
|
+
@recurring_billing_period = @recurring_billing_period.to_s.to_sym unless @recurring_billing_period.nil?
|
|
108
108
|
|
|
109
109
|
# conversion for plans_allowed_in_bundle [type = int]
|
|
110
110
|
@plans_allowed_in_bundle = j_obj.plans_allowed_in_bundle
|
|
@@ -32,20 +32,20 @@ module Killbill
|
|
|
32
32
|
|
|
33
33
|
include org.killbill.billing.catalog.api.PlanPhase
|
|
34
34
|
|
|
35
|
-
attr_accessor :
|
|
35
|
+
attr_accessor :fixed, :recurring, :usages, :name, :plan, :duration, :phase_type
|
|
36
36
|
|
|
37
37
|
def initialize()
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def to_java()
|
|
41
|
-
# conversion for
|
|
42
|
-
@
|
|
41
|
+
# conversion for fixed [type = org.killbill.billing.catalog.api.Fixed]
|
|
42
|
+
@fixed = @fixed.to_java unless @fixed.nil?
|
|
43
43
|
|
|
44
|
-
# conversion for
|
|
45
|
-
@
|
|
44
|
+
# conversion for recurring [type = org.killbill.billing.catalog.api.Recurring]
|
|
45
|
+
@recurring = @recurring.to_java unless @recurring.nil?
|
|
46
46
|
|
|
47
|
-
# conversion for
|
|
48
|
-
@
|
|
47
|
+
# conversion for usages [type = org.killbill.billing.catalog.api.Usage]
|
|
48
|
+
@usages = @usages.to_java unless @usages.nil?
|
|
49
49
|
|
|
50
50
|
# conversion for name [type = java.lang.String]
|
|
51
51
|
@name = @name.to_s unless @name.nil?
|
|
@@ -58,24 +58,21 @@ module Killbill
|
|
|
58
58
|
|
|
59
59
|
# conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
|
|
60
60
|
@phase_type = Java::org.killbill.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
|
|
61
|
-
|
|
62
|
-
# conversion for limits [type = org.killbill.billing.catalog.api.Limit]
|
|
63
|
-
@limits = @limits.to_java unless @limits.nil?
|
|
64
61
|
self
|
|
65
62
|
end
|
|
66
63
|
|
|
67
64
|
def to_ruby(j_obj)
|
|
68
|
-
# conversion for
|
|
69
|
-
@
|
|
70
|
-
@
|
|
65
|
+
# conversion for fixed [type = org.killbill.billing.catalog.api.Fixed]
|
|
66
|
+
@fixed = j_obj.fixed
|
|
67
|
+
@fixed = Killbill::Plugin::Model::Fixed.new.to_ruby(@fixed) unless @fixed.nil?
|
|
71
68
|
|
|
72
|
-
# conversion for
|
|
73
|
-
@
|
|
74
|
-
@
|
|
69
|
+
# conversion for recurring [type = org.killbill.billing.catalog.api.Recurring]
|
|
70
|
+
@recurring = j_obj.recurring
|
|
71
|
+
@recurring = Killbill::Plugin::Model::Recurring.new.to_ruby(@recurring) unless @recurring.nil?
|
|
75
72
|
|
|
76
|
-
# conversion for
|
|
77
|
-
@
|
|
78
|
-
@
|
|
73
|
+
# conversion for usages [type = org.killbill.billing.catalog.api.Usage]
|
|
74
|
+
@usages = j_obj.usages
|
|
75
|
+
@usages = Killbill::Plugin::Model::Usage.new.to_ruby(@usages) unless @usages.nil?
|
|
79
76
|
|
|
80
77
|
# conversion for name [type = java.lang.String]
|
|
81
78
|
@name = j_obj.name
|
|
@@ -91,10 +88,6 @@ module Killbill
|
|
|
91
88
|
# conversion for phase_type [type = org.killbill.billing.catalog.api.PhaseType]
|
|
92
89
|
@phase_type = j_obj.phase_type
|
|
93
90
|
@phase_type = @phase_type.to_s.to_sym unless @phase_type.nil?
|
|
94
|
-
|
|
95
|
-
# conversion for limits [type = org.killbill.billing.catalog.api.Limit]
|
|
96
|
-
@limits = j_obj.limits
|
|
97
|
-
@limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
|
|
98
91
|
self
|
|
99
92
|
end
|
|
100
93
|
|
|
@@ -0,0 +1,71 @@
|
|
|
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 PluginProperty
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
attr_accessor :key, :value, :is_updatable
|
|
34
|
+
|
|
35
|
+
def initialize()
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def to_java()
|
|
39
|
+
# conversion for key [type = java.lang.String]
|
|
40
|
+
@key = @key.to_s unless @key.nil?
|
|
41
|
+
|
|
42
|
+
# conversion for value [type = java.lang.Object]
|
|
43
|
+
@value = @value.to_s unless @value.nil?
|
|
44
|
+
|
|
45
|
+
# conversion for is_updatable [type = java.lang.Boolean]
|
|
46
|
+
@is_updatable = @is_updatable.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_updatable)
|
|
47
|
+
Java::org.killbill.billing.payment.api.PluginProperty.new(@key, @value, @is_updatable)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def to_ruby(j_obj)
|
|
51
|
+
# conversion for key [type = java.lang.String]
|
|
52
|
+
@key = j_obj.key
|
|
53
|
+
|
|
54
|
+
# conversion for value [type = java.lang.Object]
|
|
55
|
+
@value = j_obj.value
|
|
56
|
+
|
|
57
|
+
# conversion for is_updatable [type = java.lang.Boolean]
|
|
58
|
+
@is_updatable = j_obj.is_updatable
|
|
59
|
+
if @is_updatable.nil?
|
|
60
|
+
@is_updatable = false
|
|
61
|
+
else
|
|
62
|
+
tmp_bool = (@is_updatable.java_kind_of? java.lang.Boolean) ? @is_updatable.boolean_value : @is_updatable
|
|
63
|
+
@is_updatable = tmp_bool ? true : false
|
|
64
|
+
end
|
|
65
|
+
self
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
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 'org.killbill.billing.catalog.api'
|
|
31
|
+
class Recurring
|
|
32
|
+
|
|
33
|
+
include org.killbill.billing.catalog.api.Recurring
|
|
34
|
+
|
|
35
|
+
attr_accessor :billing_period, :recurring_price
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
|
|
42
|
+
@billing_period = Java::org.killbill.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for recurring_price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
45
|
+
@recurring_price = @recurring_price.to_java unless @recurring_price.nil?
|
|
46
|
+
self
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def to_ruby(j_obj)
|
|
50
|
+
# conversion for billing_period [type = org.killbill.billing.catalog.api.BillingPeriod]
|
|
51
|
+
@billing_period = j_obj.billing_period
|
|
52
|
+
@billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
|
|
53
|
+
|
|
54
|
+
# conversion for recurring_price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
55
|
+
@recurring_price = j_obj.recurring_price
|
|
56
|
+
@recurring_price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@recurring_price) unless @recurring_price.nil?
|
|
57
|
+
self
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -30,11 +30,13 @@ require 'killbill/gen/api/account_email'
|
|
|
30
30
|
require 'killbill/gen/api/account_user_api'
|
|
31
31
|
require 'killbill/gen/api/mutable_account_data'
|
|
32
32
|
require 'killbill/gen/api/billing_exception_base'
|
|
33
|
+
require 'killbill/gen/api/block'
|
|
33
34
|
require 'killbill/gen/api/catalog'
|
|
34
35
|
require 'killbill/gen/api/catalog_api_exception'
|
|
35
36
|
require 'killbill/gen/api/catalog_user_api'
|
|
36
37
|
require 'killbill/gen/api/currency_value_null'
|
|
37
38
|
require 'killbill/gen/api/duration'
|
|
39
|
+
require 'killbill/gen/api/fixed'
|
|
38
40
|
require 'killbill/gen/api/illegal_plan_change'
|
|
39
41
|
require 'killbill/gen/api/international_price'
|
|
40
42
|
require 'killbill/gen/api/invalid_config_exception'
|
|
@@ -50,8 +52,12 @@ require 'killbill/gen/api/price'
|
|
|
50
52
|
require 'killbill/gen/api/price_list'
|
|
51
53
|
require 'killbill/gen/api/price_list_set'
|
|
52
54
|
require 'killbill/gen/api/product'
|
|
55
|
+
require 'killbill/gen/api/recurring'
|
|
53
56
|
require 'killbill/gen/api/static_catalog'
|
|
57
|
+
require 'killbill/gen/api/tier'
|
|
58
|
+
require 'killbill/gen/api/tiered_block'
|
|
54
59
|
require 'killbill/gen/api/unit'
|
|
60
|
+
require 'killbill/gen/api/usage'
|
|
55
61
|
require 'killbill/gen/api/currency_conversion'
|
|
56
62
|
require 'killbill/gen/api/currency_conversion_api'
|
|
57
63
|
require 'killbill/gen/api/currency_conversion_exception'
|
|
@@ -81,13 +87,16 @@ require 'killbill/gen/api/invoice_user_api'
|
|
|
81
87
|
require 'killbill/gen/api/plugin_config_service_api'
|
|
82
88
|
require 'killbill/gen/api/osgi_killbill'
|
|
83
89
|
require 'killbill/gen/api/osgi_plugin_properties'
|
|
90
|
+
require 'killbill/gen/api/direct_payment'
|
|
91
|
+
require 'killbill/gen/api/direct_payment_api'
|
|
92
|
+
require 'killbill/gen/api/direct_payment_transaction'
|
|
84
93
|
require 'killbill/gen/api/payment'
|
|
85
94
|
require 'killbill/gen/api/payment_api'
|
|
86
95
|
require 'killbill/gen/api/payment_api_exception'
|
|
87
96
|
require 'killbill/gen/api/payment_attempt'
|
|
88
97
|
require 'killbill/gen/api/payment_method'
|
|
89
|
-
require 'killbill/gen/api/payment_method_kv_info'
|
|
90
98
|
require 'killbill/gen/api/payment_method_plugin'
|
|
99
|
+
require 'killbill/gen/api/plugin_property'
|
|
91
100
|
require 'killbill/gen/api/refund'
|
|
92
101
|
require 'killbill/gen/api/security_api_exception'
|
|
93
102
|
require 'killbill/gen/api/tenant'
|
|
@@ -32,7 +32,7 @@ module Killbill
|
|
|
32
32
|
|
|
33
33
|
include org.killbill.billing.catalog.api.StaticCatalog
|
|
34
34
|
|
|
35
|
-
attr_accessor :catalog_name, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings, :available_addon_listings
|
|
35
|
+
attr_accessor :catalog_name, :recurring_billing_mode, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings, :available_addon_listings
|
|
36
36
|
|
|
37
37
|
def initialize()
|
|
38
38
|
end
|
|
@@ -41,6 +41,9 @@ module Killbill
|
|
|
41
41
|
# conversion for catalog_name [type = java.lang.String]
|
|
42
42
|
@catalog_name = @catalog_name.to_s unless @catalog_name.nil?
|
|
43
43
|
|
|
44
|
+
# conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
|
|
45
|
+
@recurring_billing_mode = Java::org.killbill.billing.catalog.api.BillingMode.value_of("#{@recurring_billing_mode.to_s}") unless @recurring_billing_mode.nil?
|
|
46
|
+
|
|
44
47
|
# conversion for effective_date [type = java.util.Date]
|
|
45
48
|
if !@effective_date.nil?
|
|
46
49
|
@effective_date = (@effective_date.kind_of? Time) ? DateTime.parse(@effective_date.to_s) : @effective_date
|
|
@@ -84,6 +87,10 @@ module Killbill
|
|
|
84
87
|
# conversion for catalog_name [type = java.lang.String]
|
|
85
88
|
@catalog_name = j_obj.catalog_name
|
|
86
89
|
|
|
90
|
+
# conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
|
|
91
|
+
@recurring_billing_mode = j_obj.recurring_billing_mode
|
|
92
|
+
@recurring_billing_mode = @recurring_billing_mode.to_s.to_sym unless @recurring_billing_mode.nil?
|
|
93
|
+
|
|
87
94
|
# conversion for effective_date [type = java.util.Date]
|
|
88
95
|
@effective_date = j_obj.effective_date
|
|
89
96
|
if !@effective_date.nil?
|
|
@@ -0,0 +1,77 @@
|
|
|
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 'org.killbill.billing.catalog.api'
|
|
31
|
+
class Tier
|
|
32
|
+
|
|
33
|
+
include org.killbill.billing.catalog.api.Tier
|
|
34
|
+
|
|
35
|
+
attr_accessor :limits, :tiered_blocks, :fixed_price, :recurring_price
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for limits [type = org.killbill.billing.catalog.api.Limit]
|
|
42
|
+
@limits = @limits.to_java unless @limits.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock]
|
|
45
|
+
@tiered_blocks = @tiered_blocks.to_java unless @tiered_blocks.nil?
|
|
46
|
+
|
|
47
|
+
# conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
48
|
+
@fixed_price = @fixed_price.to_java unless @fixed_price.nil?
|
|
49
|
+
|
|
50
|
+
# conversion for recurring_price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
51
|
+
@recurring_price = @recurring_price.to_java unless @recurring_price.nil?
|
|
52
|
+
self
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def to_ruby(j_obj)
|
|
56
|
+
# conversion for limits [type = org.killbill.billing.catalog.api.Limit]
|
|
57
|
+
@limits = j_obj.limits
|
|
58
|
+
@limits = Killbill::Plugin::Model::Limit.new.to_ruby(@limits) unless @limits.nil?
|
|
59
|
+
|
|
60
|
+
# conversion for tiered_blocks [type = org.killbill.billing.catalog.api.TieredBlock]
|
|
61
|
+
@tiered_blocks = j_obj.tiered_blocks
|
|
62
|
+
@tiered_blocks = Killbill::Plugin::Model::TieredBlock.new.to_ruby(@tiered_blocks) unless @tiered_blocks.nil?
|
|
63
|
+
|
|
64
|
+
# conversion for fixed_price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
65
|
+
@fixed_price = j_obj.fixed_price
|
|
66
|
+
@fixed_price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@fixed_price) unless @fixed_price.nil?
|
|
67
|
+
|
|
68
|
+
# conversion for recurring_price [type = org.killbill.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
|
+
self
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
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 'org.killbill.billing.catalog.api'
|
|
31
|
+
class TieredBlock
|
|
32
|
+
|
|
33
|
+
include org.killbill.billing.catalog.api.TieredBlock
|
|
34
|
+
|
|
35
|
+
attr_accessor :type, :unit, :size, :price, :min_top_up_credit, :max
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for type [type = org.killbill.billing.catalog.api.BlockType]
|
|
42
|
+
@type = Java::org.killbill.billing.catalog.api.BlockType.value_of("#{@type.to_s}") unless @type.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for unit [type = org.killbill.billing.catalog.api.Unit]
|
|
45
|
+
@unit = @unit.to_java unless @unit.nil?
|
|
46
|
+
|
|
47
|
+
# conversion for size [type = java.lang.Double]
|
|
48
|
+
@size = @size
|
|
49
|
+
|
|
50
|
+
# conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
51
|
+
@price = @price.to_java unless @price.nil?
|
|
52
|
+
|
|
53
|
+
# conversion for min_top_up_credit [type = java.lang.Double]
|
|
54
|
+
@min_top_up_credit = @min_top_up_credit
|
|
55
|
+
|
|
56
|
+
# conversion for max [type = java.lang.Double]
|
|
57
|
+
@max = @max
|
|
58
|
+
self
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def to_ruby(j_obj)
|
|
62
|
+
# conversion for type [type = org.killbill.billing.catalog.api.BlockType]
|
|
63
|
+
@type = j_obj.type
|
|
64
|
+
@type = @type.to_s.to_sym unless @type.nil?
|
|
65
|
+
|
|
66
|
+
# conversion for unit [type = org.killbill.billing.catalog.api.Unit]
|
|
67
|
+
@unit = j_obj.unit
|
|
68
|
+
@unit = Killbill::Plugin::Model::Unit.new.to_ruby(@unit) unless @unit.nil?
|
|
69
|
+
|
|
70
|
+
# conversion for size [type = java.lang.Double]
|
|
71
|
+
@size = j_obj.size
|
|
72
|
+
|
|
73
|
+
# conversion for price [type = org.killbill.billing.catalog.api.InternationalPrice]
|
|
74
|
+
@price = j_obj.price
|
|
75
|
+
@price = Killbill::Plugin::Model::InternationalPrice.new.to_ruby(@price) unless @price.nil?
|
|
76
|
+
|
|
77
|
+
# conversion for min_top_up_credit [type = java.lang.Double]
|
|
78
|
+
@min_top_up_credit = j_obj.min_top_up_credit
|
|
79
|
+
|
|
80
|
+
# conversion for max [type = java.lang.Double]
|
|
81
|
+
@max = j_obj.max
|
|
82
|
+
self
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|