killbill 1.0.19 → 1.1.1
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.
- data/Jarfile +4 -2
- data/VERSION +1 -1
- data/killbill.gemspec +4 -3
- data/lib/killbill.rb +7 -51
- data/lib/killbill/creator.rb +10 -18
- data/lib/killbill/gen/account.rb +208 -27
- data/lib/killbill/gen/account_api_exception.rb +66 -0
- data/lib/killbill/gen/account_data.rb +166 -23
- data/lib/killbill/gen/account_email.rb +80 -8
- data/lib/killbill/gen/account_service.rb +55 -0
- data/lib/killbill/gen/account_user_api.rb +187 -0
- data/lib/killbill/gen/audit_user_api.rb +196 -0
- data/lib/killbill/gen/beatrix_service.rb +55 -0
- data/lib/killbill/gen/billing_exception_base.rb +66 -0
- data/lib/killbill/gen/blockable.rb +91 -0
- data/lib/killbill/gen/blocking_api_exception.rb +66 -0
- data/lib/killbill/gen/blocking_state.rb +150 -16
- data/lib/killbill/gen/call_context.rb +107 -13
- data/lib/killbill/gen/catalog.rb +76 -0
- data/lib/killbill/gen/catalog_api_exception.rb +66 -0
- data/lib/killbill/gen/catalog_service.rb +69 -0
- data/lib/killbill/gen/catalog_user_api.rb +54 -0
- data/lib/killbill/gen/column_info.rb +67 -0
- data/lib/killbill/gen/control_tag.rb +112 -0
- data/lib/killbill/gen/currency_value_null.rb +66 -0
- data/lib/killbill/gen/custom_field.rb +93 -10
- data/lib/killbill/gen/custom_field_api_exception.rb +66 -0
- data/lib/killbill/gen/custom_field_user_api.rb +115 -0
- data/lib/killbill/gen/database_export_output_stream.rb +51 -0
- data/lib/killbill/gen/default_mutable_account_data.rb +180 -0
- data/lib/killbill/gen/duration.rb +62 -0
- data/lib/killbill/gen/entitlement_service.rb +55 -0
- data/lib/killbill/gen/entitlement_user_api.rb +272 -0
- data/lib/killbill/gen/entitlement_user_api_exception.rb +66 -0
- data/lib/killbill/gen/entity.rb +84 -0
- data/lib/killbill/gen/entity_persistence_exception.rb +66 -0
- data/lib/killbill/gen/export_user_api.rb +17 -0
- data/lib/killbill/gen/ext_bus_event.rb +68 -9
- data/lib/killbill/gen/external_bus.rb +51 -0
- data/lib/killbill/gen/illegal_plan_change.rb +66 -0
- data/lib/killbill/gen/international_price.rb +79 -0
- data/lib/killbill/gen/invalid_config_exception.rb +49 -0
- data/lib/killbill/gen/invoice.rb +238 -23
- data/lib/killbill/gen/invoice_api_exception.rb +66 -0
- data/lib/killbill/gen/invoice_creation_event.rb +51 -0
- data/lib/killbill/gen/invoice_item.rb +179 -21
- data/lib/killbill/gen/invoice_migration_api.rb +66 -0
- data/lib/killbill/gen/invoice_notifier.rb +51 -0
- data/lib/killbill/gen/invoice_payment.rb +135 -15
- data/lib/killbill/gen/invoice_payment_api.rb +208 -0
- data/lib/killbill/gen/invoice_service.rb +55 -0
- data/lib/killbill/gen/invoice_user_api.rb +461 -0
- data/lib/killbill/gen/junction_api.rb +60 -0
- data/lib/killbill/gen/limit.rb +68 -0
- data/lib/killbill/gen/listing.rb +63 -0
- data/lib/killbill/gen/migration_account_data.rb +228 -0
- data/lib/killbill/gen/migration_plan.rb +143 -0
- data/lib/killbill/gen/mutable_account_data.rb +182 -0
- data/lib/killbill/gen/no_op_payment_plugin_api.rb +254 -0
- data/lib/killbill/gen/payment.rb +183 -20
- data/lib/killbill/gen/payment_api.rb +433 -0
- data/lib/killbill/gen/payment_api_exception.rb +66 -0
- data/lib/killbill/gen/payment_attempt.rb +100 -10
- data/lib/killbill/gen/payment_info_plugin.rb +103 -12
- data/lib/killbill/gen/payment_method.rb +116 -0
- data/lib/killbill/gen/payment_method_info_plugin.rb +64 -7
- data/lib/killbill/gen/payment_method_kv_info.rb +56 -6
- data/lib/killbill/gen/payment_method_plugin.rb +142 -20
- data/lib/killbill/gen/payment_plugin_api.rb +232 -0
- data/lib/killbill/gen/payment_plugin_api_exception.rb +59 -0
- data/lib/killbill/gen/payment_service.rb +62 -0
- data/lib/killbill/gen/plan.rb +143 -0
- data/lib/killbill/gen/plan_change_result.rb +68 -0
- data/lib/killbill/gen/plan_phase.rb +104 -0
- data/lib/killbill/gen/plan_phase_specifier.rb +80 -0
- data/lib/killbill/gen/plan_specifier.rb +73 -0
- data/lib/killbill/gen/price.rb +67 -0
- data/lib/killbill/gen/price_list.rb +74 -0
- data/lib/killbill/gen/price_list_set.rb +56 -0
- data/lib/killbill/gen/product.rb +101 -0
- data/lib/killbill/gen/record_id_api.rb +55 -0
- data/lib/killbill/gen/refund.rb +126 -13
- data/lib/killbill/gen/refund_info_plugin.rb +96 -10
- data/lib/killbill/gen/require_gen.rb +97 -15
- data/lib/killbill/gen/static_catalog.rb +137 -0
- data/lib/killbill/gen/subscription.rb +258 -28
- data/lib/killbill/gen/subscription_bundle.rb +94 -10
- data/lib/killbill/gen/subscription_status_dry_run.rb +89 -0
- data/lib/killbill/gen/subscription_transition.rb +196 -0
- data/lib/killbill/gen/tag.rb +88 -9
- data/lib/killbill/gen/tag_api_exception.rb +66 -0
- data/lib/killbill/gen/tag_definition.rb +110 -10
- data/lib/killbill/gen/tag_definition_api_exception.rb +66 -0
- data/lib/killbill/gen/tag_user_api.rb +239 -0
- data/lib/killbill/gen/tenant.rb +102 -0
- data/lib/killbill/gen/tenant_api_exception.rb +66 -0
- data/lib/killbill/gen/tenant_context.rb +39 -4
- data/lib/killbill/gen/tenant_data.rb +67 -0
- data/lib/killbill/gen/tenant_kv.rb +96 -0
- data/lib/killbill/gen/tenant_service.rb +55 -0
- data/lib/killbill/gen/tenant_user_api.rb +127 -0
- data/lib/killbill/gen/unit.rb +55 -0
- data/lib/killbill/jnotification.rb +1 -1
- data/lib/killbill/jpayment.rb +10 -7
- data/lib/killbill/jplugin.rb +63 -61
- data/lib/killbill/killbill_api.rb +42 -9
- data/spec/killbill/jnotification_spec.rb +15 -1
- data/spec/killbill/jpayment_spec.rb +12 -8
- data/spec/killbill/killbillapi_spec.rb +23 -21
- data/spec/killbill/payment_plugin_spec.rb +1 -9
- data/spec/killbill/payment_test.rb +21 -5
- metadata +96 -22
- data/lib/killbill/gen/audit_log.rb +0 -28
- data/lib/killbill/gen/call_origin.rb +0 -34
- data/lib/killbill/gen/currency.rb +0 -34
- data/lib/killbill/gen/date_time_zone.rb +0 -35
- data/lib/killbill/gen/ext_bus_event_type.rb +0 -34
- data/lib/killbill/gen/invoice_payment_type.rb +0 -34
- data/lib/killbill/gen/object_type.rb +0 -34
- data/lib/killbill/gen/payment_plugin_status.rb +0 -34
- data/lib/killbill/gen/refund_plugin_status.rb +0 -34
- data/lib/killbill/gen/subscription_source_type.rb +0 -34
- data/lib/killbill/gen/subscription_state.rb +0 -34
- data/lib/killbill/gen/user_type.rb +0 -34
- data/lib/killbill/gen/uuid.rb +0 -22
- data/lib/killbill/jconverter.rb +0 -537
- data/lib/killbill/jkillbill_api.rb +0 -137
- data/spec/killbill/jconverter_spec.rb +0 -193
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
###################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# #
|
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
7
|
+
# License. You may obtain a copy of the License at: #
|
|
8
|
+
# #
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
|
+
# #
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
14
|
+
# License for the specific language governing permissions and limitations #
|
|
15
|
+
# under the License. #
|
|
16
|
+
# #
|
|
17
|
+
###################################################################################
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# DO NOT EDIT!!!
|
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
|
23
|
+
#
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
module Killbill
|
|
27
|
+
module Plugin
|
|
28
|
+
module Model
|
|
29
|
+
|
|
30
|
+
class InvoiceApiException
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
attr_accessor :message, :cause, :code
|
|
34
|
+
|
|
35
|
+
def initialize()
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def to_java()
|
|
39
|
+
# conversion for message [type = java.lang.String]
|
|
40
|
+
@message = @message.to_s unless @message.nil?
|
|
41
|
+
|
|
42
|
+
# conversion for cause [type = java.lang.Throwable]
|
|
43
|
+
@cause = @cause.to_s unless cause.nil?
|
|
44
|
+
|
|
45
|
+
# conversion for code [type = int]
|
|
46
|
+
@code = @code
|
|
47
|
+
Java::com.ning.billing.invoice.api.InvoiceApiException.new(@message, @cause, @code)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def to_ruby(j_obj)
|
|
51
|
+
# conversion for message [type = java.lang.String]
|
|
52
|
+
@message = j_obj.message
|
|
53
|
+
|
|
54
|
+
# conversion for cause [type = java.lang.Throwable]
|
|
55
|
+
@cause = j_obj.cause
|
|
56
|
+
@cause = @cause.to_s unless @cause.nil?
|
|
57
|
+
|
|
58
|
+
# conversion for code [type = int]
|
|
59
|
+
@code = j_obj.code
|
|
60
|
+
self
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
###################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# #
|
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
7
|
+
# License. You may obtain a copy of the License at: #
|
|
8
|
+
# #
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
|
+
# #
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
14
|
+
# License for the specific language governing permissions and limitations #
|
|
15
|
+
# under the License. #
|
|
16
|
+
# #
|
|
17
|
+
###################################################################################
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# DO NOT EDIT!!!
|
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
|
23
|
+
#
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
module Killbill
|
|
27
|
+
module Plugin
|
|
28
|
+
module Model
|
|
29
|
+
|
|
30
|
+
java_package 'com.ning.billing.invoice.api'
|
|
31
|
+
class InvoiceCreationEvent
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.invoice.api.InvoiceCreationEvent
|
|
34
|
+
|
|
35
|
+
attr_accessor
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
self
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def to_ruby(j_obj)
|
|
45
|
+
self
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -1,36 +1,194 @@
|
|
|
1
|
+
###################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# #
|
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
7
|
+
# License. You may obtain a copy of the License at: #
|
|
8
|
+
# #
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
|
+
# #
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
14
|
+
# License for the specific language governing permissions and limitations #
|
|
15
|
+
# under the License. #
|
|
16
|
+
# #
|
|
17
|
+
###################################################################################
|
|
18
|
+
|
|
1
19
|
|
|
2
20
|
#
|
|
3
|
-
#
|
|
21
|
+
# DO NOT EDIT!!!
|
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
|
4
23
|
#
|
|
24
|
+
|
|
25
|
+
|
|
5
26
|
module Killbill
|
|
6
27
|
module Plugin
|
|
7
28
|
module Model
|
|
8
29
|
|
|
30
|
+
java_package 'com.ning.billing.invoice.api'
|
|
9
31
|
class InvoiceItem
|
|
10
32
|
|
|
11
33
|
include com.ning.billing.invoice.api.InvoiceItem
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def initialize(
|
|
16
|
-
@id = id
|
|
17
|
-
@created_date = created_date
|
|
18
|
-
@updated_date = updated_date
|
|
19
|
-
@invoice_item_type = invoice_item_type
|
|
20
|
-
@invoice_id = invoice_id
|
|
21
|
-
@account_id = account_id
|
|
22
|
-
@start_date = start_date
|
|
23
|
-
@end_date = end_date
|
|
24
|
-
@amount = amount
|
|
25
|
-
@currency = currency
|
|
26
|
-
@description = description
|
|
27
|
-
@bundle_id = bundle_id
|
|
28
|
-
@subscription_id = subscription_id
|
|
29
|
-
@plan_name = plan_name
|
|
30
|
-
@phase_name = phase_name
|
|
31
|
-
@rate = rate
|
|
32
|
-
@linked_item_id = linked_item_id
|
|
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
|
+
|
|
37
|
+
def initialize()
|
|
33
38
|
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
# conversion for id [type = java.util.UUID]
|
|
42
|
+
@id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
|
|
43
|
+
|
|
44
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
|
45
|
+
if !@created_date.nil?
|
|
46
|
+
@created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
|
|
47
|
+
@created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
|
51
|
+
if !@updated_date.nil?
|
|
52
|
+
@updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
|
|
53
|
+
@updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# conversion for invoice_item_type [type = com.ning.billing.invoice.api.InvoiceItemType]
|
|
57
|
+
@invoice_item_type = Java::com.ning.billing.invoice.api.InvoiceItemType.value_of("#{@invoice_item_type.to_s}") unless @invoice_item_type.nil?
|
|
58
|
+
|
|
59
|
+
# conversion for invoice_id [type = java.util.UUID]
|
|
60
|
+
@invoice_id = java.util.UUID.fromString(@invoice_id.to_s) unless @invoice_id.nil?
|
|
61
|
+
|
|
62
|
+
# conversion for account_id [type = java.util.UUID]
|
|
63
|
+
@account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
|
|
64
|
+
|
|
65
|
+
# conversion for start_date [type = org.joda.time.LocalDate]
|
|
66
|
+
if !@start_date.nil?
|
|
67
|
+
@start_date = Java::org.joda.time.LocalDate.parse(@start_date.to_s)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# conversion for end_date [type = org.joda.time.LocalDate]
|
|
71
|
+
if !@end_date.nil?
|
|
72
|
+
@end_date = Java::org.joda.time.LocalDate.parse(@end_date.to_s)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
76
|
+
if @amount.nil?
|
|
77
|
+
@amount = java.math.BigDecimal::ZERO
|
|
78
|
+
else
|
|
79
|
+
@amount = java.math.BigDecimal.new(@amount.to_i)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# conversion for currency [type = com.ning.billing.catalog.api.Currency]
|
|
83
|
+
@currency = Java::com.ning.billing.catalog.api.Currency.value_of("#{@currency.to_s}") unless @currency.nil?
|
|
84
|
+
|
|
85
|
+
# conversion for description [type = java.lang.String]
|
|
86
|
+
@description = @description.to_s unless @description.nil?
|
|
87
|
+
|
|
88
|
+
# conversion for bundle_id [type = java.util.UUID]
|
|
89
|
+
@bundle_id = java.util.UUID.fromString(@bundle_id.to_s) unless @bundle_id.nil?
|
|
90
|
+
|
|
91
|
+
# conversion for subscription_id [type = java.util.UUID]
|
|
92
|
+
@subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
|
|
93
|
+
|
|
94
|
+
# conversion for plan_name [type = java.lang.String]
|
|
95
|
+
@plan_name = @plan_name.to_s unless @plan_name.nil?
|
|
96
|
+
|
|
97
|
+
# conversion for phase_name [type = java.lang.String]
|
|
98
|
+
@phase_name = @phase_name.to_s unless @phase_name.nil?
|
|
99
|
+
|
|
100
|
+
# conversion for rate [type = java.math.BigDecimal]
|
|
101
|
+
if @rate.nil?
|
|
102
|
+
@rate = java.math.BigDecimal::ZERO
|
|
103
|
+
else
|
|
104
|
+
@rate = java.math.BigDecimal.new(@rate.to_i)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# conversion for linked_item_id [type = java.util.UUID]
|
|
108
|
+
@linked_item_id = java.util.UUID.fromString(@linked_item_id.to_s) unless @linked_item_id.nil?
|
|
109
|
+
self
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def to_ruby(j_obj)
|
|
113
|
+
# conversion for id [type = java.util.UUID]
|
|
114
|
+
@id = j_obj.id
|
|
115
|
+
@id = @id.nil? ? nil : @id.to_s
|
|
116
|
+
|
|
117
|
+
# conversion for created_date [type = org.joda.time.DateTime]
|
|
118
|
+
@created_date = j_obj.created_date
|
|
119
|
+
if !@created_date.nil?
|
|
120
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
121
|
+
str = fmt.print(@created_date)
|
|
122
|
+
@created_date = DateTime.iso8601(str)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# conversion for updated_date [type = org.joda.time.DateTime]
|
|
126
|
+
@updated_date = j_obj.updated_date
|
|
127
|
+
if !@updated_date.nil?
|
|
128
|
+
fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
|
|
129
|
+
str = fmt.print(@updated_date)
|
|
130
|
+
@updated_date = DateTime.iso8601(str)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# conversion for invoice_item_type [type = com.ning.billing.invoice.api.InvoiceItemType]
|
|
134
|
+
@invoice_item_type = j_obj.invoice_item_type
|
|
135
|
+
@invoice_item_type = @invoice_item_type.to_s.to_sym unless @invoice_item_type.nil?
|
|
136
|
+
|
|
137
|
+
# conversion for invoice_id [type = java.util.UUID]
|
|
138
|
+
@invoice_id = j_obj.invoice_id
|
|
139
|
+
@invoice_id = @invoice_id.nil? ? nil : @invoice_id.to_s
|
|
140
|
+
|
|
141
|
+
# conversion for account_id [type = java.util.UUID]
|
|
142
|
+
@account_id = j_obj.account_id
|
|
143
|
+
@account_id = @account_id.nil? ? nil : @account_id.to_s
|
|
144
|
+
|
|
145
|
+
# conversion for start_date [type = org.joda.time.LocalDate]
|
|
146
|
+
@start_date = j_obj.start_date
|
|
147
|
+
if !@start_date.nil?
|
|
148
|
+
@start_date = @start_date.to_s
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# conversion for end_date [type = org.joda.time.LocalDate]
|
|
152
|
+
@end_date = j_obj.end_date
|
|
153
|
+
if !@end_date.nil?
|
|
154
|
+
@end_date = @end_date.to_s
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# conversion for amount [type = java.math.BigDecimal]
|
|
158
|
+
@amount = j_obj.amount
|
|
159
|
+
@amount = @amount.nil? ? 0 : @amount.to_s.to_i
|
|
160
|
+
|
|
161
|
+
# conversion for currency [type = com.ning.billing.catalog.api.Currency]
|
|
162
|
+
@currency = j_obj.currency
|
|
163
|
+
@currency = @currency.to_s.to_sym unless @currency.nil?
|
|
164
|
+
|
|
165
|
+
# conversion for description [type = java.lang.String]
|
|
166
|
+
@description = j_obj.description
|
|
167
|
+
|
|
168
|
+
# conversion for bundle_id [type = java.util.UUID]
|
|
169
|
+
@bundle_id = j_obj.bundle_id
|
|
170
|
+
@bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s
|
|
171
|
+
|
|
172
|
+
# conversion for subscription_id [type = java.util.UUID]
|
|
173
|
+
@subscription_id = j_obj.subscription_id
|
|
174
|
+
@subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
|
|
175
|
+
|
|
176
|
+
# conversion for plan_name [type = java.lang.String]
|
|
177
|
+
@plan_name = j_obj.plan_name
|
|
178
|
+
|
|
179
|
+
# conversion for phase_name [type = java.lang.String]
|
|
180
|
+
@phase_name = j_obj.phase_name
|
|
181
|
+
|
|
182
|
+
# conversion for rate [type = java.math.BigDecimal]
|
|
183
|
+
@rate = j_obj.rate
|
|
184
|
+
@rate = @rate.nil? ? 0 : @rate.to_s.to_i
|
|
185
|
+
|
|
186
|
+
# conversion for linked_item_id [type = java.util.UUID]
|
|
187
|
+
@linked_item_id = j_obj.linked_item_id
|
|
188
|
+
@linked_item_id = @linked_item_id.nil? ? nil : @linked_item_id.to_s
|
|
189
|
+
self
|
|
190
|
+
end
|
|
191
|
+
|
|
34
192
|
end
|
|
35
193
|
end
|
|
36
194
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
###################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# #
|
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
7
|
+
# License. You may obtain a copy of the License at: #
|
|
8
|
+
# #
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
|
+
# #
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
14
|
+
# License for the specific language governing permissions and limitations #
|
|
15
|
+
# under the License. #
|
|
16
|
+
# #
|
|
17
|
+
###################################################################################
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# DO NOT EDIT!!!
|
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
|
23
|
+
#
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
module Killbill
|
|
27
|
+
module Plugin
|
|
28
|
+
module Api
|
|
29
|
+
|
|
30
|
+
java_package 'com.ning.billing.invoice.api'
|
|
31
|
+
class InvoiceMigrationApi
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.invoice.api.InvoiceMigrationApi
|
|
34
|
+
|
|
35
|
+
def initialize(real_java_api)
|
|
36
|
+
@real_java_api = real_java_api
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
java_signature 'Java::java.util.UUID createMigrationInvoice(Java::java.util.UUID, Java::org.joda.time.LocalDate, Java::java.math.BigDecimal, Java::com.ning.billing.catalog.api.Currency, Java::com.ning.billing.util.callcontext.CallContext)'
|
|
41
|
+
def create_migration_invoice(accountId, targetDate, balance, currency, context)
|
|
42
|
+
# conversion for accountId [type = java.util.UUID]
|
|
43
|
+
accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
|
|
44
|
+
# conversion for targetDate [type = org.joda.time.LocalDate]
|
|
45
|
+
if !targetDate.nil?
|
|
46
|
+
targetDate = Java::org.joda.time.LocalDate.parse(targetDate.to_s)
|
|
47
|
+
end
|
|
48
|
+
# conversion for balance [type = java.math.BigDecimal]
|
|
49
|
+
if balance.nil?
|
|
50
|
+
balance = java.math.BigDecimal::ZERO
|
|
51
|
+
else
|
|
52
|
+
balance = java.math.BigDecimal.new(balance.to_i)
|
|
53
|
+
end
|
|
54
|
+
# conversion for currency [type = com.ning.billing.catalog.api.Currency]
|
|
55
|
+
currency = Java::com.ning.billing.catalog.api.Currency.value_of("#{currency.to_s}") unless currency.nil?
|
|
56
|
+
# conversion for context [type = com.ning.billing.util.callcontext.CallContext]
|
|
57
|
+
context = context.to_java unless context.nil?
|
|
58
|
+
res = @real_java_api.create_migration_invoice(accountId, targetDate, balance, currency, context)
|
|
59
|
+
# conversion for res [type = java.util.UUID]
|
|
60
|
+
res = res.nil? ? nil : res.to_s
|
|
61
|
+
return res
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
###################################################################################
|
|
2
|
+
# #
|
|
3
|
+
# Copyright 2010-2013 Ning, Inc. #
|
|
4
|
+
# #
|
|
5
|
+
# Ning licenses this file to you under the Apache License, version 2.0 #
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with the #
|
|
7
|
+
# License. You may obtain a copy of the License at: #
|
|
8
|
+
# #
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
|
10
|
+
# #
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software #
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
|
|
13
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
|
|
14
|
+
# License for the specific language governing permissions and limitations #
|
|
15
|
+
# under the License. #
|
|
16
|
+
# #
|
|
17
|
+
###################################################################################
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#
|
|
21
|
+
# DO NOT EDIT!!!
|
|
22
|
+
# File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
|
|
23
|
+
#
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
module Killbill
|
|
27
|
+
module Plugin
|
|
28
|
+
module Model
|
|
29
|
+
|
|
30
|
+
java_package 'com.ning.billing.invoice.api'
|
|
31
|
+
class InvoiceNotifier
|
|
32
|
+
|
|
33
|
+
include com.ning.billing.invoice.api.InvoiceNotifier
|
|
34
|
+
|
|
35
|
+
attr_accessor
|
|
36
|
+
|
|
37
|
+
def initialize()
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def to_java()
|
|
41
|
+
self
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def to_ruby(j_obj)
|
|
45
|
+
self
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|