killbill 7.0.6 → 8.0.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/.travis.yml +0 -6
- data/Gemfile.lock +13 -15
- data/Jarfile +10 -9
- data/Jarfile.lock +53 -50
- data/NEWS +0 -4
- data/README.md +13 -1
- data/generators/active_merchant/templates/spec/spec_helper.rb +5 -9
- data/killbill.gemspec +0 -1
- data/lib/killbill/gen/api/account.rb +26 -1
- data/lib/killbill/gen/api/dry_run_arguments.rb +4 -7
- data/lib/killbill/gen/api/entitlement.rb +7 -1
- data/lib/killbill/gen/api/entitlement_api.rb +42 -84
- data/lib/killbill/gen/api/immutable_account_data.rb +26 -1
- data/lib/killbill/gen/api/invoice_user_api.rb +52 -12
- data/lib/killbill/gen/api/killbill_nodes_api.rb +30 -13
- data/lib/killbill/gen/api/migration_plan.rb +19 -12
- data/lib/killbill/gen/api/osgi_killbill.rb +8 -1
- data/lib/killbill/gen/api/payment_api.rb +51 -0
- data/lib/killbill/gen/api/plan.rb +19 -12
- data/lib/killbill/gen/api/require_gen.rb +1 -0
- data/lib/killbill/gen/api/subscription.rb +7 -1
- data/lib/killbill/gen/api/subscription_api.rb +279 -164
- data/lib/killbill/gen/api/subscription_event.rb +1 -12
- data/lib/killbill/gen/api/subscription_usage_record.rb +8 -2
- data/lib/killbill/gen/api/usage_api_exception.rb +68 -0
- data/lib/killbill/gen/plugin-api/blocking_state_metadata.rb +137 -0
- data/lib/killbill/gen/plugin-api/entitlement_context.rb +26 -8
- data/lib/killbill/gen/plugin-api/prior_entitlement_result.rb +26 -8
- data/lib/killbill/gen/plugin-api/require_gen.rb +1 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +1 -0
- data/lib/killbill/helpers/active_merchant/payment_plugin.rb +1 -6
- data/lib/killbill/migration.rb +2 -13
- data/lib/killbill/version.rb +1 -1
- data/spec/killbill/helpers/payment_method_spec.rb +8 -8
- data/spec/killbill/helpers/response_spec.rb +4 -4
- data/spec/spec_helper.rb +1 -1
- metadata +102 -82
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.account.api.ImmutableAccountData
|
36
36
|
|
37
|
-
attr_accessor :id, :external_key, :currency, :time_zone
|
37
|
+
attr_accessor :id, :external_key, :currency, :time_zone, :fixed_offset_time_zone, :reference_time
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -53,6 +53,17 @@ module Killbill
|
|
53
53
|
if !@time_zone.nil?
|
54
54
|
@time_zone = Java::org.joda.time.DateTimeZone.forID((@time_zone.respond_to?(:identifier) ? @time_zone.identifier : @time_zone.to_s))
|
55
55
|
end
|
56
|
+
|
57
|
+
# conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone]
|
58
|
+
if !@fixed_offset_time_zone.nil?
|
59
|
+
@fixed_offset_time_zone = Java::org.joda.time.DateTimeZone.forID((@fixed_offset_time_zone.respond_to?(:identifier) ? @fixed_offset_time_zone.identifier : @fixed_offset_time_zone.to_s))
|
60
|
+
end
|
61
|
+
|
62
|
+
# conversion for reference_time [type = org.joda.time.DateTime]
|
63
|
+
if !@reference_time.nil?
|
64
|
+
@reference_time = (@reference_time.kind_of? Time) ? DateTime.parse(@reference_time.to_s) : @reference_time
|
65
|
+
@reference_time = Java::org.joda.time.DateTime.new(@reference_time.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
66
|
+
end
|
56
67
|
self
|
57
68
|
end
|
58
69
|
|
@@ -73,6 +84,20 @@ module Killbill
|
|
73
84
|
if !@time_zone.nil?
|
74
85
|
@time_zone = TZInfo::Timezone.get(@time_zone.get_id)
|
75
86
|
end
|
87
|
+
|
88
|
+
# conversion for fixed_offset_time_zone [type = org.joda.time.DateTimeZone]
|
89
|
+
@fixed_offset_time_zone = j_obj.fixed_offset_time_zone
|
90
|
+
if !@fixed_offset_time_zone.nil?
|
91
|
+
@fixed_offset_time_zone = TZInfo::Timezone.get(@fixed_offset_time_zone.get_id)
|
92
|
+
end
|
93
|
+
|
94
|
+
# conversion for reference_time [type = org.joda.time.DateTime]
|
95
|
+
@reference_time = j_obj.reference_time
|
96
|
+
if !@reference_time.nil?
|
97
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
|
98
|
+
str = fmt.print(@reference_time)
|
99
|
+
@reference_time = DateTime.iso8601(str)
|
100
|
+
end
|
76
101
|
self
|
77
102
|
end
|
78
103
|
|
@@ -39,15 +39,18 @@ module Killbill
|
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
|
-
java_signature 'Java::java.util.List getInvoicesByAccount(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
43
|
-
def get_invoices_by_account(accountId, context)
|
42
|
+
java_signature 'Java::java.util.List getInvoicesByAccount(Java::java.util.UUID, Java::boolean, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
43
|
+
def get_invoices_by_account(accountId, includesMigrated, context)
|
44
44
|
|
45
45
|
# conversion for accountId [type = java.util.UUID]
|
46
46
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
47
47
|
|
48
|
+
# conversion for includesMigrated [type = boolean]
|
49
|
+
includesMigrated = includesMigrated.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(includesMigrated)
|
50
|
+
|
48
51
|
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
49
52
|
context = context.to_java unless context.nil?
|
50
|
-
res = @real_java_api.get_invoices_by_account(accountId, context)
|
53
|
+
res = @real_java_api.get_invoices_by_account(accountId, includesMigrated, context)
|
51
54
|
# conversion for res [type = java.util.List]
|
52
55
|
tmp = []
|
53
56
|
(res || []).each do |m|
|
@@ -325,8 +328,8 @@ module Killbill
|
|
325
328
|
end
|
326
329
|
end
|
327
330
|
|
328
|
-
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertCredit(Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.joda.time.LocalDate, Java::org.killbill.billing.catalog.api.Currency, Java::org.killbill.billing.util.callcontext.CallContext)'
|
329
|
-
def insert_credit(accountId, amount, effectiveDate, currency, context)
|
331
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertCredit(Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.joda.time.LocalDate, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
|
332
|
+
def insert_credit(accountId, amount, effectiveDate, currency, description, context)
|
330
333
|
|
331
334
|
# conversion for accountId [type = java.util.UUID]
|
332
335
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
@@ -346,10 +349,13 @@ module Killbill
|
|
346
349
|
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
347
350
|
currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
|
348
351
|
|
352
|
+
# conversion for description [type = java.lang.String]
|
353
|
+
description = description.to_s unless description.nil?
|
354
|
+
|
349
355
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
350
356
|
context = context.to_java unless context.nil?
|
351
357
|
begin
|
352
|
-
res = @real_java_api.insert_credit(accountId, amount, effectiveDate, currency, context)
|
358
|
+
res = @real_java_api.insert_credit(accountId, amount, effectiveDate, currency, description, context)
|
353
359
|
# conversion for res [type = org.killbill.billing.invoice.api.InvoiceItem]
|
354
360
|
res = Killbill::Plugin::Model::InvoiceItem.new.to_ruby(res) unless res.nil?
|
355
361
|
return res
|
@@ -358,8 +364,8 @@ module Killbill
|
|
358
364
|
end
|
359
365
|
end
|
360
366
|
|
361
|
-
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertCreditForInvoice(Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.joda.time.LocalDate, Java::org.killbill.billing.catalog.api.Currency, Java::org.killbill.billing.util.callcontext.CallContext)'
|
362
|
-
def insert_credit_for_invoice(accountId, invoiceId, amount, effectiveDate, currency, context)
|
367
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertCreditForInvoice(Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.joda.time.LocalDate, Java::org.killbill.billing.catalog.api.Currency, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
|
368
|
+
def insert_credit_for_invoice(accountId, invoiceId, amount, effectiveDate, currency, description, context)
|
363
369
|
|
364
370
|
# conversion for accountId [type = java.util.UUID]
|
365
371
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
@@ -382,10 +388,13 @@ module Killbill
|
|
382
388
|
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
383
389
|
currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
|
384
390
|
|
391
|
+
# conversion for description [type = java.lang.String]
|
392
|
+
description = description.to_s unless description.nil?
|
393
|
+
|
385
394
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
386
395
|
context = context.to_java unless context.nil?
|
387
396
|
begin
|
388
|
-
res = @real_java_api.insert_credit_for_invoice(accountId, invoiceId, amount, effectiveDate, currency, context)
|
397
|
+
res = @real_java_api.insert_credit_for_invoice(accountId, invoiceId, amount, effectiveDate, currency, description, context)
|
389
398
|
# conversion for res [type = org.killbill.billing.invoice.api.InvoiceItem]
|
390
399
|
res = Killbill::Plugin::Model::InvoiceItem.new.to_ruby(res) unless res.nil?
|
391
400
|
return res
|
@@ -394,8 +403,8 @@ module Killbill
|
|
394
403
|
end
|
395
404
|
end
|
396
405
|
|
397
|
-
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertInvoiceItemAdjustment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::org.joda.time.LocalDate, Java::org.killbill.billing.util.callcontext.CallContext)'
|
398
|
-
def insert_invoice_item_adjustment(accountId, invoiceId, invoiceItemId, effectiveDate, context)
|
406
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoiceItem insertInvoiceItemAdjustment(Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::org.joda.time.LocalDate, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
|
407
|
+
def insert_invoice_item_adjustment(accountId, invoiceId, invoiceItemId, effectiveDate, description, context)
|
399
408
|
|
400
409
|
# conversion for accountId [type = java.util.UUID]
|
401
410
|
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
@@ -411,10 +420,13 @@ module Killbill
|
|
411
420
|
effectiveDate = Java::org.joda.time.LocalDate.parse(effectiveDate.to_s)
|
412
421
|
end
|
413
422
|
|
423
|
+
# conversion for description [type = java.lang.String]
|
424
|
+
description = description.to_s unless description.nil?
|
425
|
+
|
414
426
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
415
427
|
context = context.to_java unless context.nil?
|
416
428
|
begin
|
417
|
-
res = @real_java_api.insert_invoice_item_adjustment(accountId, invoiceId, invoiceItemId, effectiveDate, context)
|
429
|
+
res = @real_java_api.insert_invoice_item_adjustment(accountId, invoiceId, invoiceItemId, effectiveDate, description, context)
|
418
430
|
# conversion for res [type = org.killbill.billing.invoice.api.InvoiceItem]
|
419
431
|
res = Killbill::Plugin::Model::InvoiceItem.new.to_ruby(res) unless res.nil?
|
420
432
|
return res
|
@@ -471,6 +483,34 @@ module Killbill
|
|
471
483
|
context = context.to_java unless context.nil?
|
472
484
|
@real_java_api.consume_exsting_cba_onaccount_with_unpaid_invoices(accountId, context)
|
473
485
|
end
|
486
|
+
|
487
|
+
java_signature 'Java::java.util.UUID createMigrationInvoice(Java::java.util.UUID, Java::org.joda.time.LocalDate, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
488
|
+
def create_migration_invoice(accountId, invoiceDate, items, context)
|
489
|
+
|
490
|
+
# conversion for accountId [type = java.util.UUID]
|
491
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
492
|
+
|
493
|
+
# conversion for invoiceDate [type = org.joda.time.LocalDate]
|
494
|
+
if !invoiceDate.nil?
|
495
|
+
invoiceDate = Java::org.joda.time.LocalDate.parse(invoiceDate.to_s)
|
496
|
+
end
|
497
|
+
|
498
|
+
# conversion for items [type = java.lang.Iterable]
|
499
|
+
tmp = java.util.ArrayList.new
|
500
|
+
(items || []).each do |m|
|
501
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoiceItem]
|
502
|
+
m = m.to_java unless m.nil?
|
503
|
+
tmp.add(m)
|
504
|
+
end
|
505
|
+
items = tmp
|
506
|
+
|
507
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
508
|
+
context = context.to_java unless context.nil?
|
509
|
+
res = @real_java_api.create_migration_invoice(accountId, invoiceDate, items, context)
|
510
|
+
# conversion for res [type = java.util.UUID]
|
511
|
+
res = res.nil? ? nil : res.to_s
|
512
|
+
return res
|
513
|
+
end
|
474
514
|
end
|
475
515
|
end
|
476
516
|
end
|
@@ -53,25 +53,42 @@ module Killbill
|
|
53
53
|
return res
|
54
54
|
end
|
55
55
|
|
56
|
-
java_signature 'Java::
|
57
|
-
def
|
56
|
+
java_signature 'Java::org.killbill.billing.util.nodes.NodeInfo getCurrentNodeInfo()'
|
57
|
+
def get_current_node_info()
|
58
|
+
res = @real_java_api.get_current_node_info()
|
59
|
+
# conversion for res [type = org.killbill.billing.util.nodes.NodeInfo]
|
60
|
+
res = Killbill::Plugin::Model::NodeInfo.new.to_ruby(res) unless res.nil?
|
61
|
+
return res
|
62
|
+
end
|
58
63
|
|
59
|
-
|
60
|
-
|
64
|
+
java_signature 'Java::void triggerNodeCommand(Java::org.killbill.billing.util.nodes.NodeCommand, Java::boolean)'
|
65
|
+
def trigger_node_command(nodeCommand, localNodeOnly)
|
61
66
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
67
|
+
# conversion for nodeCommand [type = org.killbill.billing.util.nodes.NodeCommand]
|
68
|
+
nodeCommand = nodeCommand.to_java unless nodeCommand.nil?
|
69
|
+
|
70
|
+
# conversion for localNodeOnly [type = boolean]
|
71
|
+
localNodeOnly = localNodeOnly.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(localNodeOnly)
|
72
|
+
@real_java_api.trigger_node_command(nodeCommand, localNodeOnly)
|
73
|
+
end
|
74
|
+
|
75
|
+
java_signature 'Java::void notifyPluginChanged(Java::org.killbill.billing.osgi.api.PluginInfo, Java::java.lang.Iterable)'
|
76
|
+
def notify_plugin_changed(plugin, latestPlugins)
|
66
77
|
|
67
|
-
|
68
|
-
|
78
|
+
# conversion for plugin [type = org.killbill.billing.osgi.api.PluginInfo]
|
79
|
+
plugin = plugin.to_java unless plugin.nil?
|
69
80
|
|
70
|
-
|
71
|
-
|
72
|
-
|
81
|
+
# conversion for latestPlugins [type = java.lang.Iterable]
|
82
|
+
tmp = java.util.ArrayList.new
|
83
|
+
(latestPlugins || []).each do |m|
|
84
|
+
# conversion for m [type = org.killbill.billing.osgi.api.PluginInfo]
|
85
|
+
m = m.to_java unless m.nil?
|
86
|
+
tmp.add(m)
|
73
87
|
end
|
88
|
+
latestPlugins = tmp
|
89
|
+
@real_java_api.notify_plugin_changed(plugin, latestPlugins)
|
74
90
|
end
|
75
91
|
end
|
76
92
|
end
|
77
93
|
end
|
94
|
+
end
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.catalog.api.MigrationPlan
|
36
36
|
|
37
|
-
attr_accessor :initial_phases, :product, :name, :initial_phase_iterator, :final_phase, :recurring_billing_period, :plans_allowed_in_bundle, :all_phases, :
|
37
|
+
attr_accessor :initial_phases, :product, :price_list, :name, :initial_phase_iterator, :final_phase, :recurring_billing_period, :plans_allowed_in_bundle, :all_phases, :effective_date_for_existing_subscriptions
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -52,6 +52,9 @@ module Killbill
|
|
52
52
|
# conversion for product [type = org.killbill.billing.catalog.api.Product]
|
53
53
|
@product = @product.to_java unless @product.nil?
|
54
54
|
|
55
|
+
# conversion for price_list [type = org.killbill.billing.catalog.api.PriceList]
|
56
|
+
@price_list = @price_list.to_java unless @price_list.nil?
|
57
|
+
|
55
58
|
# conversion for name [type = java.lang.String]
|
56
59
|
@name = @name.to_s unless @name.nil?
|
57
60
|
|
@@ -76,11 +79,11 @@ module Killbill
|
|
76
79
|
end
|
77
80
|
@all_phases = tmp.to_java Java::org.killbill.billing.catalog.api.PlanPhase
|
78
81
|
|
79
|
-
# conversion for
|
80
|
-
if !@
|
81
|
-
@
|
82
|
-
@
|
83
|
-
@
|
82
|
+
# conversion for effective_date_for_existing_subscriptions [type = java.util.Date]
|
83
|
+
if !@effective_date_for_existing_subscriptions.nil?
|
84
|
+
@effective_date_for_existing_subscriptions = (@effective_date_for_existing_subscriptions.kind_of? Time) ? DateTime.parse(@effective_date_for_existing_subscriptions.to_s) : @effective_date_for_existing_subscriptions
|
85
|
+
@effective_date_for_existing_subscriptions = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptions.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
86
|
+
@effective_date_for_existing_subscriptions = @effective_date_for_existing_subscriptions.to_date
|
84
87
|
end
|
85
88
|
self
|
86
89
|
end
|
@@ -100,6 +103,10 @@ module Killbill
|
|
100
103
|
@product = j_obj.product
|
101
104
|
@product = Killbill::Plugin::Model::Product.new.to_ruby(@product) unless @product.nil?
|
102
105
|
|
106
|
+
# conversion for price_list [type = org.killbill.billing.catalog.api.PriceList]
|
107
|
+
@price_list = j_obj.price_list
|
108
|
+
@price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@price_list) unless @price_list.nil?
|
109
|
+
|
103
110
|
# conversion for name [type = java.lang.String]
|
104
111
|
@name = j_obj.name
|
105
112
|
|
@@ -127,13 +134,13 @@ module Killbill
|
|
127
134
|
end
|
128
135
|
@all_phases = tmp
|
129
136
|
|
130
|
-
# conversion for
|
131
|
-
@
|
132
|
-
if !@
|
133
|
-
@
|
137
|
+
# conversion for effective_date_for_existing_subscriptions [type = java.util.Date]
|
138
|
+
@effective_date_for_existing_subscriptions = j_obj.effective_date_for_existing_subscriptions
|
139
|
+
if !@effective_date_for_existing_subscriptions.nil?
|
140
|
+
@effective_date_for_existing_subscriptions = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptions)
|
134
141
|
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
|
135
|
-
str = fmt.print(@
|
136
|
-
@
|
142
|
+
str = fmt.print(@effective_date_for_existing_subscriptions)
|
143
|
+
@effective_date_for_existing_subscriptions = DateTime.iso8601(str)
|
137
144
|
end
|
138
145
|
self
|
139
146
|
end
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.osgi.api.OSGIKillbill
|
36
36
|
|
37
|
-
attr_accessor :account_user_api, :catalog_user_api, :subscription_api, :invoice_payment_api, :invoice_user_api, :payment_api, :tenant_user_api, :usage_user_api, :audit_user_api, :custom_field_user_api, :export_user_api, :tag_user_api, :entitlement_api, :record_id_api, :currency_conversion_api, :plugin_config_service_api, :security_api, :plugins_info_api, :killbill_nodes_api
|
37
|
+
attr_accessor :account_user_api, :catalog_user_api, :subscription_api, :invoice_payment_api, :invoice_user_api, :payment_api, :tenant_user_api, :usage_user_api, :audit_user_api, :custom_field_user_api, :export_user_api, :tag_user_api, :entitlement_api, :record_id_api, :currency_conversion_api, :plugin_config_service_api, :security_api, :plugins_info_api, :killbill_nodes_api, :admin_payment_api
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -96,6 +96,9 @@ module Killbill
|
|
96
96
|
|
97
97
|
# conversion for killbill_nodes_api [type = org.killbill.billing.util.nodes.KillbillNodesApi]
|
98
98
|
@killbill_nodes_api = @killbill_nodes_api.to_java unless @killbill_nodes_api.nil?
|
99
|
+
|
100
|
+
# conversion for admin_payment_api [type = org.killbill.billing.payment.api.AdminPaymentApi]
|
101
|
+
@admin_payment_api = @admin_payment_api.to_java unless @admin_payment_api.nil?
|
99
102
|
self
|
100
103
|
end
|
101
104
|
|
@@ -175,6 +178,10 @@ module Killbill
|
|
175
178
|
# conversion for killbill_nodes_api [type = org.killbill.billing.util.nodes.KillbillNodesApi]
|
176
179
|
@killbill_nodes_api = j_obj.killbill_nodes_api
|
177
180
|
@killbill_nodes_api = Killbill::Plugin::Model::KillbillNodesApi.new.to_ruby(@killbill_nodes_api) unless @killbill_nodes_api.nil?
|
181
|
+
|
182
|
+
# conversion for admin_payment_api [type = org.killbill.billing.payment.api.AdminPaymentApi]
|
183
|
+
@admin_payment_api = j_obj.admin_payment_api
|
184
|
+
@admin_payment_api = Killbill::Plugin::Model::AdminPaymentApi.new.to_ruby(@admin_payment_api) unless @admin_payment_api.nil?
|
178
185
|
self
|
179
186
|
end
|
180
187
|
|
@@ -660,6 +660,57 @@ module Killbill
|
|
660
660
|
end
|
661
661
|
end
|
662
662
|
|
663
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createChargebackReversal(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
|
664
|
+
def create_chargeback_reversal(account, paymentId, paymentTransactionExternalKey, context)
|
665
|
+
|
666
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
667
|
+
account = account.to_java unless account.nil?
|
668
|
+
|
669
|
+
# conversion for paymentId [type = java.util.UUID]
|
670
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
671
|
+
|
672
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
673
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
674
|
+
|
675
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
676
|
+
context = context.to_java unless context.nil?
|
677
|
+
begin
|
678
|
+
res = @real_java_api.create_chargeback_reversal(account, paymentId, paymentTransactionExternalKey, context)
|
679
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
680
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
681
|
+
return res
|
682
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
683
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
684
|
+
end
|
685
|
+
end
|
686
|
+
|
687
|
+
java_signature 'Java::org.killbill.billing.payment.api.Payment createChargebackReversalWithPaymentControl(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.lang.String, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
688
|
+
def create_chargeback_reversal_with_payment_control(account, paymentId, paymentTransactionExternalKey, paymentOptions, context)
|
689
|
+
|
690
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
691
|
+
account = account.to_java unless account.nil?
|
692
|
+
|
693
|
+
# conversion for paymentId [type = java.util.UUID]
|
694
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
695
|
+
|
696
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
697
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
698
|
+
|
699
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
700
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
701
|
+
|
702
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
703
|
+
context = context.to_java unless context.nil?
|
704
|
+
begin
|
705
|
+
res = @real_java_api.create_chargeback_reversal_with_payment_control(account, paymentId, paymentTransactionExternalKey, paymentOptions, context)
|
706
|
+
# conversion for res [type = org.killbill.billing.payment.api.Payment]
|
707
|
+
res = Killbill::Plugin::Model::Payment.new.to_ruby(res) unless res.nil?
|
708
|
+
return res
|
709
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
710
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
711
|
+
end
|
712
|
+
end
|
713
|
+
|
663
714
|
java_signature 'Java::org.killbill.billing.payment.api.Payment notifyPendingTransactionOfStateChanged(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::boolean, Java::org.killbill.billing.util.callcontext.CallContext)'
|
664
715
|
def notify_pending_transaction_of_state_changed(account, paymentTransactionId, isSuccess, context)
|
665
716
|
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.catalog.api.Plan
|
36
36
|
|
37
|
-
attr_accessor :initial_phases, :product, :name, :initial_phase_iterator, :final_phase, :recurring_billing_period, :plans_allowed_in_bundle, :all_phases, :
|
37
|
+
attr_accessor :initial_phases, :product, :price_list, :name, :initial_phase_iterator, :final_phase, :recurring_billing_period, :plans_allowed_in_bundle, :all_phases, :effective_date_for_existing_subscriptions
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -52,6 +52,9 @@ module Killbill
|
|
52
52
|
# conversion for product [type = org.killbill.billing.catalog.api.Product]
|
53
53
|
@product = @product.to_java unless @product.nil?
|
54
54
|
|
55
|
+
# conversion for price_list [type = org.killbill.billing.catalog.api.PriceList]
|
56
|
+
@price_list = @price_list.to_java unless @price_list.nil?
|
57
|
+
|
55
58
|
# conversion for name [type = java.lang.String]
|
56
59
|
@name = @name.to_s unless @name.nil?
|
57
60
|
|
@@ -76,11 +79,11 @@ module Killbill
|
|
76
79
|
end
|
77
80
|
@all_phases = tmp.to_java Java::org.killbill.billing.catalog.api.PlanPhase
|
78
81
|
|
79
|
-
# conversion for
|
80
|
-
if !@
|
81
|
-
@
|
82
|
-
@
|
83
|
-
@
|
82
|
+
# conversion for effective_date_for_existing_subscriptions [type = java.util.Date]
|
83
|
+
if !@effective_date_for_existing_subscriptions.nil?
|
84
|
+
@effective_date_for_existing_subscriptions = (@effective_date_for_existing_subscriptions.kind_of? Time) ? DateTime.parse(@effective_date_for_existing_subscriptions.to_s) : @effective_date_for_existing_subscriptions
|
85
|
+
@effective_date_for_existing_subscriptions = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptions.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
86
|
+
@effective_date_for_existing_subscriptions = @effective_date_for_existing_subscriptions.to_date
|
84
87
|
end
|
85
88
|
self
|
86
89
|
end
|
@@ -100,6 +103,10 @@ module Killbill
|
|
100
103
|
@product = j_obj.product
|
101
104
|
@product = Killbill::Plugin::Model::Product.new.to_ruby(@product) unless @product.nil?
|
102
105
|
|
106
|
+
# conversion for price_list [type = org.killbill.billing.catalog.api.PriceList]
|
107
|
+
@price_list = j_obj.price_list
|
108
|
+
@price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@price_list) unless @price_list.nil?
|
109
|
+
|
103
110
|
# conversion for name [type = java.lang.String]
|
104
111
|
@name = j_obj.name
|
105
112
|
|
@@ -127,13 +134,13 @@ module Killbill
|
|
127
134
|
end
|
128
135
|
@all_phases = tmp
|
129
136
|
|
130
|
-
# conversion for
|
131
|
-
@
|
132
|
-
if !@
|
133
|
-
@
|
137
|
+
# conversion for effective_date_for_existing_subscriptions [type = java.util.Date]
|
138
|
+
@effective_date_for_existing_subscriptions = j_obj.effective_date_for_existing_subscriptions
|
139
|
+
if !@effective_date_for_existing_subscriptions.nil?
|
140
|
+
@effective_date_for_existing_subscriptions = Java::org.joda.time.DateTime.new(@effective_date_for_existing_subscriptions)
|
134
141
|
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
|
135
|
-
str = fmt.print(@
|
136
|
-
@
|
142
|
+
str = fmt.print(@effective_date_for_existing_subscriptions)
|
143
|
+
@effective_date_for_existing_subscriptions = DateTime.iso8601(str)
|
137
144
|
end
|
138
145
|
self
|
139
146
|
end
|