killbill 8.3.6 → 9.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +51 -0
  3. data/Gemfile.lock +4 -4
  4. data/Jarfile +11 -11
  5. data/Jarfile.lock +63 -57
  6. data/NEWS +2 -8
  7. data/README.md +1 -0
  8. data/gen_config/api.conf +2 -0
  9. data/lib/killbill/gen/api/account.rb +20 -20
  10. data/lib/killbill/gen/api/account_data.rb +15 -1
  11. data/lib/killbill/gen/api/block_price_override.rb +81 -0
  12. data/lib/killbill/gen/api/call_context.rb +8 -1
  13. data/lib/killbill/gen/api/catalog_entity.rb +7 -1
  14. data/lib/killbill/gen/api/catalog_user_api.rb +8 -0
  15. data/lib/killbill/gen/api/custom_field_user_api.rb +17 -0
  16. data/lib/killbill/gen/api/email_notification.rb +75 -0
  17. data/lib/killbill/gen/api/entitlement_api.rb +12 -6
  18. data/lib/killbill/gen/api/immutable_account_data.rb +1 -20
  19. data/lib/killbill/gen/api/invoice.rb +15 -1
  20. data/lib/killbill/gen/api/invoice_formatter.rb +15 -1
  21. data/lib/killbill/gen/api/invoice_item.rb +19 -1
  22. data/lib/killbill/gen/api/invoice_item_formatter.rb +19 -1
  23. data/lib/killbill/gen/api/migration_plan.rb +14 -1
  24. data/lib/killbill/gen/api/mutable_account_data.rb +15 -1
  25. data/lib/killbill/gen/api/mutable_static_catalog.rb +1 -8
  26. data/lib/killbill/gen/api/osgi_killbill.rb +8 -1
  27. data/lib/killbill/gen/api/overdue_api.rb +88 -0
  28. data/lib/killbill/gen/api/overdue_api_exception.rb +68 -0
  29. data/lib/killbill/gen/api/overdue_condition.rb +108 -0
  30. data/lib/killbill/gen/api/overdue_config.rb +58 -0
  31. data/lib/killbill/gen/api/overdue_state.rb +120 -0
  32. data/lib/killbill/gen/api/overdue_states_account.rb +72 -0
  33. data/lib/killbill/gen/api/payment_api.rb +192 -51
  34. data/lib/killbill/gen/api/plan.rb +14 -1
  35. data/lib/killbill/gen/api/plan_phase.rb +7 -1
  36. data/lib/killbill/gen/api/plan_phase_price_override.rb +20 -1
  37. data/lib/killbill/gen/api/price_list.rb +7 -1
  38. data/lib/killbill/gen/api/product.rb +7 -1
  39. data/lib/killbill/gen/api/require_gen.rb +131 -121
  40. data/lib/killbill/gen/api/security_api.rb +20 -0
  41. data/lib/killbill/gen/api/static_catalog.rb +1 -8
  42. data/lib/killbill/gen/api/tag_user_api.rb +12 -3
  43. data/lib/killbill/gen/api/tenant_context.rb +8 -1
  44. data/lib/killbill/gen/api/tier_price_override.rb +70 -0
  45. data/lib/killbill/gen/api/tiered_block_price_override.rb +87 -0
  46. data/lib/killbill/gen/api/unit.rb +7 -1
  47. data/lib/killbill/gen/api/usage.rb +14 -1
  48. data/lib/killbill/gen/api/usage_price_override.rb +83 -0
  49. data/lib/killbill/gen/plugin-api/catalog_plugin_api.rb +34 -0
  50. data/lib/killbill/gen/plugin-api/entitlement_context.rb +8 -8
  51. data/lib/killbill/gen/plugin-api/ext_bus_event.rb +8 -1
  52. data/lib/killbill/gen/plugin-api/invoice_payment_metadata.rb +115 -0
  53. data/lib/killbill/gen/plugin-api/invoice_plugin_api_retry_exception.rb +64 -0
  54. data/lib/killbill/gen/plugin-api/notification_plugin_api_retry_exception.rb +64 -0
  55. data/lib/killbill/gen/plugin-api/payment_control_context.rb +14 -8
  56. data/lib/killbill/gen/plugin-api/prior_payment_control_result.rb +7 -1
  57. data/lib/killbill/gen/plugin-api/require_gen.rb +15 -12
  58. data/lib/killbill/gen/plugin-api/subscription_metadata.rb +8 -2
  59. data/lib/killbill/gen/plugin-api/versioned_plugin_catalog.rb +1 -8
  60. data/lib/killbill/helpers/active_merchant/active_record/models/response.rb +6 -21
  61. data/lib/killbill/helpers/active_merchant/killbill_spec_helper.rb +1 -1
  62. data/lib/killbill/helpers/active_merchant/payment_plugin.rb +12 -12
  63. data/lib/killbill/version.rb +1 -1
  64. data/spec/killbill/helpers/response_spec.rb +0 -7
  65. data/spec/killbill/helpers/test_response.rb +0 -4
  66. data/spec/killbill/killbillapi_spec.rb +1 -0
  67. metadata +17 -4
  68. data/.circleci/config.yml +0 -138
  69. data/lib/killbill/gen/api/refund.rb +0 -151
@@ -34,12 +34,15 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.MigrationPlan
36
36
 
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, :name
37
+ attr_accessor :recurring_billing_mode, :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, :name, :pretty_name
38
38
 
39
39
  def initialize()
40
40
  end
41
41
 
42
42
  def to_java()
43
+ # conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
44
+ @recurring_billing_mode = Java::org.killbill.billing.catalog.api.BillingMode.value_of( @recurring_billing_mode.to_s ) unless @recurring_billing_mode.nil?
45
+
43
46
  # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
44
47
  tmp = []
45
48
  (@initial_phases || []).each do |m|
@@ -85,10 +88,17 @@ module Killbill
85
88
 
86
89
  # conversion for name [type = java.lang.String]
87
90
  @name = @name.to_s unless @name.nil?
91
+
92
+ # conversion for pretty_name [type = java.lang.String]
93
+ @pretty_name = @pretty_name.to_s unless @pretty_name.nil?
88
94
  self
89
95
  end
90
96
 
91
97
  def to_ruby(j_obj)
98
+ # conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
99
+ @recurring_billing_mode = j_obj.recurring_billing_mode
100
+ @recurring_billing_mode = @recurring_billing_mode.to_s.to_sym unless @recurring_billing_mode.nil?
101
+
92
102
  # conversion for initial_phases [type = org.killbill.billing.catalog.api.PlanPhase[]]
93
103
  @initial_phases = j_obj.initial_phases
94
104
  tmp = []
@@ -141,6 +151,9 @@ module Killbill
141
151
 
142
152
  # conversion for name [type = java.lang.String]
143
153
  @name = j_obj.name
154
+
155
+ # conversion for pretty_name [type = java.lang.String]
156
+ @pretty_name = j_obj.pretty_name
144
157
  self
145
158
  end
146
159
 
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.account.api.MutableAccountData
36
36
 
37
- attr_accessor :external_key, :name, :first_name_length, :email, :bill_cycle_day_local, :currency, :payment_method_id, :time_zone, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices, :parent_account_id, :is_payment_delegated_to_parent, :notes
37
+ attr_accessor :external_key, :name, :first_name_length, :email, :bill_cycle_day_local, :currency, :payment_method_id, :reference_time, :time_zone, :locale, :address1, :address2, :company_name, :city, :state_or_province, :postal_code, :country, :phone, :is_migrated, :is_notified_for_invoices, :parent_account_id, :is_payment_delegated_to_parent, :notes
38
38
 
39
39
  def initialize()
40
40
  end
@@ -61,6 +61,12 @@ module Killbill
61
61
  # conversion for payment_method_id [type = java.util.UUID]
62
62
  @payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil?
63
63
 
64
+ # conversion for reference_time [type = org.joda.time.DateTime]
65
+ if !@reference_time.nil?
66
+ @reference_time = (@reference_time.kind_of? Time) ? DateTime.parse(@reference_time.to_s) : @reference_time
67
+ @reference_time = Java::org.joda.time.DateTime.new(@reference_time.to_s, Java::org.joda.time.DateTimeZone::UTC)
68
+ end
69
+
64
70
  # conversion for time_zone [type = org.joda.time.DateTimeZone]
65
71
  if !@time_zone.nil?
66
72
  @time_zone = Java::org.joda.time.DateTimeZone.forID((@time_zone.respond_to?(:identifier) ? @time_zone.identifier : @time_zone.to_s))
@@ -134,6 +140,14 @@ module Killbill
134
140
  @payment_method_id = j_obj.payment_method_id
135
141
  @payment_method_id = @payment_method_id.nil? ? nil : @payment_method_id.to_s
136
142
 
143
+ # conversion for reference_time [type = org.joda.time.DateTime]
144
+ @reference_time = j_obj.reference_time
145
+ if !@reference_time.nil?
146
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3
147
+ str = fmt.print(@reference_time)
148
+ @reference_time = DateTime.iso8601(str)
149
+ end
150
+
137
151
  # conversion for time_zone [type = org.joda.time.DateTimeZone]
138
152
  @time_zone = j_obj.time_zone
139
153
  if !@time_zone.nil?
@@ -34,7 +34,7 @@ module Killbill
34
34
 
35
35
  include org.killbill.billing.catalog.api.MutableStaticCatalog
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
37
+ attr_accessor :catalog_name, :effective_date, :current_supported_currencies, :current_products, :current_units, :current_plans, :available_base_plan_listings
38
38
 
39
39
  def initialize()
40
40
  end
@@ -43,9 +43,6 @@ module Killbill
43
43
  # conversion for catalog_name [type = java.lang.String]
44
44
  @catalog_name = @catalog_name.to_s unless @catalog_name.nil?
45
45
 
46
- # conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
47
- @recurring_billing_mode = Java::org.killbill.billing.catalog.api.BillingMode.value_of( @recurring_billing_mode.to_s ) unless @recurring_billing_mode.nil?
48
-
49
46
  # conversion for effective_date [type = java.util.Date]
50
47
  if !@effective_date.nil?
51
48
  @effective_date = (@effective_date.kind_of? Time) ? DateTime.parse(@effective_date.to_s) : @effective_date
@@ -104,10 +101,6 @@ module Killbill
104
101
  # conversion for catalog_name [type = java.lang.String]
105
102
  @catalog_name = j_obj.catalog_name
106
103
 
107
- # conversion for recurring_billing_mode [type = org.killbill.billing.catalog.api.BillingMode]
108
- @recurring_billing_mode = j_obj.recurring_billing_mode
109
- @recurring_billing_mode = @recurring_billing_mode.to_s.to_sym unless @recurring_billing_mode.nil?
110
-
111
104
  # conversion for effective_date [type = java.util.Date]
112
105
  @effective_date = j_obj.effective_date
113
106
  if !@effective_date.nil?
@@ -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, :admin_payment_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, :overdue_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
@@ -85,6 +85,9 @@ module Killbill
85
85
  # conversion for currency_conversion_api [type = org.killbill.billing.currency.api.CurrencyConversionApi]
86
86
  @currency_conversion_api = @currency_conversion_api.to_java unless @currency_conversion_api.nil?
87
87
 
88
+ # conversion for overdue_api [type = org.killbill.billing.overdue.api.OverdueApi]
89
+ @overdue_api = @overdue_api.to_java unless @overdue_api.nil?
90
+
88
91
  # conversion for plugin_config_service_api [type = org.killbill.billing.osgi.api.config.PluginConfigServiceApi]
89
92
  @plugin_config_service_api = @plugin_config_service_api.to_java unless @plugin_config_service_api.nil?
90
93
 
@@ -163,6 +166,10 @@ module Killbill
163
166
  @currency_conversion_api = j_obj.currency_conversion_api
164
167
  @currency_conversion_api = Killbill::Plugin::Model::CurrencyConversionApi.new.to_ruby(@currency_conversion_api) unless @currency_conversion_api.nil?
165
168
 
169
+ # conversion for overdue_api [type = org.killbill.billing.overdue.api.OverdueApi]
170
+ @overdue_api = j_obj.overdue_api
171
+ @overdue_api = Killbill::Plugin::Model::OverdueApi.new.to_ruby(@overdue_api) unless @overdue_api.nil?
172
+
166
173
  # conversion for plugin_config_service_api [type = org.killbill.billing.osgi.api.config.PluginConfigServiceApi]
167
174
  @plugin_config_service_api = j_obj.plugin_config_service_api
168
175
  @plugin_config_service_api = Killbill::Plugin::Model::PluginConfigServiceApi.new.to_ruby(@plugin_config_service_api) unless @plugin_config_service_api.nil?
@@ -0,0 +1,88 @@
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 Api
31
+
32
+ java_package 'org.killbill.billing.overdue.api'
33
+ class OverdueApi
34
+
35
+ include org.killbill.billing.overdue.api.OverdueApi
36
+
37
+ def initialize(real_java_api)
38
+ @real_java_api = real_java_api
39
+ end
40
+
41
+
42
+ java_signature 'Java::org.killbill.billing.overdue.api.OverdueConfig getOverdueConfig(Java::org.killbill.billing.util.callcontext.TenantContext)'
43
+ def get_overdue_config(context)
44
+
45
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
46
+ context = context.to_java unless context.nil?
47
+ begin
48
+ res = @real_java_api.get_overdue_config(context)
49
+ # conversion for res [type = org.killbill.billing.overdue.api.OverdueConfig]
50
+ res = Killbill::Plugin::Model::OverdueConfig.new.to_ruby(res) unless res.nil?
51
+ return res
52
+ rescue Java::org.killbill.billing.overdue.api.OverdueApiException => e
53
+ raise Killbill::Plugin::Model::OverdueApiException.new.to_ruby(e)
54
+ end
55
+ end
56
+
57
+ java_signature 'Java::void uploadOverdueConfig(Java::java.lang.String, Java::org.killbill.billing.util.callcontext.CallContext)'
58
+ def upload_overdue_config(overdueXML, context)
59
+
60
+ # conversion for overdueXML [type = java.lang.String]
61
+ overdueXML = overdueXML.to_s unless overdueXML.nil?
62
+
63
+ # conversion for context [type = org.killbill.billing.util.callcontext.CallContext]
64
+ context = context.to_java unless context.nil?
65
+ @real_java_api.upload_overdue_config(overdueXML, context)
66
+ end
67
+
68
+ java_signature 'Java::org.killbill.billing.overdue.api.OverdueState getOverdueStateFor(Java::java.util.UUID, Java::org.killbill.billing.util.callcontext.TenantContext)'
69
+ def get_overdue_state_for(accountId, context)
70
+
71
+ # conversion for accountId [type = java.util.UUID]
72
+ accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
73
+
74
+ # conversion for context [type = org.killbill.billing.util.callcontext.TenantContext]
75
+ context = context.to_java unless context.nil?
76
+ begin
77
+ res = @real_java_api.get_overdue_state_for(accountId, context)
78
+ # conversion for res [type = org.killbill.billing.overdue.api.OverdueState]
79
+ res = Killbill::Plugin::Model::OverdueState.new.to_ruby(res) unless res.nil?
80
+ return res
81
+ rescue Java::org.killbill.billing.overdue.api.OverdueApiException => e
82
+ raise Killbill::Plugin::Model::OverdueApiException.new.to_ruby(e)
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,68 @@
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 OverdueApiException
33
+
34
+
35
+ attr_accessor :message, :cause, :code
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for message [type = java.lang.String]
42
+ @message = @message.to_s unless @message.nil?
43
+
44
+ # conversion for cause [type = java.lang.Throwable]
45
+ @cause = @cause.to_s unless cause.nil?
46
+
47
+ # conversion for code [type = int]
48
+ @code = @code
49
+ Java::org.killbill.billing.overdue.api.OverdueApiException.new(@message, @cause, @code)
50
+ end
51
+
52
+ def to_ruby(j_obj)
53
+ # conversion for message [type = java.lang.String]
54
+ @message = j_obj.message
55
+
56
+ # conversion for cause [type = java.lang.Throwable]
57
+ @cause = j_obj.cause
58
+ @cause = @cause.to_s unless @cause.nil?
59
+
60
+ # conversion for code [type = int]
61
+ @code = j_obj.code
62
+ self
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,108 @@
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.overdue.api'
33
+ class OverdueCondition
34
+
35
+ include org.killbill.billing.overdue.api.OverdueCondition
36
+
37
+ attr_accessor :number_of_unpaid_invoices_equals_or_exceeds, :total_unpaid_invoice_balance_equals_or_exceeds, :time_since_earliest_unpaid_invoice_equals_or_exceeds, :response_for_last_failed_payment_in, :inclusion_control_tag_type, :exclusion_control_tag_type
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for number_of_unpaid_invoices_equals_or_exceeds [type = java.lang.Integer]
44
+ @number_of_unpaid_invoices_equals_or_exceeds = @number_of_unpaid_invoices_equals_or_exceeds
45
+
46
+ # conversion for total_unpaid_invoice_balance_equals_or_exceeds [type = java.math.BigDecimal]
47
+ if @total_unpaid_invoice_balance_equals_or_exceeds.nil?
48
+ @total_unpaid_invoice_balance_equals_or_exceeds = java.math.BigDecimal::ZERO
49
+ else
50
+ @total_unpaid_invoice_balance_equals_or_exceeds = java.math.BigDecimal.new(@total_unpaid_invoice_balance_equals_or_exceeds.to_s)
51
+ end
52
+
53
+ # conversion for time_since_earliest_unpaid_invoice_equals_or_exceeds [type = org.killbill.billing.catalog.api.Duration]
54
+ @time_since_earliest_unpaid_invoice_equals_or_exceeds = @time_since_earliest_unpaid_invoice_equals_or_exceeds.to_java unless @time_since_earliest_unpaid_invoice_equals_or_exceeds.nil?
55
+
56
+ # conversion for response_for_last_failed_payment_in [type = org.killbill.billing.payment.api.PaymentResponse[]]
57
+ tmp = []
58
+ (@response_for_last_failed_payment_in || []).each do |m|
59
+ # conversion for m [type = org.killbill.billing.payment.api.PaymentResponse]
60
+ m = Java::org.killbill.billing.payment.api.PaymentResponse.value_of( m.to_s ) unless m.nil?
61
+ tmp << m
62
+ end
63
+ @response_for_last_failed_payment_in = tmp.to_java Java::org.killbill.billing.payment.api.PaymentResponse
64
+
65
+ # conversion for inclusion_control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
66
+ @inclusion_control_tag_type = Java::org.killbill.billing.util.tag.ControlTagType.value_of( @inclusion_control_tag_type.to_s ) unless @inclusion_control_tag_type.nil?
67
+
68
+ # conversion for exclusion_control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
69
+ @exclusion_control_tag_type = Java::org.killbill.billing.util.tag.ControlTagType.value_of( @exclusion_control_tag_type.to_s ) unless @exclusion_control_tag_type.nil?
70
+ self
71
+ end
72
+
73
+ def to_ruby(j_obj)
74
+ # conversion for number_of_unpaid_invoices_equals_or_exceeds [type = java.lang.Integer]
75
+ @number_of_unpaid_invoices_equals_or_exceeds = j_obj.number_of_unpaid_invoices_equals_or_exceeds
76
+
77
+ # conversion for total_unpaid_invoice_balance_equals_or_exceeds [type = java.math.BigDecimal]
78
+ @total_unpaid_invoice_balance_equals_or_exceeds = j_obj.total_unpaid_invoice_balance_equals_or_exceeds
79
+ @total_unpaid_invoice_balance_equals_or_exceeds = @total_unpaid_invoice_balance_equals_or_exceeds.nil? ? 0 : BigDecimal.new(@total_unpaid_invoice_balance_equals_or_exceeds.to_s)
80
+
81
+ # conversion for time_since_earliest_unpaid_invoice_equals_or_exceeds [type = org.killbill.billing.catalog.api.Duration]
82
+ @time_since_earliest_unpaid_invoice_equals_or_exceeds = j_obj.time_since_earliest_unpaid_invoice_equals_or_exceeds
83
+ @time_since_earliest_unpaid_invoice_equals_or_exceeds = Killbill::Plugin::Model::Duration.new.to_ruby(@time_since_earliest_unpaid_invoice_equals_or_exceeds) unless @time_since_earliest_unpaid_invoice_equals_or_exceeds.nil?
84
+
85
+ # conversion for response_for_last_failed_payment_in [type = org.killbill.billing.payment.api.PaymentResponse[]]
86
+ @response_for_last_failed_payment_in = j_obj.response_for_last_failed_payment_in
87
+ tmp = []
88
+ (@response_for_last_failed_payment_in || []).each do |m|
89
+ # conversion for m [type = org.killbill.billing.payment.api.PaymentResponse]
90
+ m = m.to_s.to_sym unless m.nil?
91
+ tmp << m
92
+ end
93
+ @response_for_last_failed_payment_in = tmp
94
+
95
+ # conversion for inclusion_control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
96
+ @inclusion_control_tag_type = j_obj.inclusion_control_tag_type
97
+ @inclusion_control_tag_type = @inclusion_control_tag_type.to_s.to_sym unless @inclusion_control_tag_type.nil?
98
+
99
+ # conversion for exclusion_control_tag_type [type = org.killbill.billing.util.tag.ControlTagType]
100
+ @exclusion_control_tag_type = j_obj.exclusion_control_tag_type
101
+ @exclusion_control_tag_type = @exclusion_control_tag_type.to_s.to_sym unless @exclusion_control_tag_type.nil?
102
+ self
103
+ end
104
+
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,58 @@
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.overdue.api'
33
+ class OverdueConfig
34
+
35
+ include org.killbill.billing.overdue.api.OverdueConfig
36
+
37
+ attr_accessor :overdue_states_account
38
+
39
+ def initialize()
40
+ end
41
+
42
+ def to_java()
43
+ # conversion for overdue_states_account [type = org.killbill.billing.overdue.api.OverdueStatesAccount]
44
+ @overdue_states_account = @overdue_states_account.to_java unless @overdue_states_account.nil?
45
+ self
46
+ end
47
+
48
+ def to_ruby(j_obj)
49
+ # conversion for overdue_states_account [type = org.killbill.billing.overdue.api.OverdueStatesAccount]
50
+ @overdue_states_account = j_obj.overdue_states_account
51
+ @overdue_states_account = Killbill::Plugin::Model::OverdueStatesAccount.new.to_ruby(@overdue_states_account) unless @overdue_states_account.nil?
52
+ self
53
+ end
54
+
55
+ end
56
+ end
57
+ end
58
+ end