killbill 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,15 +32,12 @@ module Killbill
32
32
 
33
33
  include com.ning.billing.payment.api.PaymentMethodPlugin
34
34
 
35
- attr_accessor :kb_payment_method_id, :external_payment_method_id, :is_default_payment_method, :properties, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
35
+ attr_accessor :external_payment_method_id, :is_default_payment_method, :properties, :type, :cc_name, :cc_type, :cc_expiration_month, :cc_expiration_year, :cc_last4, :address1, :address2, :city, :state, :zip, :country
36
36
 
37
37
  def initialize()
38
38
  end
39
39
 
40
40
  def to_java()
41
- # conversion for kb_payment_method_id [type = java.util.UUID]
42
- @kb_payment_method_id = java.util.UUID.fromString(@kb_payment_method_id.to_s) unless @kb_payment_method_id.nil?
43
-
44
41
  # conversion for external_payment_method_id [type = java.lang.String]
45
42
  @external_payment_method_id = @external_payment_method_id.to_s unless @external_payment_method_id.nil?
46
43
 
@@ -95,10 +92,6 @@ module Killbill
95
92
  end
96
93
 
97
94
  def to_ruby(j_obj)
98
- # conversion for kb_payment_method_id [type = java.util.UUID]
99
- @kb_payment_method_id = j_obj.kb_payment_method_id
100
- @kb_payment_method_id = @kb_payment_method_id.nil? ? nil : @kb_payment_method_id.to_s
101
-
102
95
  # conversion for external_payment_method_id [type = java.lang.String]
103
96
  @external_payment_method_id = j_obj.external_payment_method_id
104
97
 
@@ -39,8 +39,8 @@ module Killbill
39
39
  # conversion for new_price_list [type = com.ning.billing.catalog.api.PriceList]
40
40
  @new_price_list = @new_price_list.to_java unless @new_price_list.nil?
41
41
 
42
- # conversion for policy [type = com.ning.billing.catalog.api.ActionPolicy]
43
- @policy = Java::com.ning.billing.catalog.api.ActionPolicy.value_of("#{@policy.to_s}") unless @policy.nil?
42
+ # conversion for policy [type = com.ning.billing.catalog.api.BillingActionPolicy]
43
+ @policy = Java::com.ning.billing.catalog.api.BillingActionPolicy.value_of("#{@policy.to_s}") unless @policy.nil?
44
44
 
45
45
  # conversion for alignment [type = com.ning.billing.catalog.api.PlanAlignmentChange]
46
46
  @alignment = Java::com.ning.billing.catalog.api.PlanAlignmentChange.value_of("#{@alignment.to_s}") unless @alignment.nil?
@@ -52,7 +52,7 @@ module Killbill
52
52
  @new_price_list = j_obj.new_price_list
53
53
  @new_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@new_price_list) unless @new_price_list.nil?
54
54
 
55
- # conversion for policy [type = com.ning.billing.catalog.api.ActionPolicy]
55
+ # conversion for policy [type = com.ning.billing.catalog.api.BillingActionPolicy]
56
56
  @policy = j_obj.policy
57
57
  @policy = @policy.to_s.to_sym unless @policy.nil?
58
58
 
@@ -55,7 +55,16 @@ require 'killbill/gen/api/unit'
55
55
  require 'killbill/gen/api/blockable'
56
56
  require 'killbill/gen/api/blocking_api_exception'
57
57
  require 'killbill/gen/api/blocking_state'
58
+ require 'killbill/gen/api/entitlement'
59
+ require 'killbill/gen/api/entitlement_ao_status_dry_run'
58
60
  require 'killbill/gen/api/entitlement_api'
61
+ require 'killbill/gen/api/entitlement_api_exception'
62
+ require 'killbill/gen/api/subscription'
63
+ require 'killbill/gen/api/subscription_api'
64
+ require 'killbill/gen/api/subscription_api_exception'
65
+ require 'killbill/gen/api/subscription_bundle'
66
+ require 'killbill/gen/api/subscription_bundle_timeline'
67
+ require 'killbill/gen/api/subscription_event'
59
68
  require 'killbill/gen/api/invoice_formatter'
60
69
  require 'killbill/gen/api/invoice_item_formatter'
61
70
  require 'killbill/gen/api/invoice'
@@ -76,12 +85,6 @@ require 'killbill/gen/api/payment_method'
76
85
  require 'killbill/gen/api/payment_method_kv_info'
77
86
  require 'killbill/gen/api/payment_method_plugin'
78
87
  require 'killbill/gen/api/refund'
79
- require 'killbill/gen/api/subscription'
80
- require 'killbill/gen/api/subscription_bundle'
81
- require 'killbill/gen/api/subscription_status_dry_run'
82
- require 'killbill/gen/api/subscription_transition'
83
- require 'killbill/gen/api/subscription_user_api'
84
- require 'killbill/gen/api/subscription_user_api_exception'
85
88
  require 'killbill/gen/api/tenant'
86
89
  require 'killbill/gen/api/tenant_api_exception'
87
90
  require 'killbill/gen/api/tenant_data'
@@ -27,23 +27,75 @@ module Killbill
27
27
  module Plugin
28
28
  module Model
29
29
 
30
- java_package 'com.ning.billing.subscription.api.user'
30
+ java_package 'com.ning.billing.entitlement.api'
31
31
  class Subscription
32
32
 
33
- include com.ning.billing.subscription.api.user.Subscription
33
+ include com.ning.billing.entitlement.api.Subscription
34
34
 
35
- attr_accessor :id, :blocking_state, :created_date, :updated_date, :bundle_id, :state, :source_type, :start_date, :end_date, :future_end_date, :current_plan, :last_active_plan, :current_price_list, :current_phase, :last_active_product_name, :last_active_price_list_name, :last_active_category_name, :last_active_billing_period, :charged_through_date, :paid_through_date, :category, :pending_transition, :previous_transition, :all_transitions
35
+ attr_accessor :base_entitlement_id, :bundle_id, :account_id, :external_key, :state, :source_type, :effective_start_date, :effective_end_date, :product, :plan, :price_list, :current_phase, :product_category, :last_active_product, :last_active_plan, :last_active_price_list, :last_active_product_category, :id, :created_date, :updated_date, :billing_start_date, :billing_end_date, :charged_through_date, :bcd, :current_state_for_service
36
36
 
37
37
  def initialize()
38
38
  end
39
39
 
40
40
  def to_java()
41
+ # conversion for base_entitlement_id [type = java.util.UUID]
42
+ @base_entitlement_id = java.util.UUID.fromString(@base_entitlement_id.to_s) unless @base_entitlement_id.nil?
43
+
44
+ # conversion for bundle_id [type = java.util.UUID]
45
+ @bundle_id = java.util.UUID.fromString(@bundle_id.to_s) unless @bundle_id.nil?
46
+
47
+ # conversion for account_id [type = java.util.UUID]
48
+ @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
49
+
50
+ # conversion for external_key [type = java.lang.String]
51
+ @external_key = @external_key.to_s unless @external_key.nil?
52
+
53
+ # conversion for state [type = com.ning.billing.entitlement.api.EntitlementState]
54
+ @state = Java::com.ning.billing.entitlement.api.EntitlementState.value_of("#{@state.to_s}") unless @state.nil?
55
+
56
+ # conversion for source_type [type = com.ning.billing.entitlement.api.EntitlementSourceType]
57
+ @source_type = Java::com.ning.billing.entitlement.api.EntitlementSourceType.value_of("#{@source_type.to_s}") unless @source_type.nil?
58
+
59
+ # conversion for effective_start_date [type = org.joda.time.LocalDate]
60
+ if !@effective_start_date.nil?
61
+ @effective_start_date = Java::org.joda.time.LocalDate.parse(@effective_start_date.to_s)
62
+ end
63
+
64
+ # conversion for effective_end_date [type = org.joda.time.LocalDate]
65
+ if !@effective_end_date.nil?
66
+ @effective_end_date = Java::org.joda.time.LocalDate.parse(@effective_end_date.to_s)
67
+ end
68
+
69
+ # conversion for product [type = com.ning.billing.catalog.api.Product]
70
+ @product = @product.to_java unless @product.nil?
71
+
72
+ # conversion for plan [type = com.ning.billing.catalog.api.Plan]
73
+ @plan = @plan.to_java unless @plan.nil?
74
+
75
+ # conversion for price_list [type = com.ning.billing.catalog.api.PriceList]
76
+ @price_list = @price_list.to_java unless @price_list.nil?
77
+
78
+ # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
79
+ @current_phase = @current_phase.to_java unless @current_phase.nil?
80
+
81
+ # conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
82
+ @product_category = Java::com.ning.billing.catalog.api.ProductCategory.value_of("#{@product_category.to_s}") unless @product_category.nil?
83
+
84
+ # conversion for last_active_product [type = com.ning.billing.catalog.api.Product]
85
+ @last_active_product = @last_active_product.to_java unless @last_active_product.nil?
86
+
87
+ # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
88
+ @last_active_plan = @last_active_plan.to_java unless @last_active_plan.nil?
89
+
90
+ # conversion for last_active_price_list [type = com.ning.billing.catalog.api.PriceList]
91
+ @last_active_price_list = @last_active_price_list.to_java unless @last_active_price_list.nil?
92
+
93
+ # conversion for last_active_product_category [type = com.ning.billing.catalog.api.ProductCategory]
94
+ @last_active_product_category = Java::com.ning.billing.catalog.api.ProductCategory.value_of("#{@last_active_product_category.to_s}") unless @last_active_product_category.nil?
95
+
41
96
  # conversion for id [type = java.util.UUID]
42
97
  @id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
43
98
 
44
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
45
- @blocking_state = @blocking_state.to_java unless @blocking_state.nil?
46
-
47
99
  # conversion for created_date [type = org.joda.time.DateTime]
48
100
  if !@created_date.nil?
49
101
  @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
@@ -56,98 +108,105 @@ module Killbill
56
108
  @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
57
109
  end
58
110
 
59
- # conversion for bundle_id [type = java.util.UUID]
60
- @bundle_id = java.util.UUID.fromString(@bundle_id.to_s) unless @bundle_id.nil?
61
-
62
- # conversion for state [type = com.ning.billing.subscription.api.user.SubscriptionState]
63
- @state = Java::com.ning.billing.subscription.api.user.SubscriptionState.value_of("#{@state.to_s}") unless @state.nil?
64
-
65
- # conversion for source_type [type = com.ning.billing.subscription.api.user.SubscriptionSourceType]
66
- @source_type = Java::com.ning.billing.subscription.api.user.SubscriptionSourceType.value_of("#{@source_type.to_s}") unless @source_type.nil?
67
-
68
- # conversion for start_date [type = org.joda.time.DateTime]
69
- if !@start_date.nil?
70
- @start_date = (@start_date.kind_of? Time) ? DateTime.parse(@start_date.to_s) : @start_date
71
- @start_date = Java::org.joda.time.DateTime.new(@start_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
111
+ # conversion for billing_start_date [type = org.joda.time.LocalDate]
112
+ if !@billing_start_date.nil?
113
+ @billing_start_date = Java::org.joda.time.LocalDate.parse(@billing_start_date.to_s)
72
114
  end
73
115
 
74
- # conversion for end_date [type = org.joda.time.DateTime]
75
- if !@end_date.nil?
76
- @end_date = (@end_date.kind_of? Time) ? DateTime.parse(@end_date.to_s) : @end_date
77
- @end_date = Java::org.joda.time.DateTime.new(@end_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
116
+ # conversion for billing_end_date [type = org.joda.time.LocalDate]
117
+ if !@billing_end_date.nil?
118
+ @billing_end_date = Java::org.joda.time.LocalDate.parse(@billing_end_date.to_s)
78
119
  end
79
120
 
80
- # conversion for future_end_date [type = org.joda.time.DateTime]
81
- if !@future_end_date.nil?
82
- @future_end_date = (@future_end_date.kind_of? Time) ? DateTime.parse(@future_end_date.to_s) : @future_end_date
83
- @future_end_date = Java::org.joda.time.DateTime.new(@future_end_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
121
+ # conversion for charged_through_date [type = org.joda.time.LocalDate]
122
+ if !@charged_through_date.nil?
123
+ @charged_through_date = Java::org.joda.time.LocalDate.parse(@charged_through_date.to_s)
84
124
  end
85
125
 
86
- # conversion for current_plan [type = com.ning.billing.catalog.api.Plan]
87
- @current_plan = @current_plan.to_java unless @current_plan.nil?
126
+ # conversion for bcd [type = int]
127
+ @bcd = @bcd
88
128
 
89
- # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
90
- @last_active_plan = @last_active_plan.to_java unless @last_active_plan.nil?
129
+ # conversion for current_state_for_service [type = java.lang.String]
130
+ @current_state_for_service = @current_state_for_service.to_s unless @current_state_for_service.nil?
131
+ self
132
+ end
91
133
 
92
- # conversion for current_price_list [type = com.ning.billing.catalog.api.PriceList]
93
- @current_price_list = @current_price_list.to_java unless @current_price_list.nil?
134
+ def to_ruby(j_obj)
135
+ # conversion for base_entitlement_id [type = java.util.UUID]
136
+ @base_entitlement_id = j_obj.base_entitlement_id
137
+ @base_entitlement_id = @base_entitlement_id.nil? ? nil : @base_entitlement_id.to_s
94
138
 
95
- # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
96
- @current_phase = @current_phase.to_java unless @current_phase.nil?
139
+ # conversion for bundle_id [type = java.util.UUID]
140
+ @bundle_id = j_obj.bundle_id
141
+ @bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s
97
142
 
98
- # conversion for last_active_product_name [type = java.lang.String]
99
- @last_active_product_name = @last_active_product_name.to_s unless @last_active_product_name.nil?
143
+ # conversion for account_id [type = java.util.UUID]
144
+ @account_id = j_obj.account_id
145
+ @account_id = @account_id.nil? ? nil : @account_id.to_s
100
146
 
101
- # conversion for last_active_price_list_name [type = java.lang.String]
102
- @last_active_price_list_name = @last_active_price_list_name.to_s unless @last_active_price_list_name.nil?
147
+ # conversion for external_key [type = java.lang.String]
148
+ @external_key = j_obj.external_key
103
149
 
104
- # conversion for last_active_category_name [type = java.lang.String]
105
- @last_active_category_name = @last_active_category_name.to_s unless @last_active_category_name.nil?
150
+ # conversion for state [type = com.ning.billing.entitlement.api.EntitlementState]
151
+ @state = j_obj.state
152
+ @state = @state.to_s.to_sym unless @state.nil?
106
153
 
107
- # conversion for last_active_billing_period [type = java.lang.String]
108
- @last_active_billing_period = @last_active_billing_period.to_s unless @last_active_billing_period.nil?
154
+ # conversion for source_type [type = com.ning.billing.entitlement.api.EntitlementSourceType]
155
+ @source_type = j_obj.source_type
156
+ @source_type = @source_type.to_s.to_sym unless @source_type.nil?
109
157
 
110
- # conversion for charged_through_date [type = org.joda.time.DateTime]
111
- if !@charged_through_date.nil?
112
- @charged_through_date = (@charged_through_date.kind_of? Time) ? DateTime.parse(@charged_through_date.to_s) : @charged_through_date
113
- @charged_through_date = Java::org.joda.time.DateTime.new(@charged_through_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
158
+ # conversion for effective_start_date [type = org.joda.time.LocalDate]
159
+ @effective_start_date = j_obj.effective_start_date
160
+ if !@effective_start_date.nil?
161
+ @effective_start_date = @effective_start_date.to_s
114
162
  end
115
163
 
116
- # conversion for paid_through_date [type = org.joda.time.DateTime]
117
- if !@paid_through_date.nil?
118
- @paid_through_date = (@paid_through_date.kind_of? Time) ? DateTime.parse(@paid_through_date.to_s) : @paid_through_date
119
- @paid_through_date = Java::org.joda.time.DateTime.new(@paid_through_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
164
+ # conversion for effective_end_date [type = org.joda.time.LocalDate]
165
+ @effective_end_date = j_obj.effective_end_date
166
+ if !@effective_end_date.nil?
167
+ @effective_end_date = @effective_end_date.to_s
120
168
  end
121
169
 
122
- # conversion for category [type = com.ning.billing.catalog.api.ProductCategory]
123
- @category = Java::com.ning.billing.catalog.api.ProductCategory.value_of("#{@category.to_s}") unless @category.nil?
170
+ # conversion for product [type = com.ning.billing.catalog.api.Product]
171
+ @product = j_obj.product
172
+ @product = Killbill::Plugin::Model::Product.new.to_ruby(@product) unless @product.nil?
124
173
 
125
- # conversion for pending_transition [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
126
- @pending_transition = @pending_transition.to_java unless @pending_transition.nil?
174
+ # conversion for plan [type = com.ning.billing.catalog.api.Plan]
175
+ @plan = j_obj.plan
176
+ @plan = Killbill::Plugin::Model::Plan.new.to_ruby(@plan) unless @plan.nil?
127
177
 
128
- # conversion for previous_transition [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
129
- @previous_transition = @previous_transition.to_java unless @previous_transition.nil?
178
+ # conversion for price_list [type = com.ning.billing.catalog.api.PriceList]
179
+ @price_list = j_obj.price_list
180
+ @price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@price_list) unless @price_list.nil?
130
181
 
131
- # conversion for all_transitions [type = java.util.List]
132
- tmp = java.util.ArrayList.new
133
- (@all_transitions || []).each do |m|
134
- # conversion for m [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
135
- m = m.to_java unless m.nil?
136
- tmp.add(m)
137
- end
138
- @all_transitions = tmp
139
- self
140
- end
182
+ # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
183
+ @current_phase = j_obj.current_phase
184
+ @current_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@current_phase) unless @current_phase.nil?
185
+
186
+ # conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
187
+ @product_category = j_obj.product_category
188
+ @product_category = @product_category.to_s.to_sym unless @product_category.nil?
189
+
190
+ # conversion for last_active_product [type = com.ning.billing.catalog.api.Product]
191
+ @last_active_product = j_obj.last_active_product
192
+ @last_active_product = Killbill::Plugin::Model::Product.new.to_ruby(@last_active_product) unless @last_active_product.nil?
193
+
194
+ # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
195
+ @last_active_plan = j_obj.last_active_plan
196
+ @last_active_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@last_active_plan) unless @last_active_plan.nil?
197
+
198
+ # conversion for last_active_price_list [type = com.ning.billing.catalog.api.PriceList]
199
+ @last_active_price_list = j_obj.last_active_price_list
200
+ @last_active_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@last_active_price_list) unless @last_active_price_list.nil?
201
+
202
+ # conversion for last_active_product_category [type = com.ning.billing.catalog.api.ProductCategory]
203
+ @last_active_product_category = j_obj.last_active_product_category
204
+ @last_active_product_category = @last_active_product_category.to_s.to_sym unless @last_active_product_category.nil?
141
205
 
142
- def to_ruby(j_obj)
143
206
  # conversion for id [type = java.util.UUID]
144
207
  @id = j_obj.id
145
208
  @id = @id.nil? ? nil : @id.to_s
146
209
 
147
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
148
- @blocking_state = j_obj.blocking_state
149
- @blocking_state = Killbill::Plugin::Model::BlockingState.new.to_ruby(@blocking_state) unless @blocking_state.nil?
150
-
151
210
  # conversion for created_date [type = org.joda.time.DateTime]
152
211
  @created_date = j_obj.created_date
153
212
  if !@created_date.nil?
@@ -164,107 +223,29 @@ module Killbill
164
223
  @updated_date = DateTime.iso8601(str)
165
224
  end
166
225
 
167
- # conversion for bundle_id [type = java.util.UUID]
168
- @bundle_id = j_obj.bundle_id
169
- @bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s
170
-
171
- # conversion for state [type = com.ning.billing.subscription.api.user.SubscriptionState]
172
- @state = j_obj.state
173
- @state = @state.to_s.to_sym unless @state.nil?
174
-
175
- # conversion for source_type [type = com.ning.billing.subscription.api.user.SubscriptionSourceType]
176
- @source_type = j_obj.source_type
177
- @source_type = @source_type.to_s.to_sym unless @source_type.nil?
178
-
179
- # conversion for start_date [type = org.joda.time.DateTime]
180
- @start_date = j_obj.start_date
181
- if !@start_date.nil?
182
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
183
- str = fmt.print(@start_date)
184
- @start_date = DateTime.iso8601(str)
185
- end
186
-
187
- # conversion for end_date [type = org.joda.time.DateTime]
188
- @end_date = j_obj.end_date
189
- if !@end_date.nil?
190
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
191
- str = fmt.print(@end_date)
192
- @end_date = DateTime.iso8601(str)
226
+ # conversion for billing_start_date [type = org.joda.time.LocalDate]
227
+ @billing_start_date = j_obj.billing_start_date
228
+ if !@billing_start_date.nil?
229
+ @billing_start_date = @billing_start_date.to_s
193
230
  end
194
231
 
195
- # conversion for future_end_date [type = org.joda.time.DateTime]
196
- @future_end_date = j_obj.future_end_date
197
- if !@future_end_date.nil?
198
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
199
- str = fmt.print(@future_end_date)
200
- @future_end_date = DateTime.iso8601(str)
232
+ # conversion for billing_end_date [type = org.joda.time.LocalDate]
233
+ @billing_end_date = j_obj.billing_end_date
234
+ if !@billing_end_date.nil?
235
+ @billing_end_date = @billing_end_date.to_s
201
236
  end
202
237
 
203
- # conversion for current_plan [type = com.ning.billing.catalog.api.Plan]
204
- @current_plan = j_obj.current_plan
205
- @current_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@current_plan) unless @current_plan.nil?
206
-
207
- # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
208
- @last_active_plan = j_obj.last_active_plan
209
- @last_active_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@last_active_plan) unless @last_active_plan.nil?
210
-
211
- # conversion for current_price_list [type = com.ning.billing.catalog.api.PriceList]
212
- @current_price_list = j_obj.current_price_list
213
- @current_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@current_price_list) unless @current_price_list.nil?
214
-
215
- # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
216
- @current_phase = j_obj.current_phase
217
- @current_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@current_phase) unless @current_phase.nil?
218
-
219
- # conversion for last_active_product_name [type = java.lang.String]
220
- @last_active_product_name = j_obj.last_active_product_name
221
-
222
- # conversion for last_active_price_list_name [type = java.lang.String]
223
- @last_active_price_list_name = j_obj.last_active_price_list_name
224
-
225
- # conversion for last_active_category_name [type = java.lang.String]
226
- @last_active_category_name = j_obj.last_active_category_name
227
-
228
- # conversion for last_active_billing_period [type = java.lang.String]
229
- @last_active_billing_period = j_obj.last_active_billing_period
230
-
231
- # conversion for charged_through_date [type = org.joda.time.DateTime]
238
+ # conversion for charged_through_date [type = org.joda.time.LocalDate]
232
239
  @charged_through_date = j_obj.charged_through_date
233
240
  if !@charged_through_date.nil?
234
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
235
- str = fmt.print(@charged_through_date)
236
- @charged_through_date = DateTime.iso8601(str)
241
+ @charged_through_date = @charged_through_date.to_s
237
242
  end
238
243
 
239
- # conversion for paid_through_date [type = org.joda.time.DateTime]
240
- @paid_through_date = j_obj.paid_through_date
241
- if !@paid_through_date.nil?
242
- fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
243
- str = fmt.print(@paid_through_date)
244
- @paid_through_date = DateTime.iso8601(str)
245
- end
244
+ # conversion for bcd [type = int]
245
+ @bcd = j_obj.bcd
246
246
 
247
- # conversion for category [type = com.ning.billing.catalog.api.ProductCategory]
248
- @category = j_obj.category
249
- @category = @category.to_s.to_sym unless @category.nil?
250
-
251
- # conversion for pending_transition [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
252
- @pending_transition = j_obj.pending_transition
253
- @pending_transition = Killbill::Plugin::Model::SubscriptionTransition.new.to_ruby(@pending_transition) unless @pending_transition.nil?
254
-
255
- # conversion for previous_transition [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
256
- @previous_transition = j_obj.previous_transition
257
- @previous_transition = Killbill::Plugin::Model::SubscriptionTransition.new.to_ruby(@previous_transition) unless @previous_transition.nil?
258
-
259
- # conversion for all_transitions [type = java.util.List]
260
- @all_transitions = j_obj.all_transitions
261
- tmp = []
262
- (@all_transitions || []).each do |m|
263
- # conversion for m [type = com.ning.billing.subscription.api.user.SubscriptionTransition]
264
- m = Killbill::Plugin::Model::SubscriptionTransition.new.to_ruby(m) unless m.nil?
265
- tmp << m
266
- end
267
- @all_transitions = tmp
247
+ # conversion for current_state_for_service [type = java.lang.String]
248
+ @current_state_for_service = j_obj.current_state_for_service
268
249
  self
269
250
  end
270
251