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
@@ -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.entitlement.api.EntitlementApiException.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.entity'
|
31
31
|
class Entity
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.util.entity.Entity
|
34
34
|
|
35
35
|
attr_accessor :id, :created_date, :updated_date
|
36
36
|
|
@@ -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.IllegalPlanChange.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.catalog.api'
|
31
31
|
class InternationalPrice
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.catalog.api.InternationalPrice
|
34
34
|
|
35
35
|
attr_accessor :prices, :price, :is_zero
|
36
36
|
|
@@ -38,7 +38,7 @@ module Killbill
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def to_java()
|
41
|
-
# conversion for prices [type =
|
41
|
+
# conversion for prices [type = org.killbill.billing.catalog.api.Price]
|
42
42
|
@prices = @prices.to_java unless @prices.nil?
|
43
43
|
|
44
44
|
# conversion for price [type = java.math.BigDecimal]
|
@@ -54,7 +54,7 @@ module Killbill
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def to_ruby(j_obj)
|
57
|
-
# conversion for prices [type =
|
57
|
+
# conversion for prices [type = org.killbill.billing.catalog.api.Price]
|
58
58
|
@prices = j_obj.prices
|
59
59
|
@prices = Killbill::Plugin::Model::Price.new.to_ruby(@prices) unless @prices.nil?
|
60
60
|
|
@@ -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.invoice.api'
|
31
31
|
class Invoice
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.Invoice
|
34
34
|
|
35
35
|
attr_accessor :id, :created_date, :updated_date, :invoice_items, :number_of_items, :payments, :number_of_payments, :account_id, :invoice_number, :invoice_date, :target_date, :currency, :paid_amount, :original_charged_amount, :charged_amount, :credited_amount, :refunded_amount, :balance, :is_migration_invoice
|
36
36
|
|
@@ -56,7 +56,7 @@ module Killbill
|
|
56
56
|
# conversion for invoice_items [type = java.util.List]
|
57
57
|
tmp = java.util.ArrayList.new
|
58
58
|
(@invoice_items || []).each do |m|
|
59
|
-
# conversion for m [type =
|
59
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoiceItem]
|
60
60
|
m = m.to_java unless m.nil?
|
61
61
|
tmp.add(m)
|
62
62
|
end
|
@@ -68,7 +68,7 @@ module Killbill
|
|
68
68
|
# conversion for payments [type = java.util.List]
|
69
69
|
tmp = java.util.ArrayList.new
|
70
70
|
(@payments || []).each do |m|
|
71
|
-
# conversion for m [type =
|
71
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
72
72
|
m = m.to_java unless m.nil?
|
73
73
|
tmp.add(m)
|
74
74
|
end
|
@@ -93,8 +93,8 @@ module Killbill
|
|
93
93
|
@target_date = Java::org.joda.time.LocalDate.parse(@target_date.to_s)
|
94
94
|
end
|
95
95
|
|
96
|
-
# conversion for currency [type =
|
97
|
-
@currency = Java::
|
96
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
97
|
+
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
98
98
|
|
99
99
|
# conversion for paid_amount [type = java.math.BigDecimal]
|
100
100
|
if @paid_amount.nil?
|
@@ -168,7 +168,7 @@ module Killbill
|
|
168
168
|
@invoice_items = j_obj.invoice_items
|
169
169
|
tmp = []
|
170
170
|
(@invoice_items || []).each do |m|
|
171
|
-
# conversion for m [type =
|
171
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoiceItem]
|
172
172
|
m = Killbill::Plugin::Model::InvoiceItem.new.to_ruby(m) unless m.nil?
|
173
173
|
tmp << m
|
174
174
|
end
|
@@ -181,7 +181,7 @@ module Killbill
|
|
181
181
|
@payments = j_obj.payments
|
182
182
|
tmp = []
|
183
183
|
(@payments || []).each do |m|
|
184
|
-
# conversion for m [type =
|
184
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
185
185
|
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
186
186
|
tmp << m
|
187
187
|
end
|
@@ -209,7 +209,7 @@ module Killbill
|
|
209
209
|
@target_date = @target_date.to_s
|
210
210
|
end
|
211
211
|
|
212
|
-
# conversion for currency [type =
|
212
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
213
213
|
@currency = j_obj.currency
|
214
214
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
215
215
|
|
@@ -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.invoice.api.InvoiceApiException.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.invoice.api'
|
31
31
|
class InvoiceCreationEvent
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.InvoiceCreationEvent
|
34
34
|
|
35
35
|
attr_accessor
|
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.invoice.api.formatters'
|
31
31
|
class InvoiceFormatter
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.formatters.InvoiceFormatter
|
34
34
|
|
35
35
|
attr_accessor :invoice_items, :number_of_items, :payments, :number_of_payments, :account_id, :invoice_number, :invoice_date, :target_date, :currency, :paid_amount, :original_charged_amount, :charged_amount, :credited_amount, :refunded_amount, :balance, :is_migration_invoice, :id, :created_date, :updated_date, :formatted_invoice_date, :formatted_charged_amount, :formatted_paid_amount, :formatted_balance, :processed_currency, :processed_payment_rate
|
36
36
|
|
@@ -41,7 +41,7 @@ module Killbill
|
|
41
41
|
# conversion for invoice_items [type = java.util.List]
|
42
42
|
tmp = java.util.ArrayList.new
|
43
43
|
(@invoice_items || []).each do |m|
|
44
|
-
# conversion for m [type =
|
44
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoiceItem]
|
45
45
|
m = m.to_java unless m.nil?
|
46
46
|
tmp.add(m)
|
47
47
|
end
|
@@ -53,7 +53,7 @@ module Killbill
|
|
53
53
|
# conversion for payments [type = java.util.List]
|
54
54
|
tmp = java.util.ArrayList.new
|
55
55
|
(@payments || []).each do |m|
|
56
|
-
# conversion for m [type =
|
56
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
57
57
|
m = m.to_java unless m.nil?
|
58
58
|
tmp.add(m)
|
59
59
|
end
|
@@ -78,8 +78,8 @@ module Killbill
|
|
78
78
|
@target_date = Java::org.joda.time.LocalDate.parse(@target_date.to_s)
|
79
79
|
end
|
80
80
|
|
81
|
-
# conversion for currency [type =
|
82
|
-
@currency = Java::
|
81
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
82
|
+
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
83
83
|
|
84
84
|
# conversion for paid_amount [type = java.math.BigDecimal]
|
85
85
|
if @paid_amount.nil?
|
@@ -153,8 +153,8 @@ module Killbill
|
|
153
153
|
# conversion for formatted_balance [type = java.lang.String]
|
154
154
|
@formatted_balance = @formatted_balance.to_s unless @formatted_balance.nil?
|
155
155
|
|
156
|
-
# conversion for processed_currency [type =
|
157
|
-
@processed_currency = Java::
|
156
|
+
# conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
|
157
|
+
@processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@processed_currency.to_s}") unless @processed_currency.nil?
|
158
158
|
|
159
159
|
# conversion for processed_payment_rate [type = java.lang.String]
|
160
160
|
@processed_payment_rate = @processed_payment_rate.to_s unless @processed_payment_rate.nil?
|
@@ -166,7 +166,7 @@ module Killbill
|
|
166
166
|
@invoice_items = j_obj.invoice_items
|
167
167
|
tmp = []
|
168
168
|
(@invoice_items || []).each do |m|
|
169
|
-
# conversion for m [type =
|
169
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoiceItem]
|
170
170
|
m = Killbill::Plugin::Model::InvoiceItem.new.to_ruby(m) unless m.nil?
|
171
171
|
tmp << m
|
172
172
|
end
|
@@ -179,7 +179,7 @@ module Killbill
|
|
179
179
|
@payments = j_obj.payments
|
180
180
|
tmp = []
|
181
181
|
(@payments || []).each do |m|
|
182
|
-
# conversion for m [type =
|
182
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
183
183
|
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
184
184
|
tmp << m
|
185
185
|
end
|
@@ -207,7 +207,7 @@ module Killbill
|
|
207
207
|
@target_date = @target_date.to_s
|
208
208
|
end
|
209
209
|
|
210
|
-
# conversion for currency [type =
|
210
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
211
211
|
@currency = j_obj.currency
|
212
212
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
213
213
|
|
@@ -276,7 +276,7 @@ module Killbill
|
|
276
276
|
# conversion for formatted_balance [type = java.lang.String]
|
277
277
|
@formatted_balance = j_obj.formatted_balance
|
278
278
|
|
279
|
-
# conversion for processed_currency [type =
|
279
|
+
# conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
|
280
280
|
@processed_currency = j_obj.processed_currency
|
281
281
|
@processed_currency = @processed_currency.to_s.to_sym unless @processed_currency.nil?
|
282
282
|
|
@@ -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.invoice.api'
|
31
31
|
class InvoiceItem
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.InvoiceItem
|
34
34
|
|
35
35
|
attr_accessor :id, :created_date, :updated_date, :invoice_item_type, :invoice_id, :account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :plan_name, :phase_name, :rate, :linked_item_id
|
36
36
|
|
@@ -53,8 +53,8 @@ module Killbill
|
|
53
53
|
@updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
54
54
|
end
|
55
55
|
|
56
|
-
# conversion for invoice_item_type [type =
|
57
|
-
@invoice_item_type = Java::
|
56
|
+
# conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
|
57
|
+
@invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of("#{@invoice_item_type.to_s}") unless @invoice_item_type.nil?
|
58
58
|
|
59
59
|
# conversion for invoice_id [type = java.util.UUID]
|
60
60
|
@invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
|
@@ -79,8 +79,8 @@ module Killbill
|
|
79
79
|
@amount = java.math.BigDecimal.new(@amount.to_s)
|
80
80
|
end
|
81
81
|
|
82
|
-
# conversion for currency [type =
|
83
|
-
@currency = Java::
|
82
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
83
|
+
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
84
84
|
|
85
85
|
# conversion for description [type = java.lang.String]
|
86
86
|
@description = @description.to_s unless @description.nil?
|
@@ -130,7 +130,7 @@ module Killbill
|
|
130
130
|
@updated_date = DateTime.iso8601(str)
|
131
131
|
end
|
132
132
|
|
133
|
-
# conversion for invoice_item_type [type =
|
133
|
+
# conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
|
134
134
|
@invoice_item_type = j_obj.invoice_item_type
|
135
135
|
@invoice_item_type = @invoice_item_type.to_s.to_sym unless @invoice_item_type.nil?
|
136
136
|
|
@@ -158,7 +158,7 @@ module Killbill
|
|
158
158
|
@amount = j_obj.amount
|
159
159
|
@amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s)
|
160
160
|
|
161
|
-
# conversion for currency [type =
|
161
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
162
162
|
@currency = j_obj.currency
|
163
163
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
164
164
|
|
@@ -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.invoice.api.formatters'
|
31
31
|
class InvoiceItemFormatter
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.formatters.InvoiceItemFormatter
|
34
34
|
|
35
35
|
attr_accessor :invoice_item_type, :invoice_id, :account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :plan_name, :phase_name, :rate, :linked_item_id, :id, :created_date, :updated_date, :formatted_start_date, :formatted_end_date, :formatted_amount
|
36
36
|
|
@@ -38,8 +38,8 @@ module Killbill
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def to_java()
|
41
|
-
# conversion for invoice_item_type [type =
|
42
|
-
@invoice_item_type = Java::
|
41
|
+
# conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
|
42
|
+
@invoice_item_type = Java::org.killbill.billing.invoice.api.InvoiceItemType.value_of("#{@invoice_item_type.to_s}") unless @invoice_item_type.nil?
|
43
43
|
|
44
44
|
# conversion for invoice_id [type = java.util.UUID]
|
45
45
|
@invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
|
@@ -64,8 +64,8 @@ module Killbill
|
|
64
64
|
@amount = java.math.BigDecimal.new(@amount.to_s)
|
65
65
|
end
|
66
66
|
|
67
|
-
# conversion for currency [type =
|
68
|
-
@currency = Java::
|
67
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
68
|
+
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
69
69
|
|
70
70
|
# conversion for description [type = java.lang.String]
|
71
71
|
@description = @description.to_s unless @description.nil?
|
@@ -119,7 +119,7 @@ module Killbill
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def to_ruby(j_obj)
|
122
|
-
# conversion for invoice_item_type [type =
|
122
|
+
# conversion for invoice_item_type [type = org.killbill.billing.invoice.api.InvoiceItemType]
|
123
123
|
@invoice_item_type = j_obj.invoice_item_type
|
124
124
|
@invoice_item_type = @invoice_item_type.to_s.to_sym unless @invoice_item_type.nil?
|
125
125
|
|
@@ -147,7 +147,7 @@ module Killbill
|
|
147
147
|
@amount = j_obj.amount
|
148
148
|
@amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s)
|
149
149
|
|
150
|
-
# conversion for currency [type =
|
150
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
151
151
|
@currency = j_obj.currency
|
152
152
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
153
153
|
|
@@ -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.invoice.api'
|
31
31
|
class InvoicePayment
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.InvoicePayment
|
34
34
|
|
35
35
|
attr_accessor :id, :created_date, :updated_date, :payment_id, :type, :invoice_id, :payment_date, :amount, :currency, :linked_invoice_payment_id, :payment_cookie_id, :processed_currency
|
36
36
|
|
@@ -56,8 +56,8 @@ module Killbill
|
|
56
56
|
# conversion for payment_id [type = java.util.UUID]
|
57
57
|
@payment_id = java.util.UUID.fromString(@payment_id.to_s) unless @payment_id.nil?
|
58
58
|
|
59
|
-
# conversion for type [type =
|
60
|
-
@type = Java::
|
59
|
+
# conversion for type [type = org.killbill.billing.invoice.api.InvoicePaymentType]
|
60
|
+
@type = Java::org.killbill.billing.invoice.api.InvoicePaymentType.value_of("#{@type.to_s}") unless @type.nil?
|
61
61
|
|
62
62
|
# conversion for invoice_id [type = java.util.UUID]
|
63
63
|
@invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
|
@@ -75,8 +75,8 @@ module Killbill
|
|
75
75
|
@amount = java.math.BigDecimal.new(@amount.to_s)
|
76
76
|
end
|
77
77
|
|
78
|
-
# conversion for currency [type =
|
79
|
-
@currency = Java::
|
78
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
79
|
+
@currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
80
80
|
|
81
81
|
# conversion for linked_invoice_payment_id [type = java.util.UUID]
|
82
82
|
@linked_invoice_payment_id = java.util.UUID.fromString(@linked_invoice_payment_id.to_s) unless @linked_invoice_payment_id.nil?
|
@@ -84,8 +84,8 @@ module Killbill
|
|
84
84
|
# conversion for payment_cookie_id [type = java.util.UUID]
|
85
85
|
@payment_cookie_id = java.util.UUID.fromString(@payment_cookie_id.to_s) unless @payment_cookie_id.nil?
|
86
86
|
|
87
|
-
# conversion for processed_currency [type =
|
88
|
-
@processed_currency = Java::
|
87
|
+
# conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
|
88
|
+
@processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of("#{@processed_currency.to_s}") unless @processed_currency.nil?
|
89
89
|
self
|
90
90
|
end
|
91
91
|
|
@@ -114,7 +114,7 @@ module Killbill
|
|
114
114
|
@payment_id = j_obj.payment_id
|
115
115
|
@payment_id = @payment_id.nil? ? nil : @payment_id.to_s
|
116
116
|
|
117
|
-
# conversion for type [type =
|
117
|
+
# conversion for type [type = org.killbill.billing.invoice.api.InvoicePaymentType]
|
118
118
|
@type = j_obj.type
|
119
119
|
@type = @type.to_s.to_sym unless @type.nil?
|
120
120
|
|
@@ -134,7 +134,7 @@ module Killbill
|
|
134
134
|
@amount = j_obj.amount
|
135
135
|
@amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s)
|
136
136
|
|
137
|
-
# conversion for currency [type =
|
137
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
138
138
|
@currency = j_obj.currency
|
139
139
|
@currency = @currency.to_s.to_sym unless @currency.nil?
|
140
140
|
|
@@ -146,7 +146,7 @@ module Killbill
|
|
146
146
|
@payment_cookie_id = j_obj.payment_cookie_id
|
147
147
|
@payment_cookie_id = @payment_cookie_id.nil? ? nil : @payment_cookie_id.to_s
|
148
148
|
|
149
|
-
# conversion for processed_currency [type =
|
149
|
+
# conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency]
|
150
150
|
@processed_currency = j_obj.processed_currency
|
151
151
|
@processed_currency = @processed_currency.to_s.to_sym unless @processed_currency.nil?
|
152
152
|
self
|
@@ -27,29 +27,29 @@ module Killbill
|
|
27
27
|
module Plugin
|
28
28
|
module Api
|
29
29
|
|
30
|
-
java_package '
|
30
|
+
java_package 'org.killbill.billing.invoice.api'
|
31
31
|
class InvoicePaymentApi
|
32
32
|
|
33
|
-
include
|
33
|
+
include org.killbill.billing.invoice.api.InvoicePaymentApi
|
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::java.util.List getAllInvoicesByAccount(Java::java.util.UUID, Java::
|
40
|
+
java_signature 'Java::java.util.List getAllInvoicesByAccount(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
41
41
|
def get_all_invoices_by_account(accountId, context)
|
42
42
|
|
43
43
|
# conversion for accountId [type = java.util.UUID]
|
44
44
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.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_all_invoices_by_account(accountId, context)
|
49
49
|
# conversion for res [type = java.util.List]
|
50
50
|
tmp = []
|
51
51
|
(res || []).each do |m|
|
52
|
-
# conversion for m [type =
|
52
|
+
# conversion for m [type = org.killbill.billing.invoice.api.Invoice]
|
53
53
|
m = Killbill::Plugin::Model::Invoice.new.to_ruby(m) unless m.nil?
|
54
54
|
tmp << m
|
55
55
|
end
|
@@ -57,37 +57,37 @@ module Killbill
|
|
57
57
|
return res
|
58
58
|
end
|
59
59
|
|
60
|
-
java_signature 'Java::
|
60
|
+
java_signature 'Java::org.killbill.billing.invoice.api.Invoice getInvoice(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
61
61
|
def get_invoice(invoiceId, context)
|
62
62
|
|
63
63
|
# conversion for invoiceId [type = java.util.UUID]
|
64
64
|
invoiceId = java.util.UUID.fromString(invoiceId.to_s) unless invoiceId.nil?
|
65
65
|
|
66
|
-
# conversion for context [type =
|
66
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
67
67
|
context = context.to_java unless context.nil?
|
68
68
|
begin
|
69
69
|
res = @real_java_api.get_invoice(invoiceId, context)
|
70
|
-
# conversion for res [type =
|
70
|
+
# conversion for res [type = org.killbill.billing.invoice.api.Invoice]
|
71
71
|
res = Killbill::Plugin::Model::Invoice.new.to_ruby(res) unless res.nil?
|
72
72
|
return res
|
73
|
-
rescue Java::
|
73
|
+
rescue Java::org.killbill.billing.invoice.api.InvoiceApiException => e
|
74
74
|
raise Killbill::Plugin::Model::InvoiceApiException.new.to_ruby(e)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
java_signature 'Java::java.util.List getInvoicePayments(Java::java.util.UUID, Java::
|
78
|
+
java_signature 'Java::java.util.List getInvoicePayments(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
79
79
|
def get_invoice_payments(paymentId, context)
|
80
80
|
|
81
81
|
# conversion for paymentId [type = java.util.UUID]
|
82
82
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
83
83
|
|
84
|
-
# conversion for context [type =
|
84
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
85
85
|
context = context.to_java unless context.nil?
|
86
86
|
res = @real_java_api.get_invoice_payments(paymentId, context)
|
87
87
|
# conversion for res [type = java.util.List]
|
88
88
|
tmp = []
|
89
89
|
(res || []).each do |m|
|
90
|
-
# conversion for m [type =
|
90
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
91
91
|
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
92
92
|
tmp << m
|
93
93
|
end
|
@@ -95,21 +95,21 @@ module Killbill
|
|
95
95
|
return res
|
96
96
|
end
|
97
97
|
|
98
|
-
java_signature 'Java::
|
98
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment getInvoicePaymentForAttempt(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
99
99
|
def get_invoice_payment_for_attempt(paymentId, context)
|
100
100
|
|
101
101
|
# conversion for paymentId [type = java.util.UUID]
|
102
102
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
103
103
|
|
104
|
-
# conversion for context [type =
|
104
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
105
105
|
context = context.to_java unless context.nil?
|
106
106
|
res = @real_java_api.get_invoice_payment_for_attempt(paymentId, context)
|
107
|
-
# conversion for res [type =
|
107
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
108
108
|
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
109
109
|
return res
|
110
110
|
end
|
111
111
|
|
112
|
-
java_signature 'Java::
|
112
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment createChargeback(Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.util.callcontext.CallContext)'
|
113
113
|
def create_chargeback(invoicePaymentId, amount, context)
|
114
114
|
|
115
115
|
# conversion for invoicePaymentId [type = java.util.UUID]
|
@@ -122,25 +122,25 @@ module Killbill
|
|
122
122
|
amount = java.math.BigDecimal.new(amount.to_s)
|
123
123
|
end
|
124
124
|
|
125
|
-
# conversion for context [type =
|
125
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
126
126
|
context = context.to_java unless context.nil?
|
127
127
|
begin
|
128
128
|
res = @real_java_api.create_chargeback(invoicePaymentId, amount, context)
|
129
|
-
# conversion for res [type =
|
129
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
130
130
|
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
131
131
|
return res
|
132
|
-
rescue Java::
|
132
|
+
rescue Java::org.killbill.billing.invoice.api.InvoiceApiException => e
|
133
133
|
raise Killbill::Plugin::Model::InvoiceApiException.new.to_ruby(e)
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
-
java_signature 'Java::java.math.BigDecimal getRemainingAmountPaid(Java::java.util.UUID, Java::
|
137
|
+
java_signature 'Java::java.math.BigDecimal getRemainingAmountPaid(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
138
138
|
def get_remaining_amount_paid(invoicePaymentId, context)
|
139
139
|
|
140
140
|
# conversion for invoicePaymentId [type = java.util.UUID]
|
141
141
|
invoicePaymentId = java.util.UUID.fromString(invoicePaymentId.to_s) unless invoicePaymentId.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_remaining_amount_paid(invoicePaymentId, context)
|
146
146
|
# conversion for res [type = java.math.BigDecimal]
|
@@ -148,19 +148,19 @@ module Killbill
|
|
148
148
|
return res
|
149
149
|
end
|
150
150
|
|
151
|
-
java_signature 'Java::java.util.List getChargebacksByAccountId(Java::java.util.UUID, Java::
|
151
|
+
java_signature 'Java::java.util.List getChargebacksByAccountId(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
152
152
|
def get_chargebacks_by_account_id(accountId, context)
|
153
153
|
|
154
154
|
# conversion for accountId [type = java.util.UUID]
|
155
155
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
156
156
|
|
157
|
-
# conversion for context [type =
|
157
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
158
158
|
context = context.to_java unless context.nil?
|
159
159
|
res = @real_java_api.get_chargebacks_by_account_id(accountId, context)
|
160
160
|
# conversion for res [type = java.util.List]
|
161
161
|
tmp = []
|
162
162
|
(res || []).each do |m|
|
163
|
-
# conversion for m [type =
|
163
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
164
164
|
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
165
165
|
tmp << m
|
166
166
|
end
|
@@ -168,37 +168,37 @@ module Killbill
|
|
168
168
|
return res
|
169
169
|
end
|
170
170
|
|
171
|
-
java_signature 'Java::java.util.UUID getAccountIdFromInvoicePaymentId(Java::java.util.UUID, Java::
|
171
|
+
java_signature 'Java::java.util.UUID getAccountIdFromInvoicePaymentId(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
172
172
|
def get_account_id_from_invoice_payment_id(uuid, context)
|
173
173
|
|
174
174
|
# conversion for uuid [type = java.util.UUID]
|
175
175
|
uuid = java.util.UUID.fromString(uuid.to_s) unless uuid.nil?
|
176
176
|
|
177
|
-
# conversion for context [type =
|
177
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
178
178
|
context = context.to_java unless context.nil?
|
179
179
|
begin
|
180
180
|
res = @real_java_api.get_account_id_from_invoice_payment_id(uuid, context)
|
181
181
|
# conversion for res [type = java.util.UUID]
|
182
182
|
res = res.nil? ? nil : res.to_s
|
183
183
|
return res
|
184
|
-
rescue Java::
|
184
|
+
rescue Java::org.killbill.billing.invoice.api.InvoiceApiException => e
|
185
185
|
raise Killbill::Plugin::Model::InvoiceApiException.new.to_ruby(e)
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
189
|
-
java_signature 'Java::java.util.List getChargebacksByPaymentId(Java::java.util.UUID, Java::
|
189
|
+
java_signature 'Java::java.util.List getChargebacksByPaymentId(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
190
190
|
def get_chargebacks_by_payment_id(paymentId, context)
|
191
191
|
|
192
192
|
# conversion for paymentId [type = java.util.UUID]
|
193
193
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
194
194
|
|
195
|
-
# conversion for context [type =
|
195
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
196
196
|
context = context.to_java unless context.nil?
|
197
197
|
res = @real_java_api.get_chargebacks_by_payment_id(paymentId, context)
|
198
198
|
# conversion for res [type = java.util.List]
|
199
199
|
tmp = []
|
200
200
|
(res || []).each do |m|
|
201
|
-
# conversion for m [type =
|
201
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
202
202
|
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
203
203
|
tmp << m
|
204
204
|
end
|
@@ -206,20 +206,20 @@ module Killbill
|
|
206
206
|
return res
|
207
207
|
end
|
208
208
|
|
209
|
-
java_signature 'Java::
|
209
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment getChargebackById(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
210
210
|
def get_chargeback_by_id(chargebackId, context)
|
211
211
|
|
212
212
|
# conversion for chargebackId [type = java.util.UUID]
|
213
213
|
chargebackId = java.util.UUID.fromString(chargebackId.to_s) unless chargebackId.nil?
|
214
214
|
|
215
|
-
# conversion for context [type =
|
215
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
216
216
|
context = context.to_java unless context.nil?
|
217
217
|
begin
|
218
218
|
res = @real_java_api.get_chargeback_by_id(chargebackId, context)
|
219
|
-
# conversion for res [type =
|
219
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
220
220
|
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
221
221
|
return res
|
222
|
-
rescue Java::
|
222
|
+
rescue Java::org.killbill.billing.invoice.api.InvoiceApiException => e
|
223
223
|
raise Killbill::Plugin::Model::InvoiceApiException.new.to_ruby(e)
|
224
224
|
end
|
225
225
|
end
|