killbill 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Jarfile +5 -5
- data/NEWS +3 -0
- data/VERSION +1 -1
- data/gen_config/api.conf +34 -34
- data/gen_config/plugin_api.conf +3 -3
- data/killbill.gemspec +2 -2
- data/lib/killbill.rb +11 -11
- data/lib/killbill/gen/api/account.rb +5 -5
- data/lib/killbill/gen/api/account_api_exception.rb +1 -1
- data/lib/killbill/gen/api/account_audit_logs.rb +32 -32
- data/lib/killbill/gen/api/account_audit_logs_for_object_type.rb +4 -4
- data/lib/killbill/gen/api/account_data.rb +5 -5
- data/lib/killbill/gen/api/account_email.rb +2 -2
- data/lib/killbill/gen/api/account_user_api.rb +36 -36
- data/lib/killbill/gen/api/audit_log.rb +8 -8
- data/lib/killbill/gen/api/audit_user_api.rb +14 -14
- data/lib/killbill/gen/api/billing_exception_base.rb +1 -1
- data/lib/killbill/gen/api/blockable.rb +2 -2
- data/lib/killbill/gen/api/blocking_api_exception.rb +1 -1
- data/lib/killbill/gen/api/blocking_state.rb +5 -5
- data/lib/killbill/gen/api/call_context.rb +8 -8
- data/lib/killbill/gen/api/catalog.rb +9 -9
- data/lib/killbill/gen/api/catalog_api_exception.rb +1 -1
- data/lib/killbill/gen/api/catalog_user_api.rb +5 -5
- data/lib/killbill/gen/api/column_info.rb +2 -2
- data/lib/killbill/gen/api/control_tag.rb +8 -8
- data/lib/killbill/gen/api/currency_conversion.rb +7 -7
- data/lib/killbill/gen/api/currency_conversion_api.rb +14 -14
- data/lib/killbill/gen/api/currency_conversion_exception.rb +1 -1
- data/lib/killbill/gen/api/currency_value_null.rb +1 -1
- data/lib/killbill/gen/api/custom_field.rb +5 -5
- data/lib/killbill/gen/api/custom_field_api_exception.rb +1 -1
- data/lib/killbill/gen/api/custom_field_user_api.rb +27 -27
- data/lib/killbill/gen/api/database_export_output_stream.rb +2 -2
- data/lib/killbill/gen/api/duration.rb +5 -5
- data/lib/killbill/gen/api/entitlement.rb +19 -19
- data/lib/killbill/gen/api/entitlement_ao_status_dry_run.rb +11 -11
- data/lib/killbill/gen/api/entitlement_api.rb +44 -44
- data/lib/killbill/gen/api/entitlement_api_exception.rb +1 -1
- data/lib/killbill/gen/api/entity.rb +2 -2
- data/lib/killbill/gen/api/illegal_plan_change.rb +1 -1
- data/lib/killbill/gen/api/international_price.rb +4 -4
- data/lib/killbill/gen/api/invalid_config_exception.rb +1 -1
- data/lib/killbill/gen/api/invoice.rb +9 -9
- data/lib/killbill/gen/api/invoice_api_exception.rb +1 -1
- data/lib/killbill/gen/api/invoice_creation_event.rb +2 -2
- data/lib/killbill/gen/api/invoice_formatter.rb +12 -12
- data/lib/killbill/gen/api/invoice_item.rb +8 -8
- data/lib/killbill/gen/api/invoice_item_formatter.rb +8 -8
- data/lib/killbill/gen/api/invoice_payment.rb +11 -11
- data/lib/killbill/gen/api/invoice_payment_api.rb +34 -34
- data/lib/killbill/gen/api/invoice_user_api.rb +90 -90
- data/lib/killbill/gen/api/limit.rb +4 -4
- data/lib/killbill/gen/api/listing.rb +6 -6
- data/lib/killbill/gen/api/migration_plan.rb +13 -13
- data/lib/killbill/gen/api/mutable_account_data.rb +5 -5
- data/lib/killbill/gen/api/osgi_killbill.rb +34 -34
- data/lib/killbill/gen/api/osgi_plugin_properties.rb +2 -2
- data/lib/killbill/gen/api/pagination.rb +2 -2
- data/lib/killbill/gen/api/payment.rb +12 -12
- data/lib/killbill/gen/api/payment_api.rb +103 -103
- data/lib/killbill/gen/api/payment_api_exception.rb +1 -1
- data/lib/killbill/gen/api/payment_attempt.rb +5 -5
- data/lib/killbill/gen/api/payment_method.rb +4 -4
- data/lib/killbill/gen/api/payment_method_kv_info.rb +1 -1
- data/lib/killbill/gen/api/payment_method_plugin.rb +4 -4
- data/lib/killbill/gen/api/plan.rb +13 -13
- data/lib/killbill/gen/api/plan_change_result.rb +9 -9
- data/lib/killbill/gen/api/plan_phase.rb +18 -18
- data/lib/killbill/gen/api/plan_phase_specifier.rb +10 -10
- data/lib/killbill/gen/api/plan_specifier.rb +7 -7
- data/lib/killbill/gen/api/plugin_config_service_api.rb +6 -6
- data/lib/killbill/gen/api/price.rb +5 -5
- data/lib/killbill/gen/api/price_list.rb +4 -4
- data/lib/killbill/gen/api/price_list_set.rb +4 -4
- data/lib/killbill/gen/api/product.rb +11 -11
- data/lib/killbill/gen/api/rate.rb +8 -8
- data/lib/killbill/gen/api/record_id_api.rb +6 -6
- data/lib/killbill/gen/api/refund.rb +10 -10
- data/lib/killbill/gen/api/rolled_up_usage.rb +2 -2
- data/lib/killbill/gen/api/security_api_exception.rb +1 -1
- data/lib/killbill/gen/api/static_catalog.rb +15 -15
- data/lib/killbill/gen/api/subscription.rb +19 -19
- data/lib/killbill/gen/api/subscription_api.rb +34 -34
- data/lib/killbill/gen/api/subscription_api_exception.rb +1 -1
- data/lib/killbill/gen/api/subscription_bundle.rb +6 -6
- data/lib/killbill/gen/api/subscription_bundle_timeline.rb +4 -4
- data/lib/killbill/gen/api/subscription_event.rb +27 -27
- data/lib/killbill/gen/api/tag.rb +5 -5
- data/lib/killbill/gen/api/tag_api_exception.rb +1 -1
- data/lib/killbill/gen/api/tag_definition.rb +5 -5
- data/lib/killbill/gen/api/tag_definition_api_exception.rb +1 -1
- data/lib/killbill/gen/api/tag_user_api.rb +54 -54
- data/lib/killbill/gen/api/tenant.rb +2 -2
- data/lib/killbill/gen/api/tenant_api_exception.rb +1 -1
- data/lib/killbill/gen/api/tenant_context.rb +2 -2
- data/lib/killbill/gen/api/tenant_data.rb +2 -2
- data/lib/killbill/gen/api/tenant_kv.rb +2 -2
- data/lib/killbill/gen/api/tenant_user_api.rb +20 -20
- data/lib/killbill/gen/api/unit.rb +2 -2
- data/lib/killbill/gen/api/usage_user_api.rb +7 -7
- data/lib/killbill/gen/plugin-api/currency_plugin_api.rb +19 -19
- data/lib/killbill/gen/plugin-api/ext_bus_event.rb +8 -8
- data/lib/killbill/gen/plugin-api/notification_plugin_api.rb +5 -5
- data/lib/killbill/gen/plugin-api/payment_info_plugin.rb +8 -8
- data/lib/killbill/gen/plugin-api/payment_method_info_plugin.rb +2 -2
- data/lib/killbill/gen/plugin-api/payment_plugin_api.rb +52 -52
- data/lib/killbill/gen/plugin-api/payment_plugin_api_exception.rb +1 -1
- data/lib/killbill/gen/plugin-api/refund_info_plugin.rb +8 -8
- data/lib/killbill/http_servlet.rb +1 -1
- data/lib/killbill/jnotification.rb +3 -3
- data/spec/killbill/killbill_integration_spec.rb +1 -1
- data/spec/killbill/notification_plugin_api_spec.rb +3 -3
- data/spec/killbill/payment_plugin_api_spec.rb +13 -13
- data/spec/spec_helper.rb +1 -1
- metadata +5 -5
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.util.callcontext'
|
31
31
|
class CallContext
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.callcontext.CallContext
|
34
34
|
|
35
35
|
attr_accessor :tenant_id, :user_token, :user_name, :call_origin, :user_type, :reason_code, :comments, :created_date, :updated_date
|
36
36
|
|
@@ -47,11 +47,11 @@ module Killbill
|
|
47
47
|
# conversion for user_name [type = java.lang.String]
|
48
48
|
@user_name = @user_name.to_s unless @user_name.nil?
|
49
49
|
|
50
|
-
# conversion for call_origin [type =
|
51
|
-
@call_origin = Java::
|
50
|
+
# conversion for call_origin [type = org.killbill.billing.util.callcontext.CallOrigin]
|
51
|
+
@call_origin = Java::org.killbill.billing.util.callcontext.CallOrigin.value_of("#{@call_origin.to_s}") unless @call_origin.nil?
|
52
52
|
|
53
|
-
# conversion for user_type [type =
|
54
|
-
@user_type = Java::
|
53
|
+
# conversion for user_type [type = org.killbill.billing.util.callcontext.UserType]
|
54
|
+
@user_type = Java::org.killbill.billing.util.callcontext.UserType.value_of("#{@user_type.to_s}") unless @user_type.nil?
|
55
55
|
|
56
56
|
# conversion for reason_code [type = java.lang.String]
|
57
57
|
@reason_code = @reason_code.to_s unless @reason_code.nil?
|
@@ -85,11 +85,11 @@ module Killbill
|
|
85
85
|
# conversion for user_name [type = java.lang.String]
|
86
86
|
@user_name = j_obj.user_name
|
87
87
|
|
88
|
-
# conversion for call_origin [type =
|
88
|
+
# conversion for call_origin [type = org.killbill.billing.util.callcontext.CallOrigin]
|
89
89
|
@call_origin = j_obj.call_origin
|
90
90
|
@call_origin = @call_origin.to_s.to_sym unless @call_origin.nil?
|
91
91
|
|
92
|
-
# conversion for user_type [type =
|
92
|
+
# conversion for user_type [type = org.killbill.billing.util.callcontext.UserType]
|
93
93
|
@user_type = j_obj.user_type
|
94
94
|
@user_type = @user_type.to_s.to_sym unless @user_type.nil?
|
95
95
|
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.catalog.api'
|
31
31
|
class Catalog
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.catalog.api.Catalog
|
34
34
|
|
35
35
|
attr_accessor :catalog_name, :supported_currencies, :products, :plans
|
36
36
|
|
@@ -41,13 +41,13 @@ 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 supported_currencies [type =
|
45
|
-
@supported_currencies = Java::
|
44
|
+
# conversion for supported_currencies [type = org.killbill.billing.catalog.api.Currency]
|
45
|
+
@supported_currencies = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@supported_currencies.to_s}") unless @supported_currencies.nil?
|
46
46
|
|
47
|
-
# conversion for products [type =
|
47
|
+
# conversion for products [type = org.killbill.billing.catalog.api.Product]
|
48
48
|
@products = @products.to_java unless @products.nil?
|
49
49
|
|
50
|
-
# conversion for plans [type =
|
50
|
+
# conversion for plans [type = org.killbill.billing.catalog.api.Plan]
|
51
51
|
@plans = @plans.to_java unless @plans.nil?
|
52
52
|
self
|
53
53
|
end
|
@@ -56,15 +56,15 @@ module Killbill
|
|
56
56
|
# conversion for catalog_name [type = java.lang.String]
|
57
57
|
@catalog_name = j_obj.catalog_name
|
58
58
|
|
59
|
-
# conversion for supported_currencies [type =
|
59
|
+
# conversion for supported_currencies [type = org.killbill.billing.catalog.api.Currency]
|
60
60
|
@supported_currencies = j_obj.supported_currencies
|
61
61
|
@supported_currencies = @supported_currencies.to_s.to_sym unless @supported_currencies.nil?
|
62
62
|
|
63
|
-
# conversion for products [type =
|
63
|
+
# conversion for products [type = org.killbill.billing.catalog.api.Product]
|
64
64
|
@products = j_obj.products
|
65
65
|
@products = Killbill::Plugin::Model::Product.new.to_ruby(@products) unless @products.nil?
|
66
66
|
|
67
|
-
# conversion for plans [type =
|
67
|
+
# conversion for plans [type = org.killbill.billing.catalog.api.Plan]
|
68
68
|
@plans = j_obj.plans
|
69
69
|
@plans = Killbill::Plugin::Model::Plan.new.to_ruby(@plans) unless @plans.nil?
|
70
70
|
self
|
@@ -44,7 +44,7 @@ module Killbill
|
|
44
44
|
|
45
45
|
# conversion for code [type = int]
|
46
46
|
@code = @code
|
47
|
-
Java::
|
47
|
+
Java::org.killbill.billing.catalog.api.CatalogApiException.new(@message, @cause, @code)
|
48
48
|
end
|
49
49
|
|
50
50
|
def to_ruby(j_obj)
|
@@ -27,26 +27,26 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Api
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.catalog.api'
|
31
31
|
class CatalogUserApi
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.catalog.api.CatalogUserApi
|
34
34
|
|
35
35
|
def initialize(real_java_api)
|
36
36
|
@real_java_api = real_java_api
|
37
37
|
end
|
38
38
|
|
39
39
|
|
40
|
-
java_signature 'Java::
|
40
|
+
java_signature 'Java::org.killbill.billing.catalog.api.Catalog getCatalog(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
41
41
|
def get_catalog(catalogName, context)
|
42
42
|
|
43
43
|
# conversion for catalogName [type = java.lang.String]
|
44
44
|
catalogName = catalogName.to_s unless catalogName.nil?
|
45
45
|
|
46
|
-
# conversion for context [type =
|
46
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
47
47
|
context = context.to_java unless context.nil?
|
48
48
|
res = @real_java_api.get_catalog(catalogName, context)
|
49
|
-
# conversion for res [type =
|
49
|
+
# conversion for res [type = org.killbill.billing.catalog.api.Catalog]
|
50
50
|
res = Killbill::Plugin::Model::Catalog.new.to_ruby(res) unless res.nil?
|
51
51
|
return res
|
52
52
|
end
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.util.api'
|
31
31
|
class ColumnInfo
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.api.ColumnInfo
|
34
34
|
|
35
35
|
attr_accessor :table_name, :column_name, :data_type
|
36
36
|
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.util.tag'
|
31
31
|
class ControlTag
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.tag.ControlTag
|
34
34
|
|
35
35
|
attr_accessor :tag_definition_id, :object_type, :object_id, :id, :created_date, :updated_date, :control_tag_type
|
36
36
|
|
@@ -41,8 +41,8 @@ module Killbill
|
|
41
41
|
# conversion for tag_definition_id [type = java.util.UUID]
|
42
42
|
@tag_definition_id = java.util.UUID.fromString(@tag_definition_id.to_s) unless @tag_definition_id.nil?
|
43
43
|
|
44
|
-
# conversion for object_type [type =
|
45
|
-
@object_type = Java::
|
44
|
+
# conversion for object_type [type = org.killbill.billing.ObjectType]
|
45
|
+
@object_type = Java::org.killbill.billing.ObjectType.value_of("#{@object_type.to_s}") unless @object_type.nil?
|
46
46
|
|
47
47
|
# conversion for object_id [type = java.util.UUID]
|
48
48
|
@object_id = java.util.UUID.fromString(@object_id.to_s) unless @object_id.nil?
|
@@ -62,8 +62,8 @@ module Killbill
|
|
62
62
|
@updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
63
63
|
end
|
64
64
|
|
65
|
-
# conversion for control_tag_type [type =
|
66
|
-
@control_tag_type = Java::
|
65
|
+
# conversion for control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
|
66
|
+
@control_tag_type = Java::org.killbill.billing.util.tag.ControlTagType.value_of("#{@control_tag_type.to_s}") unless @control_tag_type.nil?
|
67
67
|
self
|
68
68
|
end
|
69
69
|
|
@@ -72,7 +72,7 @@ module Killbill
|
|
72
72
|
@tag_definition_id = j_obj.tag_definition_id
|
73
73
|
@tag_definition_id = @tag_definition_id.nil? ? nil : @tag_definition_id.to_s
|
74
74
|
|
75
|
-
# conversion for object_type [type =
|
75
|
+
# conversion for object_type [type = org.killbill.billing.ObjectType]
|
76
76
|
@object_type = j_obj.object_type
|
77
77
|
@object_type = @object_type.to_s.to_sym unless @object_type.nil?
|
78
78
|
|
@@ -100,7 +100,7 @@ module Killbill
|
|
100
100
|
@updated_date = DateTime.iso8601(str)
|
101
101
|
end
|
102
102
|
|
103
|
-
# conversion for control_tag_type [type =
|
103
|
+
# conversion for control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
|
104
104
|
@control_tag_type = j_obj.control_tag_type
|
105
105
|
@control_tag_type = @control_tag_type.to_s.to_sym unless @control_tag_type.nil?
|
106
106
|
self
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.currency.api'
|
31
31
|
class CurrencyConversion
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.currency.api.CurrencyConversion
|
34
34
|
|
35
35
|
attr_accessor :base_currency, :rates
|
36
36
|
|
@@ -38,13 +38,13 @@ module Killbill
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def to_java()
|
41
|
-
# conversion for base_currency [type =
|
42
|
-
@base_currency = Java::
|
41
|
+
# conversion for base_currency [type = org.killbill.billing.catalog.api.Currency]
|
42
|
+
@base_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@base_currency.to_s}") unless @base_currency.nil?
|
43
43
|
|
44
44
|
# conversion for rates [type = java.util.Set]
|
45
45
|
tmp = java.util.TreeSet.new
|
46
46
|
(@rates || []).each do |m|
|
47
|
-
# conversion for m [type =
|
47
|
+
# conversion for m [type = org.killbill.billing.currency.api.Rate]
|
48
48
|
m = m.to_java unless m.nil?
|
49
49
|
tmp.add(m)
|
50
50
|
end
|
@@ -53,7 +53,7 @@ module Killbill
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def to_ruby(j_obj)
|
56
|
-
# conversion for base_currency [type =
|
56
|
+
# conversion for base_currency [type = org.killbill.billing.catalog.api.Currency]
|
57
57
|
@base_currency = j_obj.base_currency
|
58
58
|
@base_currency = @base_currency.to_s.to_sym unless @base_currency.nil?
|
59
59
|
|
@@ -61,7 +61,7 @@ module Killbill
|
|
61
61
|
@rates = j_obj.rates
|
62
62
|
tmp = []
|
63
63
|
(@rates || []).each do |m|
|
64
|
-
# conversion for m [type =
|
64
|
+
# conversion for m [type = org.killbill.billing.currency.api.Rate]
|
65
65
|
m = Killbill::Plugin::Model::Rate.new.to_ruby(m) unless m.nil?
|
66
66
|
tmp << m
|
67
67
|
end
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Api
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.currency.api'
|
31
31
|
class CurrencyConversionApi
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.currency.api.CurrencyConversionApi
|
34
34
|
|
35
35
|
def initialize(real_java_api)
|
36
36
|
@real_java_api = real_java_api
|
@@ -44,37 +44,37 @@ module Killbill
|
|
44
44
|
# conversion for res [type = java.util.Set]
|
45
45
|
tmp = []
|
46
46
|
(res || []).each do |m|
|
47
|
-
# conversion for m [type =
|
47
|
+
# conversion for m [type = org.killbill.billing.catalog.api.Currency]
|
48
48
|
m = m.to_s.to_sym unless m.nil?
|
49
49
|
tmp << m
|
50
50
|
end
|
51
51
|
res = tmp
|
52
52
|
return res
|
53
|
-
rescue Java::
|
53
|
+
rescue Java::org.killbill.billing.currency.api.CurrencyConversionException => e
|
54
54
|
raise Killbill::Plugin::Model::CurrencyConversionException.new.to_ruby(e)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
java_signature 'Java::
|
58
|
+
java_signature 'Java::org.killbill.billing.currency.api.CurrencyConversion getCurrentCurrencyConversion(Java::org.killbill.billing.catalog.api.Currency)'
|
59
59
|
def get_current_currency_conversion(baseCurrency)
|
60
60
|
|
61
|
-
# conversion for baseCurrency [type =
|
62
|
-
baseCurrency = Java::
|
61
|
+
# conversion for baseCurrency [type = org.killbill.billing.catalog.api.Currency]
|
62
|
+
baseCurrency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{baseCurrency.to_s}") unless baseCurrency.nil?
|
63
63
|
begin
|
64
64
|
res = @real_java_api.get_current_currency_conversion(baseCurrency)
|
65
|
-
# conversion for res [type =
|
65
|
+
# conversion for res [type = org.killbill.billing.currency.api.CurrencyConversion]
|
66
66
|
res = Killbill::Plugin::Model::CurrencyConversion.new.to_ruby(res) unless res.nil?
|
67
67
|
return res
|
68
|
-
rescue Java::
|
68
|
+
rescue Java::org.killbill.billing.currency.api.CurrencyConversionException => e
|
69
69
|
raise Killbill::Plugin::Model::CurrencyConversionException.new.to_ruby(e)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
java_signature 'Java::
|
73
|
+
java_signature 'Java::org.killbill.billing.currency.api.CurrencyConversion getCurrencyConversion(Java::org.killbill.billing.catalog.api.Currency, Java::org.joda.time.DateTime)'
|
74
74
|
def get_currency_conversion(baseCurrency, dateConversion)
|
75
75
|
|
76
|
-
# conversion for baseCurrency [type =
|
77
|
-
baseCurrency = Java::
|
76
|
+
# conversion for baseCurrency [type = org.killbill.billing.catalog.api.Currency]
|
77
|
+
baseCurrency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{baseCurrency.to_s}") unless baseCurrency.nil?
|
78
78
|
|
79
79
|
# conversion for dateConversion [type = org.joda.time.DateTime]
|
80
80
|
if !dateConversion.nil?
|
@@ -83,10 +83,10 @@ module Killbill
|
|
83
83
|
end
|
84
84
|
begin
|
85
85
|
res = @real_java_api.get_currency_conversion(baseCurrency, dateConversion)
|
86
|
-
# conversion for res [type =
|
86
|
+
# conversion for res [type = org.killbill.billing.currency.api.CurrencyConversion]
|
87
87
|
res = Killbill::Plugin::Model::CurrencyConversion.new.to_ruby(res) unless res.nil?
|
88
88
|
return res
|
89
|
-
rescue Java::
|
89
|
+
rescue Java::org.killbill.billing.currency.api.CurrencyConversionException => e
|
90
90
|
raise Killbill::Plugin::Model::CurrencyConversionException.new.to_ruby(e)
|
91
91
|
end
|
92
92
|
end
|
@@ -44,7 +44,7 @@ module Killbill
|
|
44
44
|
|
45
45
|
# conversion for code [type = int]
|
46
46
|
@code = @code
|
47
|
-
Java::
|
47
|
+
Java::org.killbill.billing.currency.api.CurrencyConversionException.new(@message, @cause, @code)
|
48
48
|
end
|
49
49
|
|
50
50
|
def to_ruby(j_obj)
|
@@ -44,7 +44,7 @@ module Killbill
|
|
44
44
|
|
45
45
|
# conversion for code [type = int]
|
46
46
|
@code = @code
|
47
|
-
Java::
|
47
|
+
Java::org.killbill.billing.catalog.api.CurrencyValueNull.new(@message, @cause, @code)
|
48
48
|
end
|
49
49
|
|
50
50
|
def to_ruby(j_obj)
|
@@ -27,10 +27,10 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Model
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.util.customfield'
|
31
31
|
class CustomField
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.customfield.CustomField
|
34
34
|
|
35
35
|
attr_accessor :id, :created_date, :updated_date, :object_id, :object_type, :field_name, :field_value
|
36
36
|
|
@@ -56,8 +56,8 @@ module Killbill
|
|
56
56
|
# conversion for object_id [type = java.util.UUID]
|
57
57
|
@object_id = java.util.UUID.fromString(@object_id.to_s) unless @object_id.nil?
|
58
58
|
|
59
|
-
# conversion for object_type [type =
|
60
|
-
@object_type = Java::
|
59
|
+
# conversion for object_type [type = org.killbill.billing.ObjectType]
|
60
|
+
@object_type = Java::org.killbill.billing.ObjectType.value_of("#{@object_type.to_s}") unless @object_type.nil?
|
61
61
|
|
62
62
|
# conversion for field_name [type = java.lang.String]
|
63
63
|
@field_name = @field_name.to_s unless @field_name.nil?
|
@@ -92,7 +92,7 @@ module Killbill
|
|
92
92
|
@object_id = j_obj.object_id
|
93
93
|
@object_id = @object_id.nil? ? nil : @object_id.to_s
|
94
94
|
|
95
|
-
# conversion for object_type [type =
|
95
|
+
# conversion for object_type [type = org.killbill.billing.ObjectType]
|
96
96
|
@object_type = j_obj.object_type
|
97
97
|
@object_type = @object_type.to_s.to_sym unless @object_type.nil?
|
98
98
|
|
@@ -44,7 +44,7 @@ module Killbill
|
|
44
44
|
|
45
45
|
# conversion for code [type = int]
|
46
46
|
@code = @code
|
47
|
-
Java::
|
47
|
+
Java::org.killbill.billing.util.api.CustomFieldApiException.new(@message, @cause, @code)
|
48
48
|
end
|
49
49
|
|
50
50
|
def to_ruby(j_obj)
|
@@ -27,17 +27,17 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Api
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.util.api'
|
31
31
|
class CustomFieldUserApi
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.api.CustomFieldUserApi
|
34
34
|
|
35
35
|
def initialize(real_java_api)
|
36
36
|
@real_java_api = real_java_api
|
37
37
|
end
|
38
38
|
|
39
39
|
|
40
|
-
java_signature 'Java::
|
40
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination searchCustomFields(Java::java.lang.String, Java::java.lang.Long, Java::java.lang.Long, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
41
41
|
def search_custom_fields(searchKey, offset, limit, context)
|
42
42
|
|
43
43
|
# conversion for searchKey [type = java.lang.String]
|
@@ -49,15 +49,15 @@ module Killbill
|
|
49
49
|
# conversion for limit [type = java.lang.Long]
|
50
50
|
limit = limit
|
51
51
|
|
52
|
-
# conversion for context [type =
|
52
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
53
53
|
context = context.to_java unless context.nil?
|
54
54
|
res = @real_java_api.search_custom_fields(searchKey, offset, limit, context)
|
55
|
-
# conversion for res [type =
|
55
|
+
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
56
56
|
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
57
57
|
return res
|
58
58
|
end
|
59
59
|
|
60
|
-
java_signature 'Java::
|
60
|
+
java_signature 'Java::org.killbill.billing.util.entity.Pagination getCustomFields(Java::java.lang.Long, Java::java.lang.Long, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
61
61
|
def get_custom_fields(offset, limit, context)
|
62
62
|
|
63
63
|
# conversion for offset [type = java.lang.Long]
|
@@ -66,64 +66,64 @@ module Killbill
|
|
66
66
|
# conversion for limit [type = java.lang.Long]
|
67
67
|
limit = limit
|
68
68
|
|
69
|
-
# conversion for context [type =
|
69
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
70
70
|
context = context.to_java unless context.nil?
|
71
71
|
res = @real_java_api.get_custom_fields(offset, limit, context)
|
72
|
-
# conversion for res [type =
|
72
|
+
# conversion for res [type = org.killbill.billing.util.entity.Pagination]
|
73
73
|
res = Killbill::Plugin::Model::Pagination.new.to_ruby(res) unless res.nil?
|
74
74
|
return res
|
75
75
|
end
|
76
76
|
|
77
|
-
java_signature 'Java::void addCustomFields(Java::java.util.List, Java::
|
77
|
+
java_signature 'Java::void addCustomFields(Java::java.util.List, Java::org.killbill.billing.util.callcontext.CallContext)'
|
78
78
|
def add_custom_fields(fields, context)
|
79
79
|
|
80
80
|
# conversion for fields [type = java.util.List]
|
81
81
|
tmp = java.util.ArrayList.new
|
82
82
|
(fields || []).each do |m|
|
83
|
-
# conversion for m [type =
|
83
|
+
# conversion for m [type = org.killbill.billing.util.customfield.CustomField]
|
84
84
|
m = m.to_java unless m.nil?
|
85
85
|
tmp.add(m)
|
86
86
|
end
|
87
87
|
fields = tmp
|
88
88
|
|
89
|
-
# conversion for context [type =
|
89
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
90
90
|
context = context.to_java unless context.nil?
|
91
91
|
@real_java_api.add_custom_fields(fields, context)
|
92
92
|
end
|
93
93
|
|
94
|
-
java_signature 'Java::void removeCustomFields(Java::java.util.List, Java::
|
94
|
+
java_signature 'Java::void removeCustomFields(Java::java.util.List, Java::org.killbill.billing.util.callcontext.CallContext)'
|
95
95
|
def remove_custom_fields(fields, context)
|
96
96
|
|
97
97
|
# conversion for fields [type = java.util.List]
|
98
98
|
tmp = java.util.ArrayList.new
|
99
99
|
(fields || []).each do |m|
|
100
|
-
# conversion for m [type =
|
100
|
+
# conversion for m [type = org.killbill.billing.util.customfield.CustomField]
|
101
101
|
m = m.to_java unless m.nil?
|
102
102
|
tmp.add(m)
|
103
103
|
end
|
104
104
|
fields = tmp
|
105
105
|
|
106
|
-
# conversion for context [type =
|
106
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
107
107
|
context = context.to_java unless context.nil?
|
108
108
|
@real_java_api.remove_custom_fields(fields, context)
|
109
109
|
end
|
110
110
|
|
111
|
-
java_signature 'Java::java.util.List getCustomFieldsForObject(Java::java.util.UUID, Java::
|
111
|
+
java_signature 'Java::java.util.List getCustomFieldsForObject(Java::java.util.UUID, Java::org.killbill.billing.ObjectType, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
112
112
|
def get_custom_fields_for_object(objectId, objectType, context)
|
113
113
|
|
114
114
|
# conversion for objectId [type = java.util.UUID]
|
115
115
|
objectId = java.util.UUID.fromString(objectId.to_s) unless objectId.nil?
|
116
116
|
|
117
|
-
# conversion for objectType [type =
|
118
|
-
objectType = Java::
|
117
|
+
# conversion for objectType [type = org.killbill.billing.ObjectType]
|
118
|
+
objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
119
119
|
|
120
|
-
# conversion for context [type =
|
120
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
121
121
|
context = context.to_java unless context.nil?
|
122
122
|
res = @real_java_api.get_custom_fields_for_object(objectId, objectType, context)
|
123
123
|
# conversion for res [type = java.util.List]
|
124
124
|
tmp = []
|
125
125
|
(res || []).each do |m|
|
126
|
-
# conversion for m [type =
|
126
|
+
# conversion for m [type = org.killbill.billing.util.customfield.CustomField]
|
127
127
|
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
128
128
|
tmp << m
|
129
129
|
end
|
@@ -131,22 +131,22 @@ module Killbill
|
|
131
131
|
return res
|
132
132
|
end
|
133
133
|
|
134
|
-
java_signature 'Java::java.util.List getCustomFieldsForAccountType(Java::java.util.UUID, Java::
|
134
|
+
java_signature 'Java::java.util.List getCustomFieldsForAccountType(Java::java.util.UUID, Java::org.killbill.billing.ObjectType, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
135
135
|
def get_custom_fields_for_account_type(accountId, objectType, context)
|
136
136
|
|
137
137
|
# conversion for accountId [type = java.util.UUID]
|
138
138
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
139
139
|
|
140
|
-
# conversion for objectType [type =
|
141
|
-
objectType = Java::
|
140
|
+
# conversion for objectType [type = org.killbill.billing.ObjectType]
|
141
|
+
objectType = Java::org.killbill.billing.ObjectType.value_of("#{objectType.to_s}") unless objectType.nil?
|
142
142
|
|
143
|
-
# conversion for context [type =
|
143
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
144
144
|
context = context.to_java unless context.nil?
|
145
145
|
res = @real_java_api.get_custom_fields_for_account_type(accountId, objectType, context)
|
146
146
|
# conversion for res [type = java.util.List]
|
147
147
|
tmp = []
|
148
148
|
(res || []).each do |m|
|
149
|
-
# conversion for m [type =
|
149
|
+
# conversion for m [type = org.killbill.billing.util.customfield.CustomField]
|
150
150
|
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
151
151
|
tmp << m
|
152
152
|
end
|
@@ -154,19 +154,19 @@ module Killbill
|
|
154
154
|
return res
|
155
155
|
end
|
156
156
|
|
157
|
-
java_signature 'Java::java.util.List getCustomFieldsForAccount(Java::java.util.UUID, Java::
|
157
|
+
java_signature 'Java::java.util.List getCustomFieldsForAccount(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
158
158
|
def get_custom_fields_for_account(accountId, context)
|
159
159
|
|
160
160
|
# conversion for accountId [type = java.util.UUID]
|
161
161
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
162
162
|
|
163
|
-
# conversion for context [type =
|
163
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
164
164
|
context = context.to_java unless context.nil?
|
165
165
|
res = @real_java_api.get_custom_fields_for_account(accountId, context)
|
166
166
|
# conversion for res [type = java.util.List]
|
167
167
|
tmp = []
|
168
168
|
(res || []).each do |m|
|
169
|
-
# conversion for m [type =
|
169
|
+
# conversion for m [type = org.killbill.billing.util.customfield.CustomField]
|
170
170
|
m = Killbill::Plugin::Model::CustomField.new.to_ruby(m) unless m.nil?
|
171
171
|
tmp << m
|
172
172
|
end
|