killbill 3.1.11 → 3.1.12

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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/Jarfile +6 -6
  3. data/NEWS +6 -0
  4. data/VERSION +1 -1
  5. data/generators/active_merchant/templates/Jarfile.rb +7 -7
  6. data/generators/active_merchant/templates/db/ddl.sql.rb +2 -0
  7. data/generators/active_merchant/templates/db/schema.rb +2 -0
  8. data/generators/active_merchant/templates/lib/application.rb +1 -5
  9. data/generators/active_merchant/templates/lib/models/response.rb +2 -1
  10. data/generators/active_merchant/templates/lib/plugin.rb +1 -0
  11. data/generators/active_merchant/templates/lib/private_api.rb +7 -0
  12. data/generators/active_merchant/templates/plugin.gemspec.rb +3 -2
  13. data/generators/active_merchant/templates/spec/integration_spec.rb +103 -2
  14. data/killbill.gemspec +4 -1
  15. data/lib/killbill/gen/api/dry_run_arguments.rb +100 -0
  16. data/lib/killbill/gen/api/invoice_user_api.rb +5 -5
  17. data/lib/killbill/gen/api/killbill_api.rb +19 -18
  18. data/lib/killbill/gen/api/payment_options.rb +17 -5
  19. data/lib/killbill/gen/api/require_gen.rb +5 -0
  20. data/lib/killbill/gen/api/rolled_up_unit.rb +63 -0
  21. data/lib/killbill/gen/api/rolled_up_usage.rb +31 -35
  22. data/lib/killbill/gen/api/static_catalog.rb +8 -8
  23. data/lib/killbill/gen/api/subscription_usage_record.rb +75 -0
  24. data/lib/killbill/gen/api/unit_usage_record.rb +74 -0
  25. data/lib/killbill/gen/api/usage_record.rb +66 -0
  26. data/lib/killbill/gen/api/usage_user_api.rb +22 -56
  27. data/lib/killbill/gen/plugin-api/currency_plugin_api.rb +19 -18
  28. data/lib/killbill/gen/plugin-api/ext_bus_event.rb +19 -18
  29. data/lib/killbill/gen/plugin-api/gateway_notification.rb +19 -18
  30. data/lib/killbill/gen/plugin-api/hosted_payment_page_form_descriptor.rb +19 -18
  31. data/lib/killbill/gen/plugin-api/notification_plugin_api.rb +19 -18
  32. data/lib/killbill/gen/plugin-api/payment_method_info_plugin.rb +19 -18
  33. data/lib/killbill/gen/plugin-api/payment_plugin_api.rb +19 -18
  34. data/lib/killbill/gen/plugin-api/payment_plugin_api_exception.rb +19 -18
  35. data/lib/killbill/gen/plugin-api/payment_transaction_info_plugin.rb +19 -18
  36. data/lib/killbill/gen/plugin-api/require_gen.rb +19 -18
  37. data/lib/killbill/helpers/active_merchant/active_record/models/payment_method.rb +4 -0
  38. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +65 -34
  39. data/lib/killbill/helpers/active_merchant/active_record/models/streamy_result_set.rb +14 -2
  40. data/lib/killbill/helpers/active_merchant/active_record/models/transaction.rb +9 -5
  41. data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +28 -23
  42. data/lib/killbill/helpers/active_merchant/payment_plugin.rb +66 -36
  43. data/lib/killbill/helpers/active_merchant/private_payment_plugin.rb +18 -31
  44. data/lib/killbill/helpers/active_merchant/sinatra.rb +7 -2
  45. data/lib/killbill/helpers/active_merchant/utils.rb +12 -0
  46. data/spec/killbill/helpers/killbill_spec_helper_spec.rb +24 -0
  47. data/spec/killbill/helpers/payment_method_spec.rb +5 -0
  48. data/spec/killbill/helpers/payment_plugin_spec.rb +33 -2
  49. data/spec/killbill/helpers/private_payment_plugin_spec.rb +83 -0
  50. data/spec/killbill/helpers/response_spec.rb +47 -24
  51. data/spec/killbill/helpers/streamy_result_set_spec.rb +38 -0
  52. data/spec/killbill/helpers/test_schema.rb +2 -0
  53. metadata +57 -8
  54. data/lib/killbill/gen/api/payment_attempt.rb +0 -117
  55. data/lib/killbill/gen/api/payment_method_kv_info.rb +0 -71
  56. data/lib/killbill/gen/plugin-api/billing_address.rb +0 -85
  57. data/lib/killbill/gen/plugin-api/customer.rb +0 -73
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.payment.api.PaymentOptions
36
36
 
37
- attr_accessor :is_external_payment, :payment_control_plugin_name
37
+ attr_accessor :is_external_payment, :payment_control_plugin_names
38
38
 
39
39
  def initialize()
40
40
  end
@@ -43,8 +43,14 @@ module Killbill
43
43
  # conversion for is_external_payment [type = boolean]
44
44
  @is_external_payment = @is_external_payment.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_external_payment)
45
45
 
46
- # conversion for payment_control_plugin_name [type = java.lang.String]
47
- @payment_control_plugin_name = @payment_control_plugin_name.to_s unless @payment_control_plugin_name.nil?
46
+ # conversion for payment_control_plugin_names [type = java.util.List]
47
+ tmp = java.util.ArrayList.new
48
+ (@payment_control_plugin_names || []).each do |m|
49
+ # conversion for m [type = java.lang.String]
50
+ m = m.to_s unless m.nil?
51
+ tmp.add(m)
52
+ end
53
+ @payment_control_plugin_names = tmp
48
54
  self
49
55
  end
50
56
 
@@ -58,8 +64,14 @@ module Killbill
58
64
  @is_external_payment = tmp_bool ? true : false
59
65
  end
60
66
 
61
- # conversion for payment_control_plugin_name [type = java.lang.String]
62
- @payment_control_plugin_name = j_obj.payment_control_plugin_name
67
+ # conversion for payment_control_plugin_names [type = java.util.List]
68
+ @payment_control_plugin_names = j_obj.payment_control_plugin_names
69
+ tmp = []
70
+ (@payment_control_plugin_names || []).each do |m|
71
+ # conversion for m [type = java.lang.String]
72
+ tmp << m
73
+ end
74
+ @payment_control_plugin_names = tmp
63
75
  self
64
76
  end
65
77
 
@@ -77,6 +77,7 @@ require 'killbill/gen/api/subscription_api_exception'
77
77
  require 'killbill/gen/api/subscription_bundle'
78
78
  require 'killbill/gen/api/subscription_bundle_timeline'
79
79
  require 'killbill/gen/api/subscription_event'
80
+ require 'killbill/gen/api/dry_run_arguments'
80
81
  require 'killbill/gen/api/invoice_formatter'
81
82
  require 'killbill/gen/api/invoice_item_formatter'
82
83
  require 'killbill/gen/api/invoice'
@@ -106,7 +107,11 @@ require 'killbill/gen/api/tenant_api_exception'
106
107
  require 'killbill/gen/api/tenant_data'
107
108
  require 'killbill/gen/api/tenant_kv'
108
109
  require 'killbill/gen/api/tenant_user_api'
110
+ require 'killbill/gen/api/rolled_up_unit'
109
111
  require 'killbill/gen/api/rolled_up_usage'
112
+ require 'killbill/gen/api/subscription_usage_record'
113
+ require 'killbill/gen/api/unit_usage_record'
114
+ require 'killbill/gen/api/usage_record'
110
115
  require 'killbill/gen/api/usage_user_api'
111
116
  require 'killbill/gen/api/audit_user_api'
112
117
  require 'killbill/gen/api/column_info'
@@ -0,0 +1,63 @@
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.usage.api'
33
+ class RolledUpUnit
34
+
35
+ include org.killbill.billing.usage.api.RolledUpUnit
36
+
37
+ attr_accessor :unit_type, :amount
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for unit_type [type = java.lang.String]
44
+ @unit_type = @unit_type.to_s unless @unit_type.nil?
45
+
46
+ # conversion for amount [type = java.lang.Long]
47
+ @amount = @amount
48
+ self
49
+ end
50
+
51
+ def to_ruby(j_obj)
52
+ # conversion for unit_type [type = java.lang.String]
53
+ @unit_type = j_obj.unit_type
54
+
55
+ # conversion for amount [type = java.lang.Long]
56
+ @amount = j_obj.amount
57
+ self
58
+ end
59
+
60
+ end
61
+ end
62
+ end
63
+ end
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.usage.api.RolledUpUsage
36
36
 
37
- attr_accessor :subscription_id, :unit_type, :start_time, :end_time, :amount
37
+ attr_accessor :subscription_id, :start, :end, :rolled_up_units
38
38
 
39
39
  def initialize()
40
40
  end
@@ -43,27 +43,24 @@ module Killbill
43
43
  # conversion for subscription_id [type = java.util.UUID]
44
44
  @subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
45
45
 
46
- # conversion for unit_type [type = java.lang.String]
47
- @unit_type = @unit_type.to_s unless @unit_type.nil?
48
-
49
- # conversion for start_time [type = org.joda.time.DateTime]
50
- if !@start_time.nil?
51
- @start_time = (@start_time.kind_of? Time) ? DateTime.parse(@start_time.to_s) : @start_time
52
- @start_time = Java::org.joda.time.DateTime.new(@start_time.to_s, Java::org.joda.time.DateTimeZone::UTC)
46
+ # conversion for start [type = org.joda.time.LocalDate]
47
+ if !@start.nil?
48
+ @start = Java::org.joda.time.LocalDate.parse(@start.to_s)
53
49
  end
54
50
 
55
- # conversion for end_time [type = org.joda.time.DateTime]
56
- if !@end_time.nil?
57
- @end_time = (@end_time.kind_of? Time) ? DateTime.parse(@end_time.to_s) : @end_time
58
- @end_time = Java::org.joda.time.DateTime.new(@end_time.to_s, Java::org.joda.time.DateTimeZone::UTC)
51
+ # conversion for end [type = org.joda.time.LocalDate]
52
+ if !@end.nil?
53
+ @end = Java::org.joda.time.LocalDate.parse(@end.to_s)
59
54
  end
60
55
 
61
- # conversion for amount [type = java.math.BigDecimal]
62
- if @amount.nil?
63
- @amount = java.math.BigDecimal::ZERO
64
- else
65
- @amount = java.math.BigDecimal.new(@amount.to_s)
56
+ # conversion for rolled_up_units [type = java.util.List]
57
+ tmp = java.util.ArrayList.new
58
+ (@rolled_up_units || []).each do |m|
59
+ # conversion for m [type = org.killbill.billing.usage.api.RolledUpUnit]
60
+ m = m.to_java unless m.nil?
61
+ tmp.add(m)
66
62
  end
63
+ @rolled_up_units = tmp
67
64
  self
68
65
  end
69
66
 
@@ -72,28 +69,27 @@ module Killbill
72
69
  @subscription_id = j_obj.subscription_id
73
70
  @subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
74
71
 
75
- # conversion for unit_type [type = java.lang.String]
76
- @unit_type = j_obj.unit_type
77
-
78
- # conversion for start_time [type = org.joda.time.DateTime]
79
- @start_time = j_obj.start_time
80
- if !@start_time.nil?
81
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
82
- str = fmt.print(@start_time)
83
- @start_time = DateTime.iso8601(str)
72
+ # conversion for start [type = org.joda.time.LocalDate]
73
+ @start = j_obj.start
74
+ if !@start.nil?
75
+ @start = @start.to_s
84
76
  end
85
77
 
86
- # conversion for end_time [type = org.joda.time.DateTime]
87
- @end_time = j_obj.end_time
88
- if !@end_time.nil?
89
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
90
- str = fmt.print(@end_time)
91
- @end_time = DateTime.iso8601(str)
78
+ # conversion for end [type = org.joda.time.LocalDate]
79
+ @end = j_obj.end
80
+ if !@end.nil?
81
+ @end = @end.to_s
92
82
  end
93
83
 
94
- # conversion for amount [type = java.math.BigDecimal]
95
- @amount = j_obj.amount
96
- @amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s)
84
+ # conversion for rolled_up_units [type = java.util.List]
85
+ @rolled_up_units = j_obj.rolled_up_units
86
+ tmp = []
87
+ (@rolled_up_units || []).each do |m|
88
+ # conversion for m [type = org.killbill.billing.usage.api.RolledUpUnit]
89
+ m = Killbill::Plugin::Model::RolledUpUnit.new.to_ruby(m) unless m.nil?
90
+ tmp << m
91
+ end
92
+ @rolled_up_units = tmp
97
93
  self
98
94
  end
99
95
 
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.StaticCatalog
36
36
 
37
- attr_accessor :catalog_name, :recurring_billing_mode, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings, :available_addon_listings
37
+ attr_accessor :catalog_name, :recurring_billing_mode, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings, :available_add_on_listings
38
38
 
39
39
  def initialize()
40
40
  end
@@ -74,14 +74,14 @@ module Killbill
74
74
  end
75
75
  @available_base_plan_listings = tmp
76
76
 
77
- # conversion for available_addon_listings [type = java.util.List]
77
+ # conversion for available_add_on_listings [type = java.util.List]
78
78
  tmp = java.util.ArrayList.new
79
- (@available_addon_listings || []).each do |m|
79
+ (@available_add_on_listings || []).each do |m|
80
80
  # conversion for m [type = org.killbill.billing.catalog.api.Listing]
81
81
  m = m.to_java unless m.nil?
82
82
  tmp.add(m)
83
83
  end
84
- @available_addon_listings = tmp
84
+ @available_add_on_listings = tmp
85
85
  self
86
86
  end
87
87
 
@@ -128,15 +128,15 @@ module Killbill
128
128
  end
129
129
  @available_base_plan_listings = tmp
130
130
 
131
- # conversion for available_addon_listings [type = java.util.List]
132
- @available_addon_listings = j_obj.available_addon_listings
131
+ # conversion for available_add_on_listings [type = java.util.List]
132
+ @available_add_on_listings = j_obj.available_add_on_listings
133
133
  tmp = []
134
- (@available_addon_listings || []).each do |m|
134
+ (@available_add_on_listings || []).each do |m|
135
135
  # conversion for m [type = org.killbill.billing.catalog.api.Listing]
136
136
  m = Killbill::Plugin::Model::Listing.new.to_ruby(m) unless m.nil?
137
137
  tmp << m
138
138
  end
139
- @available_addon_listings = tmp
139
+ @available_add_on_listings = tmp
140
140
  self
141
141
  end
142
142
 
@@ -0,0 +1,75 @@
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 SubscriptionUsageRecord
33
+
34
+
35
+ attr_accessor :subscription_id, :unit_usage_record
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for subscription_id [type = java.util.UUID]
42
+ @subscription_id = java.util.UUID.fromString(@subscription_id.to_s) unless @subscription_id.nil?
43
+
44
+ # conversion for unit_usage_record [type = java.util.List]
45
+ tmp = java.util.ArrayList.new
46
+ (@unit_usage_record || []).each do |m|
47
+ # conversion for m [type = org.killbill.billing.usage.api.UnitUsageRecord]
48
+ m = m.to_java unless m.nil?
49
+ tmp.add(m)
50
+ end
51
+ @unit_usage_record = tmp
52
+ Java::org.killbill.billing.usage.api.SubscriptionUsageRecord.new(@subscription_id, @unit_usage_record)
53
+ end
54
+
55
+ def to_ruby(j_obj)
56
+ # conversion for subscription_id [type = java.util.UUID]
57
+ @subscription_id = j_obj.subscription_id
58
+ @subscription_id = @subscription_id.nil? ? nil : @subscription_id.to_s
59
+
60
+ # conversion for unit_usage_record [type = java.util.List]
61
+ @unit_usage_record = j_obj.unit_usage_record
62
+ tmp = []
63
+ (@unit_usage_record || []).each do |m|
64
+ # conversion for m [type = org.killbill.billing.usage.api.UnitUsageRecord]
65
+ m = Killbill::Plugin::Model::UnitUsageRecord.new.to_ruby(m) unless m.nil?
66
+ tmp << m
67
+ end
68
+ @unit_usage_record = tmp
69
+ self
70
+ end
71
+
72
+ end
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,74 @@
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 UnitUsageRecord
33
+
34
+
35
+ attr_accessor :unit_type, :daily_amount
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for unit_type [type = java.lang.String]
42
+ @unit_type = @unit_type.to_s unless @unit_type.nil?
43
+
44
+ # conversion for daily_amount [type = java.util.List]
45
+ tmp = java.util.ArrayList.new
46
+ (@daily_amount || []).each do |m|
47
+ # conversion for m [type = org.killbill.billing.usage.api.UsageRecord]
48
+ m = m.to_java unless m.nil?
49
+ tmp.add(m)
50
+ end
51
+ @daily_amount = tmp
52
+ Java::org.killbill.billing.usage.api.UnitUsageRecord.new(@unit_type, @daily_amount)
53
+ end
54
+
55
+ def to_ruby(j_obj)
56
+ # conversion for unit_type [type = java.lang.String]
57
+ @unit_type = j_obj.unit_type
58
+
59
+ # conversion for daily_amount [type = java.util.List]
60
+ @daily_amount = j_obj.daily_amount
61
+ tmp = []
62
+ (@daily_amount || []).each do |m|
63
+ # conversion for m [type = org.killbill.billing.usage.api.UsageRecord]
64
+ m = Killbill::Plugin::Model::UsageRecord.new.to_ruby(m) unless m.nil?
65
+ tmp << m
66
+ end
67
+ @daily_amount = tmp
68
+ self
69
+ end
70
+
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,66 @@
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 UsageRecord
33
+
34
+
35
+ attr_accessor :date, :amount
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for date [type = org.joda.time.LocalDate]
42
+ if !@date.nil?
43
+ @date = Java::org.joda.time.LocalDate.parse(@date.to_s)
44
+ end
45
+
46
+ # conversion for amount [type = java.lang.Long]
47
+ @amount = @amount
48
+ Java::org.killbill.billing.usage.api.UsageRecord.new(@date, @amount)
49
+ end
50
+
51
+ def to_ruby(j_obj)
52
+ # conversion for date [type = org.joda.time.LocalDate]
53
+ @date = j_obj.date
54
+ if !@date.nil?
55
+ @date = @date.to_s
56
+ end
57
+
58
+ # conversion for amount [type = java.lang.Long]
59
+ @amount = j_obj.amount
60
+ self
61
+ end
62
+
63
+ end
64
+ end
65
+ end
66
+ end