killbill 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,147 @@
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.entitlement.api'
31
+ class SubscriptionApi
32
+
33
+ include com.ning.billing.entitlement.api.SubscriptionApi
34
+
35
+ def initialize(real_java_api)
36
+ @real_java_api = real_java_api
37
+ end
38
+
39
+
40
+ java_signature 'Java::com.ning.billing.entitlement.api.Subscription getSubscriptionForEntitlementId(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
41
+ def get_subscription_for_entitlement_id(entitlementId, context)
42
+
43
+ # conversion for entitlementId [type = java.util.UUID]
44
+ entitlementId = java.util.UUID.fromString(entitlementId.to_s) unless entitlementId.nil?
45
+
46
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
47
+ context = context.to_java unless context.nil?
48
+ begin
49
+ res = @real_java_api.get_subscription_for_entitlement_id(entitlementId, context)
50
+ # conversion for res [type = com.ning.billing.entitlement.api.Subscription]
51
+ res = Killbill::Plugin::Model::Subscription.new.to_ruby(res) unless res.nil?
52
+ return res
53
+ rescue Java::com.ning.billing.entitlement.api.SubscriptionApiException => e
54
+ raise Killbill::Plugin::Model::SubscriptionApiException.new.to_ruby(e)
55
+ end
56
+ end
57
+
58
+ java_signature 'Java::com.ning.billing.entitlement.api.SubscriptionBundle getSubscriptionBundle(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
59
+ def get_subscription_bundle(bundleId, context)
60
+
61
+ # conversion for bundleId [type = java.util.UUID]
62
+ bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
63
+
64
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
65
+ context = context.to_java unless context.nil?
66
+ begin
67
+ res = @real_java_api.get_subscription_bundle(bundleId, context)
68
+ # conversion for res [type = com.ning.billing.entitlement.api.SubscriptionBundle]
69
+ res = Killbill::Plugin::Model::SubscriptionBundle.new.to_ruby(res) unless res.nil?
70
+ return res
71
+ rescue Java::com.ning.billing.entitlement.api.SubscriptionApiException => e
72
+ raise Killbill::Plugin::Model::SubscriptionApiException.new.to_ruby(e)
73
+ end
74
+ end
75
+
76
+ java_signature 'Java::com.ning.billing.entitlement.api.SubscriptionBundle getSubscriptionBundleForAccountIdAndExternalKey(Java::java.util.UUID, Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
77
+ def get_subscription_bundle_for_account_id_and_external_key(accountId, externalKey, context)
78
+
79
+ # conversion for accountId [type = java.util.UUID]
80
+ accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
81
+
82
+ # conversion for externalKey [type = java.lang.String]
83
+ externalKey = externalKey.to_s unless externalKey.nil?
84
+
85
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
86
+ context = context.to_java unless context.nil?
87
+ begin
88
+ res = @real_java_api.get_subscription_bundle_for_account_id_and_external_key(accountId, externalKey, context)
89
+ # conversion for res [type = com.ning.billing.entitlement.api.SubscriptionBundle]
90
+ res = Killbill::Plugin::Model::SubscriptionBundle.new.to_ruby(res) unless res.nil?
91
+ return res
92
+ rescue Java::com.ning.billing.entitlement.api.SubscriptionApiException => e
93
+ raise Killbill::Plugin::Model::SubscriptionApiException.new.to_ruby(e)
94
+ end
95
+ end
96
+
97
+ java_signature 'Java::java.util.List getSubscriptionBundlesForExternalKey(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
98
+ def get_subscription_bundles_for_external_key(externalKey, context)
99
+
100
+ # conversion for externalKey [type = java.lang.String]
101
+ externalKey = externalKey.to_s unless externalKey.nil?
102
+
103
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
104
+ context = context.to_java unless context.nil?
105
+ begin
106
+ res = @real_java_api.get_subscription_bundles_for_external_key(externalKey, context)
107
+ # conversion for res [type = java.util.List]
108
+ tmp = []
109
+ (res || []).each do |m|
110
+ # conversion for m [type = com.ning.billing.entitlement.api.SubscriptionBundle]
111
+ m = Killbill::Plugin::Model::SubscriptionBundle.new.to_ruby(m) unless m.nil?
112
+ tmp << m
113
+ end
114
+ res = tmp
115
+ return res
116
+ rescue Java::com.ning.billing.entitlement.api.SubscriptionApiException => e
117
+ raise Killbill::Plugin::Model::SubscriptionApiException.new.to_ruby(e)
118
+ end
119
+ end
120
+
121
+ java_signature 'Java::java.util.List getSubscriptionBundlesForAccountId(Java::java.util.UUID, Java::com.ning.billing.util.callcontext.TenantContext)'
122
+ def get_subscription_bundles_for_account_id(accountId, context)
123
+
124
+ # conversion for accountId [type = java.util.UUID]
125
+ accountId = java.util.UUID.fromString(accountId.to_s) unless accountId.nil?
126
+
127
+ # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
128
+ context = context.to_java unless context.nil?
129
+ begin
130
+ res = @real_java_api.get_subscription_bundles_for_account_id(accountId, context)
131
+ # conversion for res [type = java.util.List]
132
+ tmp = []
133
+ (res || []).each do |m|
134
+ # conversion for m [type = com.ning.billing.entitlement.api.SubscriptionBundle]
135
+ m = Killbill::Plugin::Model::SubscriptionBundle.new.to_ruby(m) unless m.nil?
136
+ tmp << m
137
+ end
138
+ res = tmp
139
+ return res
140
+ rescue Java::com.ning.billing.entitlement.api.SubscriptionApiException => e
141
+ raise Killbill::Plugin::Model::SubscriptionApiException.new.to_ruby(e)
142
+ end
143
+ end
144
+ end
145
+ end
146
+ end
147
+ 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 Model
29
+
30
+ class SubscriptionApiException
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.entitlement.api.SubscriptionApiException.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
@@ -27,12 +27,12 @@ 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 SubscriptionBundle
32
32
 
33
- include com.ning.billing.subscription.api.user.SubscriptionBundle
33
+ include com.ning.billing.entitlement.api.SubscriptionBundle
34
34
 
35
- attr_accessor :id, :created_date, :updated_date, :blocking_state, :account_id, :external_key, :overdue_state
35
+ attr_accessor :id, :created_date, :updated_date, :account_id, :external_key, :subscriptions, :timeline
36
36
 
37
37
  def initialize()
38
38
  end
@@ -53,17 +53,23 @@ module Killbill
53
53
  @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
54
54
  end
55
55
 
56
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
57
- @blocking_state = @blocking_state.to_java unless @blocking_state.nil?
58
-
59
56
  # conversion for account_id [type = java.util.UUID]
60
57
  @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
61
58
 
62
59
  # conversion for external_key [type = java.lang.String]
63
60
  @external_key = @external_key.to_s unless @external_key.nil?
64
61
 
65
- # conversion for overdue_state [type = com.ning.billing.overdue.OverdueState]
66
- @overdue_state = @overdue_state.to_java unless @overdue_state.nil?
62
+ # conversion for subscriptions [type = java.util.List]
63
+ tmp = java.util.ArrayList.new
64
+ (@subscriptions || []).each do |m|
65
+ # conversion for m [type = com.ning.billing.entitlement.api.Subscription]
66
+ m = m.to_java unless m.nil?
67
+ tmp.add(m)
68
+ end
69
+ @subscriptions = tmp
70
+
71
+ # conversion for timeline [type = com.ning.billing.entitlement.api.SubscriptionBundleTimeline]
72
+ @timeline = @timeline.to_java unless @timeline.nil?
67
73
  self
68
74
  end
69
75
 
@@ -88,10 +94,6 @@ module Killbill
88
94
  @updated_date = DateTime.iso8601(str)
89
95
  end
90
96
 
91
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
92
- @blocking_state = j_obj.blocking_state
93
- @blocking_state = Killbill::Plugin::Model::BlockingState.new.to_ruby(@blocking_state) unless @blocking_state.nil?
94
-
95
97
  # conversion for account_id [type = java.util.UUID]
96
98
  @account_id = j_obj.account_id
97
99
  @account_id = @account_id.nil? ? nil : @account_id.to_s
@@ -99,9 +101,19 @@ module Killbill
99
101
  # conversion for external_key [type = java.lang.String]
100
102
  @external_key = j_obj.external_key
101
103
 
102
- # conversion for overdue_state [type = com.ning.billing.overdue.OverdueState]
103
- @overdue_state = j_obj.overdue_state
104
- @overdue_state = Killbill::Plugin::Model::OverdueState.new.to_ruby(@overdue_state) unless @overdue_state.nil?
104
+ # conversion for subscriptions [type = java.util.List]
105
+ @subscriptions = j_obj.subscriptions
106
+ tmp = []
107
+ (@subscriptions || []).each do |m|
108
+ # conversion for m [type = com.ning.billing.entitlement.api.Subscription]
109
+ m = Killbill::Plugin::Model::Subscription.new.to_ruby(m) unless m.nil?
110
+ tmp << m
111
+ end
112
+ @subscriptions = tmp
113
+
114
+ # conversion for timeline [type = com.ning.billing.entitlement.api.SubscriptionBundleTimeline]
115
+ @timeline = j_obj.timeline
116
+ @timeline = Killbill::Plugin::Model::SubscriptionBundleTimeline.new.to_ruby(@timeline) unless @timeline.nil?
105
117
  self
106
118
  end
107
119
 
@@ -0,0 +1,88 @@
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.entitlement.api'
31
+ class SubscriptionBundleTimeline
32
+
33
+ include com.ning.billing.entitlement.api.SubscriptionBundleTimeline
34
+
35
+ attr_accessor :account_id, :bundle_id, :external_key, :subscription_events
36
+
37
+ def initialize()
38
+ end
39
+
40
+ def to_java()
41
+ # conversion for account_id [type = java.util.UUID]
42
+ @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_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 external_key [type = java.lang.String]
48
+ @external_key = @external_key.to_s unless @external_key.nil?
49
+
50
+ # conversion for subscription_events [type = java.util.List]
51
+ tmp = java.util.ArrayList.new
52
+ (@subscription_events || []).each do |m|
53
+ # conversion for m [type = com.ning.billing.entitlement.api.SubscriptionEvent]
54
+ m = m.to_java unless m.nil?
55
+ tmp.add(m)
56
+ end
57
+ @subscription_events = tmp
58
+ self
59
+ end
60
+
61
+ def to_ruby(j_obj)
62
+ # conversion for account_id [type = java.util.UUID]
63
+ @account_id = j_obj.account_id
64
+ @account_id = @account_id.nil? ? nil : @account_id.to_s
65
+
66
+ # conversion for bundle_id [type = java.util.UUID]
67
+ @bundle_id = j_obj.bundle_id
68
+ @bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s
69
+
70
+ # conversion for external_key [type = java.lang.String]
71
+ @external_key = j_obj.external_key
72
+
73
+ # conversion for subscription_events [type = java.util.List]
74
+ @subscription_events = j_obj.subscription_events
75
+ tmp = []
76
+ (@subscription_events || []).each do |m|
77
+ # conversion for m [type = com.ning.billing.entitlement.api.SubscriptionEvent]
78
+ m = Killbill::Plugin::Model::SubscriptionEvent.new.to_ruby(m) unless m.nil?
79
+ tmp << m
80
+ end
81
+ @subscription_events = tmp
82
+ self
83
+ end
84
+
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,198 @@
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.entitlement.api'
31
+ class SubscriptionEvent
32
+
33
+ include com.ning.billing.entitlement.api.SubscriptionEvent
34
+
35
+ attr_accessor :id, :entitlement_id, :effective_date, :requested_date, :subscription_event_type, :is_blocked_billing, :is_blocked_entitlement, :service_name, :service_state_name, :prev_product, :prev_plan, :prev_phase, :prev_price_list, :prev_billing_period, :next_product, :next_plan, :next_phase, :next_price_list, :next_billing_period
36
+
37
+ def initialize()
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 entitlement_id [type = java.util.UUID]
45
+ @entitlement_id = java.util.UUID.fromString(@entitlement_id.to_s) unless @entitlement_id.nil?
46
+
47
+ # conversion for effective_date [type = org.joda.time.LocalDate]
48
+ if !@effective_date.nil?
49
+ @effective_date = Java::org.joda.time.LocalDate.parse(@effective_date.to_s)
50
+ end
51
+
52
+ # conversion for requested_date [type = org.joda.time.LocalDate]
53
+ if !@requested_date.nil?
54
+ @requested_date = Java::org.joda.time.LocalDate.parse(@requested_date.to_s)
55
+ end
56
+
57
+ # conversion for subscription_event_type [type = com.ning.billing.entitlement.api.SubscriptionEventType]
58
+ @subscription_event_type = Java::com.ning.billing.entitlement.api.SubscriptionEventType.value_of("#{@subscription_event_type.to_s}") unless @subscription_event_type.nil?
59
+
60
+ # conversion for is_blocked_billing [type = boolean]
61
+ @is_blocked_billing = @is_blocked_billing.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_blocked_billing)
62
+
63
+ # conversion for is_blocked_entitlement [type = boolean]
64
+ @is_blocked_entitlement = @is_blocked_entitlement.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_blocked_entitlement)
65
+
66
+ # conversion for service_name [type = java.lang.String]
67
+ @service_name = @service_name.to_s unless @service_name.nil?
68
+
69
+ # conversion for service_state_name [type = java.lang.String]
70
+ @service_state_name = @service_state_name.to_s unless @service_state_name.nil?
71
+
72
+ # conversion for prev_product [type = com.ning.billing.catalog.api.Product]
73
+ @prev_product = @prev_product.to_java unless @prev_product.nil?
74
+
75
+ # conversion for prev_plan [type = com.ning.billing.catalog.api.Plan]
76
+ @prev_plan = @prev_plan.to_java unless @prev_plan.nil?
77
+
78
+ # conversion for prev_phase [type = com.ning.billing.catalog.api.PlanPhase]
79
+ @prev_phase = @prev_phase.to_java unless @prev_phase.nil?
80
+
81
+ # conversion for prev_price_list [type = com.ning.billing.catalog.api.PriceList]
82
+ @prev_price_list = @prev_price_list.to_java unless @prev_price_list.nil?
83
+
84
+ # conversion for prev_billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
85
+ @prev_billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@prev_billing_period.to_s}") unless @prev_billing_period.nil?
86
+
87
+ # conversion for next_product [type = com.ning.billing.catalog.api.Product]
88
+ @next_product = @next_product.to_java unless @next_product.nil?
89
+
90
+ # conversion for next_plan [type = com.ning.billing.catalog.api.Plan]
91
+ @next_plan = @next_plan.to_java unless @next_plan.nil?
92
+
93
+ # conversion for next_phase [type = com.ning.billing.catalog.api.PlanPhase]
94
+ @next_phase = @next_phase.to_java unless @next_phase.nil?
95
+
96
+ # conversion for next_price_list [type = com.ning.billing.catalog.api.PriceList]
97
+ @next_price_list = @next_price_list.to_java unless @next_price_list.nil?
98
+
99
+ # conversion for next_billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
100
+ @next_billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@next_billing_period.to_s}") unless @next_billing_period.nil?
101
+ self
102
+ end
103
+
104
+ def to_ruby(j_obj)
105
+ # conversion for id [type = java.util.UUID]
106
+ @id = j_obj.id
107
+ @id = @id.nil? ? nil : @id.to_s
108
+
109
+ # conversion for entitlement_id [type = java.util.UUID]
110
+ @entitlement_id = j_obj.entitlement_id
111
+ @entitlement_id = @entitlement_id.nil? ? nil : @entitlement_id.to_s
112
+
113
+ # conversion for effective_date [type = org.joda.time.LocalDate]
114
+ @effective_date = j_obj.effective_date
115
+ if !@effective_date.nil?
116
+ @effective_date = @effective_date.to_s
117
+ end
118
+
119
+ # conversion for requested_date [type = org.joda.time.LocalDate]
120
+ @requested_date = j_obj.requested_date
121
+ if !@requested_date.nil?
122
+ @requested_date = @requested_date.to_s
123
+ end
124
+
125
+ # conversion for subscription_event_type [type = com.ning.billing.entitlement.api.SubscriptionEventType]
126
+ @subscription_event_type = j_obj.subscription_event_type
127
+ @subscription_event_type = @subscription_event_type.to_s.to_sym unless @subscription_event_type.nil?
128
+
129
+ # conversion for is_blocked_billing [type = boolean]
130
+ @is_blocked_billing = j_obj.is_blocked_billing
131
+ if @is_blocked_billing.nil?
132
+ @is_blocked_billing = false
133
+ else
134
+ tmp_bool = (@is_blocked_billing.java_kind_of? java.lang.Boolean) ? @is_blocked_billing.boolean_value : @is_blocked_billing
135
+ @is_blocked_billing = tmp_bool ? true : false
136
+ end
137
+
138
+ # conversion for is_blocked_entitlement [type = boolean]
139
+ @is_blocked_entitlement = j_obj.is_blocked_entitlement
140
+ if @is_blocked_entitlement.nil?
141
+ @is_blocked_entitlement = false
142
+ else
143
+ tmp_bool = (@is_blocked_entitlement.java_kind_of? java.lang.Boolean) ? @is_blocked_entitlement.boolean_value : @is_blocked_entitlement
144
+ @is_blocked_entitlement = tmp_bool ? true : false
145
+ end
146
+
147
+ # conversion for service_name [type = java.lang.String]
148
+ @service_name = j_obj.service_name
149
+
150
+ # conversion for service_state_name [type = java.lang.String]
151
+ @service_state_name = j_obj.service_state_name
152
+
153
+ # conversion for prev_product [type = com.ning.billing.catalog.api.Product]
154
+ @prev_product = j_obj.prev_product
155
+ @prev_product = Killbill::Plugin::Model::Product.new.to_ruby(@prev_product) unless @prev_product.nil?
156
+
157
+ # conversion for prev_plan [type = com.ning.billing.catalog.api.Plan]
158
+ @prev_plan = j_obj.prev_plan
159
+ @prev_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@prev_plan) unless @prev_plan.nil?
160
+
161
+ # conversion for prev_phase [type = com.ning.billing.catalog.api.PlanPhase]
162
+ @prev_phase = j_obj.prev_phase
163
+ @prev_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@prev_phase) unless @prev_phase.nil?
164
+
165
+ # conversion for prev_price_list [type = com.ning.billing.catalog.api.PriceList]
166
+ @prev_price_list = j_obj.prev_price_list
167
+ @prev_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@prev_price_list) unless @prev_price_list.nil?
168
+
169
+ # conversion for prev_billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
170
+ @prev_billing_period = j_obj.prev_billing_period
171
+ @prev_billing_period = @prev_billing_period.to_s.to_sym unless @prev_billing_period.nil?
172
+
173
+ # conversion for next_product [type = com.ning.billing.catalog.api.Product]
174
+ @next_product = j_obj.next_product
175
+ @next_product = Killbill::Plugin::Model::Product.new.to_ruby(@next_product) unless @next_product.nil?
176
+
177
+ # conversion for next_plan [type = com.ning.billing.catalog.api.Plan]
178
+ @next_plan = j_obj.next_plan
179
+ @next_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@next_plan) unless @next_plan.nil?
180
+
181
+ # conversion for next_phase [type = com.ning.billing.catalog.api.PlanPhase]
182
+ @next_phase = j_obj.next_phase
183
+ @next_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@next_phase) unless @next_phase.nil?
184
+
185
+ # conversion for next_price_list [type = com.ning.billing.catalog.api.PriceList]
186
+ @next_price_list = j_obj.next_price_list
187
+ @next_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@next_price_list) unless @next_price_list.nil?
188
+
189
+ # conversion for next_billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
190
+ @next_billing_period = j_obj.next_billing_period
191
+ @next_billing_period = @next_billing_period.to_s.to_sym unless @next_billing_period.nil?
192
+ self
193
+ end
194
+
195
+ end
196
+ end
197
+ end
198
+ end