killbill 9.3.0 → 9.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +138 -0
- data/Gemfile.lock +1 -1
- data/Jarfile +10 -10
- data/Jarfile.lock +23 -23
- data/NEWS +9 -0
- data/lib/killbill.rb +1 -1
- data/lib/killbill/gen/api/account_user_api.rb +54 -0
- data/lib/killbill/gen/api/audit_log_with_history.rb +138 -0
- data/lib/killbill/gen/api/custom_field_user_api.rb +23 -0
- data/lib/killbill/gen/api/dry_run_arguments.rb +6 -25
- data/lib/killbill/gen/api/entitlement_api.rb +8 -26
- data/lib/killbill/gen/api/entitlement_specifier.rb +7 -1
- data/lib/killbill/gen/api/health_status.rb +78 -0
- data/lib/killbill/gen/api/healthcheck.rb +53 -0
- data/lib/killbill/gen/api/invoice_item.rb +13 -1
- data/lib/killbill/gen/api/invoice_item_formatter.rb +13 -1
- data/lib/killbill/gen/api/invoice_payment_api.rb +224 -30
- data/lib/killbill/gen/api/invoice_user_api.rb +145 -18
- data/lib/killbill/gen/api/osgi_killbill.rb +2 -2
- data/lib/killbill/gen/api/payment_api.rb +125 -0
- data/lib/killbill/gen/api/plugin_config.rb +19 -0
- data/lib/killbill/gen/api/require_gen.rb +4 -8
- data/lib/killbill/gen/api/security_api.rb +12 -8
- data/lib/killbill/gen/api/tag_user_api.rb +46 -0
- data/lib/killbill/gen/plugin-api/invoice_notification_metadata.rb +81 -0
- data/lib/killbill/gen/plugin-api/require_gen.rb +1 -0
- data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +16 -5
- data/lib/killbill/version.rb +1 -1
- data/spec/killbill/helpers/response_spec.rb +7 -0
- data/spec/killbill/helpers/test_response.rb +4 -0
- metadata +9 -36
- data/.travis.yml +0 -51
@@ -192,6 +192,29 @@ module Killbill
|
|
192
192
|
res = tmp
|
193
193
|
return res
|
194
194
|
end
|
195
|
+
|
196
|
+
java_signature 'Java::java.util.List getCustomFieldAuditLogsWithHistoryForId(Java::java.util.UUID, Java::org.killbill.billing.util.api.AuditLevel, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
197
|
+
def get_custom_field_audit_logs_with_history_for_id(customFieldId, auditLevel, context)
|
198
|
+
|
199
|
+
# conversion for customFieldId [type = java.util.UUID]
|
200
|
+
customFieldId = java.util.UUID.fromString(customFieldId.to_s) unless customFieldId.nil?
|
201
|
+
|
202
|
+
# conversion for auditLevel [type = org.killbill.billing.util.api.AuditLevel]
|
203
|
+
auditLevel = Java::org.killbill.billing.util.api.AuditLevel.value_of( auditLevel.to_s ) unless auditLevel.nil?
|
204
|
+
|
205
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
206
|
+
context = context.to_java unless context.nil?
|
207
|
+
res = @real_java_api.get_custom_field_audit_logs_with_history_for_id(customFieldId, auditLevel, context)
|
208
|
+
# conversion for res [type = java.util.List]
|
209
|
+
tmp = []
|
210
|
+
(res || []).each do |m|
|
211
|
+
# conversion for m [type = org.killbill.billing.util.audit.AuditLogWithHistory]
|
212
|
+
m = Killbill::Plugin::Model::AuditLogWithHistory.new.to_ruby(m) unless m.nil?
|
213
|
+
tmp << m
|
214
|
+
end
|
215
|
+
res = tmp
|
216
|
+
return res
|
217
|
+
end
|
195
218
|
end
|
196
219
|
end
|
197
220
|
end
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.invoice.api.DryRunArguments
|
36
36
|
|
37
|
-
attr_accessor :dry_run_type, :
|
37
|
+
attr_accessor :dry_run_type, :entitlement_specifier, :action, :subscription_id, :effective_date, :bundle_id, :billing_action_policy
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -43,8 +43,8 @@ module Killbill
|
|
43
43
|
# conversion for dry_run_type [type = org.killbill.billing.invoice.api.DryRunType]
|
44
44
|
@dry_run_type = Java::org.killbill.billing.invoice.api.DryRunType.value_of( @dry_run_type.to_s ) unless @dry_run_type.nil?
|
45
45
|
|
46
|
-
# conversion for
|
47
|
-
@
|
46
|
+
# conversion for entitlement_specifier [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
|
47
|
+
@entitlement_specifier = @entitlement_specifier.to_java unless @entitlement_specifier.nil?
|
48
48
|
|
49
49
|
# conversion for action [type = org.killbill.billing.entitlement.api.SubscriptionEventType]
|
50
50
|
@action = Java::org.killbill.billing.entitlement.api.SubscriptionEventType.value_of( @action.to_s ) unless @action.nil?
|
@@ -62,15 +62,6 @@ module Killbill
|
|
62
62
|
|
63
63
|
# conversion for billing_action_policy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
|
64
64
|
@billing_action_policy = Java::org.killbill.billing.catalog.api.BillingActionPolicy.value_of( @billing_action_policy.to_s ) unless @billing_action_policy.nil?
|
65
|
-
|
66
|
-
# conversion for plan_phase_price_overrides [type = java.util.List]
|
67
|
-
tmp = java.util.ArrayList.new
|
68
|
-
(@plan_phase_price_overrides || []).each do |m|
|
69
|
-
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
70
|
-
m = m.to_java unless m.nil?
|
71
|
-
tmp.add(m)
|
72
|
-
end
|
73
|
-
@plan_phase_price_overrides = tmp
|
74
65
|
self
|
75
66
|
end
|
76
67
|
|
@@ -79,9 +70,9 @@ module Killbill
|
|
79
70
|
@dry_run_type = j_obj.dry_run_type
|
80
71
|
@dry_run_type = @dry_run_type.to_s.to_sym unless @dry_run_type.nil?
|
81
72
|
|
82
|
-
# conversion for
|
83
|
-
@
|
84
|
-
@
|
73
|
+
# conversion for entitlement_specifier [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
|
74
|
+
@entitlement_specifier = j_obj.entitlement_specifier
|
75
|
+
@entitlement_specifier = Killbill::Plugin::Model::EntitlementSpecifier.new.to_ruby(@entitlement_specifier) unless @entitlement_specifier.nil?
|
85
76
|
|
86
77
|
# conversion for action [type = org.killbill.billing.entitlement.api.SubscriptionEventType]
|
87
78
|
@action = j_obj.action
|
@@ -104,16 +95,6 @@ module Killbill
|
|
104
95
|
# conversion for billing_action_policy [type = org.killbill.billing.catalog.api.BillingActionPolicy]
|
105
96
|
@billing_action_policy = j_obj.billing_action_policy
|
106
97
|
@billing_action_policy = @billing_action_policy.to_s.to_sym unless @billing_action_policy.nil?
|
107
|
-
|
108
|
-
# conversion for plan_phase_price_overrides [type = java.util.List]
|
109
|
-
@plan_phase_price_overrides = j_obj.plan_phase_price_overrides
|
110
|
-
tmp = []
|
111
|
-
(@plan_phase_price_overrides || []).each do |m|
|
112
|
-
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
113
|
-
m = Killbill::Plugin::Model::PlanPhasePriceOverride.new.to_ruby(m) unless m.nil?
|
114
|
-
tmp << m
|
115
|
-
end
|
116
|
-
@plan_phase_price_overrides = tmp
|
117
98
|
self
|
118
99
|
end
|
119
100
|
|
@@ -39,27 +39,18 @@ module Killbill
|
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
|
-
java_signature 'Java::java.util.UUID createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.
|
43
|
-
def create_base_entitlement(accountId, spec, externalKey,
|
42
|
+
java_signature 'Java::java.util.UUID createBaseEntitlement(Java::java.util.UUID, Java::org.killbill.billing.entitlement.api.EntitlementSpecifier, Java::java.lang.String, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
43
|
+
def create_base_entitlement(accountId, spec, externalKey, entitlementEffectiveDate, billingEffectiveDate, isMigrated, renameCancelledBundleIfExist, properties, 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 spec [type = org.killbill.billing.
|
48
|
+
# conversion for spec [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
|
49
49
|
spec = spec.to_java unless spec.nil?
|
50
50
|
|
51
51
|
# conversion for externalKey [type = java.lang.String]
|
52
52
|
externalKey = externalKey.to_s unless externalKey.nil?
|
53
53
|
|
54
|
-
# conversion for overrides [type = java.util.List]
|
55
|
-
tmp = java.util.ArrayList.new
|
56
|
-
(overrides || []).each do |m|
|
57
|
-
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
58
|
-
m = m.to_java unless m.nil?
|
59
|
-
tmp.add(m)
|
60
|
-
end
|
61
|
-
overrides = tmp
|
62
|
-
|
63
54
|
# conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
|
64
55
|
if !entitlementEffectiveDate.nil?
|
65
56
|
entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
|
@@ -88,7 +79,7 @@ module Killbill
|
|
88
79
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
89
80
|
context = context.to_java unless context.nil?
|
90
81
|
begin
|
91
|
-
res = @real_java_api.create_base_entitlement(accountId, spec, externalKey,
|
82
|
+
res = @real_java_api.create_base_entitlement(accountId, spec, externalKey, entitlementEffectiveDate, billingEffectiveDate, isMigrated, renameCancelledBundleIfExist, properties, context)
|
92
83
|
# conversion for res [type = java.util.UUID]
|
93
84
|
res = res.nil? ? nil : res.to_s
|
94
85
|
return res
|
@@ -142,24 +133,15 @@ module Killbill
|
|
142
133
|
end
|
143
134
|
end
|
144
135
|
|
145
|
-
java_signature 'Java::java.util.UUID addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.
|
146
|
-
def add_entitlement(bundleId, spec,
|
136
|
+
java_signature 'Java::java.util.UUID addEntitlement(Java::java.util.UUID, Java::org.killbill.billing.entitlement.api.EntitlementSpecifier, Java::org.joda.time.LocalDate, Java::org.joda.time.LocalDate, Java::boolean, Java::java.lang.Iterable, Java::org.killbill.billing.util.callcontext.CallContext)'
|
137
|
+
def add_entitlement(bundleId, spec, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
147
138
|
|
148
139
|
# conversion for bundleId [type = java.util.UUID]
|
149
140
|
bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
|
150
141
|
|
151
|
-
# conversion for spec [type = org.killbill.billing.
|
142
|
+
# conversion for spec [type = org.killbill.billing.entitlement.api.EntitlementSpecifier]
|
152
143
|
spec = spec.to_java unless spec.nil?
|
153
144
|
|
154
|
-
# conversion for overrides [type = java.util.List]
|
155
|
-
tmp = java.util.ArrayList.new
|
156
|
-
(overrides || []).each do |m|
|
157
|
-
# conversion for m [type = org.killbill.billing.catalog.api.PlanPhasePriceOverride]
|
158
|
-
m = m.to_java unless m.nil?
|
159
|
-
tmp.add(m)
|
160
|
-
end
|
161
|
-
overrides = tmp
|
162
|
-
|
163
145
|
# conversion for entitlementEffectiveDate [type = org.joda.time.LocalDate]
|
164
146
|
if !entitlementEffectiveDate.nil?
|
165
147
|
entitlementEffectiveDate = Java::org.joda.time.LocalDate.parse(entitlementEffectiveDate.to_s)
|
@@ -185,7 +167,7 @@ module Killbill
|
|
185
167
|
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
186
168
|
context = context.to_java unless context.nil?
|
187
169
|
begin
|
188
|
-
res = @real_java_api.add_entitlement(bundleId, spec,
|
170
|
+
res = @real_java_api.add_entitlement(bundleId, spec, entitlementEffectiveDate, billingEffectiveDate, isMigrated, properties, context)
|
189
171
|
# conversion for res [type = java.util.UUID]
|
190
172
|
res = res.nil? ? nil : res.to_s
|
191
173
|
return res
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.entitlement.api.EntitlementSpecifier
|
36
36
|
|
37
|
-
attr_accessor :plan_phase_specifier, :overrides
|
37
|
+
attr_accessor :plan_phase_specifier, :bill_cycle_day, :overrides
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -43,6 +43,9 @@ module Killbill
|
|
43
43
|
# conversion for plan_phase_specifier [type = org.killbill.billing.catalog.api.PlanPhaseSpecifier]
|
44
44
|
@plan_phase_specifier = @plan_phase_specifier.to_java unless @plan_phase_specifier.nil?
|
45
45
|
|
46
|
+
# conversion for bill_cycle_day [type = java.lang.Integer]
|
47
|
+
@bill_cycle_day = @bill_cycle_day
|
48
|
+
|
46
49
|
# conversion for overrides [type = java.util.List]
|
47
50
|
tmp = java.util.ArrayList.new
|
48
51
|
(@overrides || []).each do |m|
|
@@ -59,6 +62,9 @@ module Killbill
|
|
59
62
|
@plan_phase_specifier = j_obj.plan_phase_specifier
|
60
63
|
@plan_phase_specifier = Killbill::Plugin::Model::PlanPhaseSpecifier.new.to_ruby(@plan_phase_specifier) unless @plan_phase_specifier.nil?
|
61
64
|
|
65
|
+
# conversion for bill_cycle_day [type = java.lang.Integer]
|
66
|
+
@bill_cycle_day = j_obj.bill_cycle_day
|
67
|
+
|
62
68
|
# conversion for overrides [type = java.util.List]
|
63
69
|
@overrides = j_obj.overrides
|
64
70
|
tmp = []
|
@@ -0,0 +1,78 @@
|
|
1
|
+
#############################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
6
|
+
# #
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
9
|
+
# License. You may obtain a copy of the License at: #
|
10
|
+
# #
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
12
|
+
# #
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
16
|
+
# License for the specific language governing permissions and limitations #
|
17
|
+
# under the License. #
|
18
|
+
# #
|
19
|
+
#############################################################################################
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# DO NOT EDIT!!!
|
24
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
module Killbill
|
29
|
+
module Plugin
|
30
|
+
module Model
|
31
|
+
|
32
|
+
class HealthStatus
|
33
|
+
|
34
|
+
|
35
|
+
attr_accessor :is_healthy, :details
|
36
|
+
|
37
|
+
def initialize()
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_java()
|
41
|
+
# conversion for is_healthy [type = boolean]
|
42
|
+
@is_healthy = @is_healthy.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_healthy)
|
43
|
+
|
44
|
+
# conversion for details [type = java.util.Map]
|
45
|
+
tmp = java.util.HashMap.new
|
46
|
+
(@details || {}).each do |k,v|
|
47
|
+
tmp.put(k, v)
|
48
|
+
end
|
49
|
+
@details = tmp
|
50
|
+
Java::org.killbill.billing.osgi.api.HealthStatus.new(@is_healthy, @details)
|
51
|
+
end
|
52
|
+
|
53
|
+
def to_ruby(j_obj)
|
54
|
+
# conversion for is_healthy [type = boolean]
|
55
|
+
@is_healthy = j_obj.is_healthy
|
56
|
+
if @is_healthy.nil?
|
57
|
+
@is_healthy = false
|
58
|
+
else
|
59
|
+
tmp_bool = (@is_healthy.java_kind_of? java.lang.Boolean) ? @is_healthy.boolean_value : @is_healthy
|
60
|
+
@is_healthy = tmp_bool ? true : false
|
61
|
+
end
|
62
|
+
|
63
|
+
# conversion for details [type = java.util.Map]
|
64
|
+
@details = j_obj.details
|
65
|
+
tmp = {}
|
66
|
+
jtmp0 = @details || java.util.HashMap.new
|
67
|
+
jtmp0.key_set.each do |k|
|
68
|
+
v = jtmp0.get(k)
|
69
|
+
tmp[k] = v
|
70
|
+
end
|
71
|
+
@details = tmp
|
72
|
+
self
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
#############################################################################################
|
2
|
+
# #
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
4
|
+
# Copyright 2014 Groupon, Inc. #
|
5
|
+
# Copyright 2014 The Billing Project, LLC #
|
6
|
+
# #
|
7
|
+
# The Billing Project licenses this file to you under the Apache License, version 2.0 #
|
8
|
+
# (the "License"); you may not use this file except in compliance with the #
|
9
|
+
# License. You may obtain a copy of the License at: #
|
10
|
+
# #
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
12
|
+
# #
|
13
|
+
# Unless required by applicable law or agreed to in writing, software #
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
15
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
16
|
+
# License for the specific language governing permissions and limitations #
|
17
|
+
# under the License. #
|
18
|
+
# #
|
19
|
+
#############################################################################################
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# DO NOT EDIT!!!
|
24
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
25
|
+
#
|
26
|
+
|
27
|
+
|
28
|
+
module Killbill
|
29
|
+
module Plugin
|
30
|
+
module Model
|
31
|
+
|
32
|
+
java_package 'org.killbill.billing.osgi.api'
|
33
|
+
class Healthcheck
|
34
|
+
|
35
|
+
include org.killbill.billing.osgi.api.Healthcheck
|
36
|
+
|
37
|
+
attr_accessor
|
38
|
+
|
39
|
+
def initialize()
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_java()
|
43
|
+
self
|
44
|
+
end
|
45
|
+
|
46
|
+
def to_ruby(j_obj)
|
47
|
+
self
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.invoice.api.InvoiceItem
|
36
36
|
|
37
|
-
attr_accessor :id, :created_date, :updated_date, :invoice_item_type, :invoice_id, :account_id, :child_account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :plan_name, :pretty_plan_name, :phase_name, :pretty_phase_name, :usage_name, :pretty_usage_name, :rate, :linked_item_id, :quantity, :item_details
|
37
|
+
attr_accessor :id, :created_date, :updated_date, :invoice_item_type, :invoice_id, :account_id, :child_account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :product_name, :pretty_product_name, :plan_name, :pretty_plan_name, :phase_name, :pretty_phase_name, :usage_name, :pretty_usage_name, :rate, :linked_item_id, :quantity, :item_details
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -96,6 +96,12 @@ module Killbill
|
|
96
96
|
# conversion for subscription_id [type = java.util.UUID]
|
97
97
|
@subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
|
98
98
|
|
99
|
+
# conversion for product_name [type = java.lang.String]
|
100
|
+
@product_name = @product_name.to_s unless @product_name.nil?
|
101
|
+
|
102
|
+
# conversion for pretty_product_name [type = java.lang.String]
|
103
|
+
@pretty_product_name = @pretty_product_name.to_s unless @pretty_product_name.nil?
|
104
|
+
|
99
105
|
# conversion for plan_name [type = java.lang.String]
|
100
106
|
@plan_name = @plan_name.to_s unless @plan_name.nil?
|
101
107
|
|
@@ -200,6 +206,12 @@ module Killbill
|
|
200
206
|
@subscription_id = j_obj.subscription_id
|
201
207
|
@subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
|
202
208
|
|
209
|
+
# conversion for product_name [type = java.lang.String]
|
210
|
+
@product_name = j_obj.product_name
|
211
|
+
|
212
|
+
# conversion for pretty_product_name [type = java.lang.String]
|
213
|
+
@pretty_product_name = j_obj.pretty_product_name
|
214
|
+
|
203
215
|
# conversion for plan_name [type = java.lang.String]
|
204
216
|
@plan_name = j_obj.plan_name
|
205
217
|
|
@@ -34,7 +34,7 @@ module Killbill
|
|
34
34
|
|
35
35
|
include org.killbill.billing.invoice.api.formatters.InvoiceItemFormatter
|
36
36
|
|
37
|
-
attr_accessor :invoice_item_type, :invoice_id, :account_id, :child_account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :plan_name, :pretty_plan_name, :phase_name, :pretty_phase_name, :usage_name, :pretty_usage_name, :rate, :linked_item_id, :quantity, :item_details, :id, :created_date, :updated_date, :formatted_start_date, :formatted_end_date, :formatted_amount
|
37
|
+
attr_accessor :invoice_item_type, :invoice_id, :account_id, :child_account_id, :start_date, :end_date, :amount, :currency, :description, :bundle_id, :subscription_id, :product_name, :pretty_product_name, :plan_name, :pretty_plan_name, :phase_name, :pretty_phase_name, :usage_name, :pretty_usage_name, :rate, :linked_item_id, :quantity, :item_details, :id, :created_date, :updated_date, :formatted_start_date, :formatted_end_date, :formatted_amount
|
38
38
|
|
39
39
|
def initialize()
|
40
40
|
end
|
@@ -81,6 +81,12 @@ module Killbill
|
|
81
81
|
# conversion for subscription_id [type = java.util.UUID]
|
82
82
|
@subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
|
83
83
|
|
84
|
+
# conversion for product_name [type = java.lang.String]
|
85
|
+
@product_name = @product_name.to_s unless @product_name.nil?
|
86
|
+
|
87
|
+
# conversion for pretty_product_name [type = java.lang.String]
|
88
|
+
@pretty_product_name = @pretty_product_name.to_s unless @pretty_product_name.nil?
|
89
|
+
|
84
90
|
# conversion for plan_name [type = java.lang.String]
|
85
91
|
@plan_name = @plan_name.to_s unless @plan_name.nil?
|
86
92
|
|
@@ -189,6 +195,12 @@ module Killbill
|
|
189
195
|
@subscription_id = j_obj.subscription_id
|
190
196
|
@subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
|
191
197
|
|
198
|
+
# conversion for product_name [type = java.lang.String]
|
199
|
+
@product_name = j_obj.product_name
|
200
|
+
|
201
|
+
# conversion for pretty_product_name [type = java.lang.String]
|
202
|
+
@pretty_product_name = j_obj.pretty_product_name
|
203
|
+
|
192
204
|
# conversion for plan_name [type = java.lang.String]
|
193
205
|
@plan_name = j_obj.plan_name
|
194
206
|
|
@@ -29,56 +29,250 @@ module Killbill
|
|
29
29
|
module Plugin
|
30
30
|
module Api
|
31
31
|
|
32
|
-
java_package 'org.killbill.billing.
|
32
|
+
java_package 'org.killbill.billing.payment.api'
|
33
33
|
class InvoicePaymentApi
|
34
34
|
|
35
|
-
include org.killbill.billing.
|
35
|
+
include org.killbill.billing.payment.api.InvoicePaymentApi
|
36
36
|
|
37
37
|
def initialize(real_java_api)
|
38
38
|
@real_java_api = real_java_api
|
39
39
|
end
|
40
40
|
|
41
41
|
|
42
|
-
java_signature 'Java::java.util.
|
43
|
-
def
|
42
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment createPurchaseForInvoicePayment(Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::org.joda.time.DateTime, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
43
|
+
def create_purchase_for_invoice_payment(account, invoiceId, paymentMethodId, paymentId, amount, currency, effectiveDate, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
44
|
+
|
45
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
46
|
+
account = account.to_java unless account.nil?
|
47
|
+
|
48
|
+
# conversion for invoiceId [type = java.util.UUID]
|
49
|
+
invoiceId = java.util.UUID.fromString(invoiceId.to_s) unless invoiceId.nil?
|
50
|
+
|
51
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
52
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
44
53
|
|
45
54
|
# conversion for paymentId [type = java.util.UUID]
|
46
55
|
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
47
56
|
|
48
|
-
# conversion for
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
+
# conversion for amount [type = java.math.BigDecimal]
|
58
|
+
if amount.nil?
|
59
|
+
amount = java.math.BigDecimal::ZERO
|
60
|
+
else
|
61
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
62
|
+
end
|
63
|
+
|
64
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
65
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
|
66
|
+
|
67
|
+
# conversion for effectiveDate [type = org.joda.time.DateTime]
|
68
|
+
if !effectiveDate.nil?
|
69
|
+
effectiveDate = (effectiveDate.kind_of? Time) ? DateTime.parse(effectiveDate.to_s) : effectiveDate
|
70
|
+
effectiveDate = Java::org.joda.time.DateTime.new(effectiveDate.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
57
71
|
end
|
58
|
-
res = tmp
|
59
|
-
return res
|
60
|
-
end
|
61
72
|
|
62
|
-
|
63
|
-
|
73
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
74
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
64
75
|
|
65
|
-
# conversion for
|
66
|
-
|
76
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
77
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
67
78
|
|
68
|
-
# conversion for
|
79
|
+
# conversion for properties [type = java.lang.Iterable]
|
80
|
+
tmp = java.util.ArrayList.new
|
81
|
+
(properties || []).each do |m|
|
82
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
83
|
+
m = m.to_java unless m.nil?
|
84
|
+
tmp.add(m)
|
85
|
+
end
|
86
|
+
properties = tmp
|
87
|
+
|
88
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
89
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
90
|
+
|
91
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
69
92
|
context = context.to_java unless context.nil?
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
93
|
+
begin
|
94
|
+
res = @real_java_api.create_purchase_for_invoice_payment(account, invoiceId, paymentMethodId, paymentId, amount, currency, effectiveDate, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
95
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
96
|
+
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
97
|
+
return res
|
98
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
99
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
77
100
|
end
|
78
|
-
res = tmp
|
79
|
-
return res
|
80
101
|
end
|
102
|
+
|
103
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment createRefundForInvoicePayment(Java::boolean, Java::java.util.Map, Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::org.joda.time.DateTime, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
104
|
+
def create_refund_for_invoice_payment(isAdjusted, adjustments, account, paymentId, amount, currency, effectiveDate, paymentTransactionExternalKey, properties, paymentOptions, context)
|
105
|
+
|
106
|
+
# conversion for isAdjusted [type = boolean]
|
107
|
+
isAdjusted = isAdjusted.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isAdjusted)
|
108
|
+
|
109
|
+
# conversion for adjustments [type = java.util.Map]
|
110
|
+
tmp = java.util.HashMap.new
|
111
|
+
(adjustments || {}).each do |k,v|
|
112
|
+
tmp.put(k, v)
|
113
|
+
end
|
114
|
+
adjustments = tmp
|
115
|
+
|
116
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
117
|
+
account = account.to_java unless account.nil?
|
118
|
+
|
119
|
+
# conversion for paymentId [type = java.util.UUID]
|
120
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
121
|
+
|
122
|
+
# conversion for amount [type = java.math.BigDecimal]
|
123
|
+
if amount.nil?
|
124
|
+
amount = java.math.BigDecimal::ZERO
|
125
|
+
else
|
126
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
127
|
+
end
|
128
|
+
|
129
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
130
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
|
131
|
+
|
132
|
+
# conversion for effectiveDate [type = org.joda.time.DateTime]
|
133
|
+
if !effectiveDate.nil?
|
134
|
+
effectiveDate = (effectiveDate.kind_of? Time) ? DateTime.parse(effectiveDate.to_s) : effectiveDate
|
135
|
+
effectiveDate = Java::org.joda.time.DateTime.new(effectiveDate.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
81
136
|
end
|
137
|
+
|
138
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
139
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
140
|
+
|
141
|
+
# conversion for properties [type = java.lang.Iterable]
|
142
|
+
tmp = java.util.ArrayList.new
|
143
|
+
(properties || []).each do |m|
|
144
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
145
|
+
m = m.to_java unless m.nil?
|
146
|
+
tmp.add(m)
|
147
|
+
end
|
148
|
+
properties = tmp
|
149
|
+
|
150
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
151
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
152
|
+
|
153
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
154
|
+
context = context.to_java unless context.nil?
|
155
|
+
begin
|
156
|
+
res = @real_java_api.create_refund_for_invoice_payment(isAdjusted, adjustments, account, paymentId, amount, currency, effectiveDate, paymentTransactionExternalKey, properties, paymentOptions, context)
|
157
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
158
|
+
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
159
|
+
return res
|
160
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
161
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
java_signature 'Java::org.killbill.billing.invoice.api.InvoicePayment createCreditForInvoicePayment(Java::boolean, Java::java.util.Map, Java::org.killbill.billing.account.api.Account, Java::java.util.UUID, Java::java.util.UUID, Java::java.util.UUID, Java::java.math.BigDecimal, Java::org.killbill.billing.catalog.api.Currency, Java::org.joda.time.DateTime, Java::java.lang.String, Java::java.lang.String, Java::java.lang.Iterable, Java::org.killbill.billing.payment.api.PaymentOptions, Java::org.killbill.billing.util.callcontext.CallContext)'
|
166
|
+
def create_credit_for_invoice_payment(isAdjusted, adjustments, account, originalPaymentId, paymentMethodId, paymentId, amount, currency, effectiveDate, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
167
|
+
|
168
|
+
# conversion for isAdjusted [type = boolean]
|
169
|
+
isAdjusted = isAdjusted.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(isAdjusted)
|
170
|
+
|
171
|
+
# conversion for adjustments [type = java.util.Map]
|
172
|
+
tmp = java.util.HashMap.new
|
173
|
+
(adjustments || {}).each do |k,v|
|
174
|
+
tmp.put(k, v)
|
82
175
|
end
|
176
|
+
adjustments = tmp
|
177
|
+
|
178
|
+
# conversion for account [type = org.killbill.billing.account.api.Account]
|
179
|
+
account = account.to_java unless account.nil?
|
180
|
+
|
181
|
+
# conversion for originalPaymentId [type = java.util.UUID]
|
182
|
+
originalPaymentId = java.util.UUID.fromString(originalPaymentId.to_s) unless originalPaymentId.nil?
|
183
|
+
|
184
|
+
# conversion for paymentMethodId [type = java.util.UUID]
|
185
|
+
paymentMethodId = java.util.UUID.fromString(paymentMethodId.to_s) unless paymentMethodId.nil?
|
186
|
+
|
187
|
+
# conversion for paymentId [type = java.util.UUID]
|
188
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
189
|
+
|
190
|
+
# conversion for amount [type = java.math.BigDecimal]
|
191
|
+
if amount.nil?
|
192
|
+
amount = java.math.BigDecimal::ZERO
|
193
|
+
else
|
194
|
+
amount = java.math.BigDecimal.new(amount.to_s)
|
195
|
+
end
|
196
|
+
|
197
|
+
# conversion for currency [type = org.killbill.billing.catalog.api.Currency]
|
198
|
+
currency = Java::org.killbill.billing.catalog.api.Currency.value_of( currency.to_s ) unless currency.nil?
|
199
|
+
|
200
|
+
# conversion for effectiveDate [type = org.joda.time.DateTime]
|
201
|
+
if !effectiveDate.nil?
|
202
|
+
effectiveDate = (effectiveDate.kind_of? Time) ? DateTime.parse(effectiveDate.to_s) : effectiveDate
|
203
|
+
effectiveDate = Java::org.joda.time.DateTime.new(effectiveDate.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
204
|
+
end
|
205
|
+
|
206
|
+
# conversion for paymentExternalKey [type = java.lang.String]
|
207
|
+
paymentExternalKey = paymentExternalKey.to_s unless paymentExternalKey.nil?
|
208
|
+
|
209
|
+
# conversion for paymentTransactionExternalKey [type = java.lang.String]
|
210
|
+
paymentTransactionExternalKey = paymentTransactionExternalKey.to_s unless paymentTransactionExternalKey.nil?
|
211
|
+
|
212
|
+
# conversion for properties [type = java.lang.Iterable]
|
213
|
+
tmp = java.util.ArrayList.new
|
214
|
+
(properties || []).each do |m|
|
215
|
+
# conversion for m [type = org.killbill.billing.payment.api.PluginProperty]
|
216
|
+
m = m.to_java unless m.nil?
|
217
|
+
tmp.add(m)
|
218
|
+
end
|
219
|
+
properties = tmp
|
220
|
+
|
221
|
+
# conversion for paymentOptions [type = org.killbill.billing.payment.api.PaymentOptions]
|
222
|
+
paymentOptions = paymentOptions.to_java unless paymentOptions.nil?
|
223
|
+
|
224
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
|
225
|
+
context = context.to_java unless context.nil?
|
226
|
+
begin
|
227
|
+
res = @real_java_api.create_credit_for_invoice_payment(isAdjusted, adjustments, account, originalPaymentId, paymentMethodId, paymentId, amount, currency, effectiveDate, paymentExternalKey, paymentTransactionExternalKey, properties, paymentOptions, context)
|
228
|
+
# conversion for res [type = org.killbill.billing.invoice.api.InvoicePayment]
|
229
|
+
res = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(res) unless res.nil?
|
230
|
+
return res
|
231
|
+
rescue Java::org.killbill.billing.payment.api.PaymentApiException => e
|
232
|
+
raise Killbill::Plugin::Model::PaymentApiException.new.to_ruby(e)
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
java_signature 'Java::java.util.List getInvoicePayments(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
237
|
+
def get_invoice_payments(paymentId, context)
|
238
|
+
|
239
|
+
# conversion for paymentId [type = java.util.UUID]
|
240
|
+
paymentId = java.util.UUID.fromString(paymentId.to_s) unless paymentId.nil?
|
241
|
+
|
242
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
243
|
+
context = context.to_java unless context.nil?
|
244
|
+
res = @real_java_api.get_invoice_payments(paymentId, context)
|
245
|
+
# conversion for res [type = java.util.List]
|
246
|
+
tmp = []
|
247
|
+
(res || []).each do |m|
|
248
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
249
|
+
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
250
|
+
tmp << m
|
83
251
|
end
|
252
|
+
res = tmp
|
253
|
+
return res
|
254
|
+
end
|
255
|
+
|
256
|
+
java_signature 'Java::java.util.List getInvoicePaymentsByAccount(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
|
257
|
+
def get_invoice_payments_by_account(accountId, context)
|
258
|
+
|
259
|
+
# conversion for accountId [type = java.util.UUID]
|
260
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
261
|
+
|
262
|
+
# conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
|
263
|
+
context = context.to_java unless context.nil?
|
264
|
+
res = @real_java_api.get_invoice_payments_by_account(accountId, context)
|
265
|
+
# conversion for res [type = java.util.List]
|
266
|
+
tmp = []
|
267
|
+
(res || []).each do |m|
|
268
|
+
# conversion for m [type = org.killbill.billing.invoice.api.InvoicePayment]
|
269
|
+
m = Killbill::Plugin::Model::InvoicePayment.new.to_ruby(m) unless m.nil?
|
270
|
+
tmp << m
|
271
|
+
end
|
272
|
+
res = tmp
|
273
|
+
return res
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
277
|
+
end
|
84
278
|
end
|