killbill 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/Jarfile CHANGED
@@ -1,5 +1,5 @@
1
- jar 'com.ning.billing:killbill-api', '0.4.0'
2
- jar 'com.ning.billing.plugin:killbill-plugin-api-notification', '0.3.0'
3
- jar 'com.ning.billing.plugin:killbill-plugin-api-payment', '0.3.0'
4
- jar 'com.ning.billing:killbill-util:tests', '0.3.6'
1
+ jar 'com.ning.billing:killbill-api', '0.6.0'
2
+ jar 'com.ning.billing.plugin:killbill-plugin-api-notification', '0.4.0'
3
+ jar 'com.ning.billing.plugin:killbill-plugin-api-payment', '0.4.0'
4
+ jar 'com.ning.billing:killbill-util:tests', '0.6.0'
5
5
  jar 'javax.servlet:javax.servlet-api', '3.0.1'
data/NEWS CHANGED
@@ -1,2 +1,5 @@
1
+ 1.5.0
2
+ New entitlement Apis
3
+
1
4
  1.4.0
2
5
  Add search APIs
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.5.0
data/lib/killbill.rb CHANGED
@@ -24,9 +24,9 @@ begin
24
24
  IMPORT_KILLBILL_APIS = %w(
25
25
  com.ning.billing.account.api.AccountUserApi
26
26
  com.ning.billing.catalog.api.CatalogUserApi
27
- com.ning.billing.subscription.api.user.SubscriptionUserApi
28
27
  com.ning.billing.invoice.api.InvoicePaymentApi
29
28
  com.ning.billing.entitlement.api.EntitlementApi
29
+ com.ning.billing.entitlement.api.SubscriptionApi
30
30
  com.ning.billing.invoice.api.InvoiceUserApi
31
31
  com.ning.billing.overdue.OverdueUserApi
32
32
  com.ning.billing.payment.api.PaymentApi
@@ -32,7 +32,7 @@ module Killbill
32
32
 
33
33
  include com.ning.billing.account.api.Account
34
34
 
35
- attr_accessor :id, :blocking_state, :created_date, :updated_date, :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
35
+ attr_accessor :id, :created_date, :updated_date, :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
36
36
 
37
37
  def initialize()
38
38
  end
@@ -41,9 +41,6 @@ module Killbill
41
41
  # conversion for id [type = java.util.UUID]
42
42
  @id = java.util.UUID.fromString(@id.to_s) unless @id.nil?
43
43
 
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
44
  # conversion for created_date [type = org.joda.time.DateTime]
48
45
  if !@created_date.nil?
49
46
  @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
@@ -122,10 +119,6 @@ module Killbill
122
119
  @id = j_obj.id
123
120
  @id = @id.nil? ? nil : @id.to_s
124
121
 
125
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
126
- @blocking_state = j_obj.blocking_state
127
- @blocking_state = Killbill::Plugin::Model::BlockingState.new.to_ruby(@blocking_state) unless @blocking_state.nil?
128
-
129
122
  # conversion for created_date [type = org.joda.time.DateTime]
130
123
  @created_date = j_obj.created_date
131
124
  if !@created_date.nil?
@@ -102,26 +102,6 @@ module Killbill
102
102
  end
103
103
  end
104
104
 
105
- java_signature 'Java::java.util.List searchAccounts(Java::java.lang.String, Java::com.ning.billing.util.callcontext.TenantContext)'
106
- def search_accounts(searchKey, context)
107
-
108
- # conversion for searchKey [type = java.lang.String]
109
- searchKey = searchKey.to_s unless searchKey.nil?
110
-
111
- # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
112
- context = context.to_java unless context.nil?
113
- res = @real_java_api.search_accounts(searchKey, context)
114
- # conversion for res [type = java.util.List]
115
- tmp = []
116
- (res || []).each do |m|
117
- # conversion for m [type = com.ning.billing.account.api.Account]
118
- m = Killbill::Plugin::Model::Account.new.to_ruby(m) unless m.nil?
119
- tmp << m
120
- end
121
- res = tmp
122
- return res
123
- end
124
-
125
105
  java_signature 'Java::java.util.List getAccounts(Java::com.ning.billing.util.callcontext.TenantContext)'
126
106
  def get_accounts(context)
127
107
 
@@ -54,34 +54,13 @@ module Killbill
54
54
  return res
55
55
  end
56
56
 
57
- java_signature 'Java::com.ning.billing.util.audit.AuditLogsForBundles getAuditLogsForBundle(Java::java.util.UUID, Java::com.ning.billing.util.api.AuditLevel, Java::com.ning.billing.util.callcontext.TenantContext)'
58
- def get_audit_logs_for_bundle(bundleId, auditLevel, context)
59
-
60
- # conversion for bundleId [type = java.util.UUID]
61
- bundleId = java.util.UUID.fromString(bundleId.to_s) unless bundleId.nil?
62
-
63
- # conversion for auditLevel [type = com.ning.billing.util.api.AuditLevel]
64
- auditLevel = Java::com.ning.billing.util.api.AuditLevel.value_of("#{auditLevel.to_s}") unless auditLevel.nil?
65
-
66
- # conversion for context [type = com.ning.billing.util.callcontext.TenantContext]
67
- context = context.to_java unless context.nil?
68
- begin
69
- res = @real_java_api.get_audit_logs_for_bundle(bundleId, auditLevel, context)
70
- # conversion for res [type = com.ning.billing.util.audit.AuditLogsForBundles]
71
- res = Killbill::Plugin::Model::AuditLogsForBundles.new.to_ruby(res) unless res.nil?
72
- return res
73
- rescue Java::com.ning.billing.subscription.api.timeline.SubscriptionRepairException => e
74
- raise Killbill::Plugin::Model::SubscriptionRepairException.new.to_ruby(e)
75
- end
76
- end
77
-
78
57
  java_signature 'Java::com.ning.billing.util.audit.AuditLogsForBundles getAuditLogsForBundles(Java::java.util.List, Java::com.ning.billing.util.api.AuditLevel, Java::com.ning.billing.util.callcontext.TenantContext)'
79
58
  def get_audit_logs_for_bundles(bundles, auditLevel, context)
80
59
 
81
60
  # conversion for bundles [type = java.util.List]
82
61
  tmp = java.util.ArrayList.new
83
62
  (bundles || []).each do |m|
84
- # conversion for m [type = com.ning.billing.subscription.api.timeline.BundleTimeline]
63
+ # conversion for m [type = com.ning.billing.entitlement.api.SubscriptionBundle]
85
64
  m = m.to_java unless m.nil?
86
65
  tmp.add(m)
87
66
  end
@@ -32,7 +32,7 @@ module Killbill
32
32
 
33
33
  include com.ning.billing.entitlement.api.Blockable
34
34
 
35
- attr_accessor :id, :created_date, :updated_date, :blocking_state
35
+ attr_accessor :id, :created_date, :updated_date
36
36
 
37
37
  def initialize()
38
38
  end
@@ -52,9 +52,6 @@ module Killbill
52
52
  @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
53
53
  @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
54
54
  end
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
55
  self
59
56
  end
60
57
 
@@ -78,10 +75,6 @@ module Killbill
78
75
  str = fmt.print(@updated_date)
79
76
  @updated_date = DateTime.iso8601(str)
80
77
  end
81
-
82
- # conversion for blocking_state [type = com.ning.billing.entitlement.api.BlockingState]
83
- @blocking_state = j_obj.blocking_state
84
- @blocking_state = Killbill::Plugin::Model::BlockingState.new.to_ruby(@blocking_state) unless @blocking_state.nil?
85
78
  self
86
79
  end
87
80
 
@@ -32,7 +32,7 @@ module Killbill
32
32
 
33
33
  include com.ning.billing.entitlement.api.BlockingState
34
34
 
35
- attr_accessor :id, :created_date, :updated_date, :blocked_id, :state_name, :type, :timestamp, :is_block_change, :is_block_entitlement, :is_block_billing, :description, :service
35
+ attr_accessor :id, :created_date, :updated_date, :blocked_id, :state_name, :type, :effective_date, :is_block_change, :is_block_entitlement, :is_block_billing, :description, :service
36
36
 
37
37
  def initialize()
38
38
  end
@@ -59,13 +59,13 @@ module Killbill
59
59
  # conversion for state_name [type = java.lang.String]
60
60
  @state_name = @state_name.to_s unless @state_name.nil?
61
61
 
62
- # conversion for type [type = com.ning.billing.entitlement.api.Type]
63
- @type = Java::com.ning.billing.entitlement.api.Type.value_of("#{@type.to_s}") unless @type.nil?
62
+ # conversion for type [type = com.ning.billing.entitlement.api.BlockingStateType]
63
+ @type = Java::com.ning.billing.entitlement.api.BlockingStateType.value_of("#{@type.to_s}") unless @type.nil?
64
64
 
65
- # conversion for timestamp [type = org.joda.time.DateTime]
66
- if !@timestamp.nil?
67
- @timestamp = (@timestamp.kind_of? Time) ? DateTime.parse(@timestamp.to_s) : @timestamp
68
- @timestamp = Java::org.joda.time.DateTime.new(@timestamp.to_s, Java::org.joda.time.DateTimeZone::UTC)
65
+ # conversion for effective_date [type = org.joda.time.DateTime]
66
+ if !@effective_date.nil?
67
+ @effective_date = (@effective_date.kind_of? Time) ? DateTime.parse(@effective_date.to_s) : @effective_date
68
+ @effective_date = Java::org.joda.time.DateTime.new(@effective_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
69
69
  end
70
70
 
71
71
  # conversion for is_block_change [type = boolean]
@@ -113,16 +113,16 @@ module Killbill
113
113
  # conversion for state_name [type = java.lang.String]
114
114
  @state_name = j_obj.state_name
115
115
 
116
- # conversion for type [type = com.ning.billing.entitlement.api.Type]
116
+ # conversion for type [type = com.ning.billing.entitlement.api.BlockingStateType]
117
117
  @type = j_obj.type
118
118
  @type = @type.to_s.to_sym unless @type.nil?
119
119
 
120
- # conversion for timestamp [type = org.joda.time.DateTime]
121
- @timestamp = j_obj.timestamp
122
- if !@timestamp.nil?
120
+ # conversion for effective_date [type = org.joda.time.DateTime]
121
+ @effective_date = j_obj.effective_date
122
+ if !@effective_date.nil?
123
123
  fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
124
- str = fmt.print(@timestamp)
125
- @timestamp = DateTime.iso8601(str)
124
+ str = fmt.print(@effective_date)
125
+ @effective_date = DateTime.iso8601(str)
126
126
  end
127
127
 
128
128
  # conversion for is_block_change [type = boolean]
@@ -0,0 +1,210 @@
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 Entitlement
32
+
33
+ include com.ning.billing.entitlement.api.Entitlement
34
+
35
+ attr_accessor :id, :created_date, :updated_date, :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
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 created_date [type = org.joda.time.DateTime]
45
+ if !@created_date.nil?
46
+ @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
47
+ @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
48
+ end
49
+
50
+ # conversion for updated_date [type = org.joda.time.DateTime]
51
+ if !@updated_date.nil?
52
+ @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date
53
+ @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
54
+ end
55
+
56
+ # conversion for base_entitlement_id [type = java.util.UUID]
57
+ @base_entitlement_id = java.util.UUID.fromString(@base_entitlement_id.to_s) unless @base_entitlement_id.nil?
58
+
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 account_id [type = java.util.UUID]
63
+ @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
64
+
65
+ # conversion for external_key [type = java.lang.String]
66
+ @external_key = @external_key.to_s unless @external_key.nil?
67
+
68
+ # conversion for state [type = com.ning.billing.entitlement.api.EntitlementState]
69
+ @state = Java::com.ning.billing.entitlement.api.EntitlementState.value_of("#{@state.to_s}") unless @state.nil?
70
+
71
+ # conversion for source_type [type = com.ning.billing.entitlement.api.EntitlementSourceType]
72
+ @source_type = Java::com.ning.billing.entitlement.api.EntitlementSourceType.value_of("#{@source_type.to_s}") unless @source_type.nil?
73
+
74
+ # conversion for effective_start_date [type = org.joda.time.LocalDate]
75
+ if !@effective_start_date.nil?
76
+ @effective_start_date = Java::org.joda.time.LocalDate.parse(@effective_start_date.to_s)
77
+ end
78
+
79
+ # conversion for effective_end_date [type = org.joda.time.LocalDate]
80
+ if !@effective_end_date.nil?
81
+ @effective_end_date = Java::org.joda.time.LocalDate.parse(@effective_end_date.to_s)
82
+ end
83
+
84
+ # conversion for product [type = com.ning.billing.catalog.api.Product]
85
+ @product = @product.to_java unless @product.nil?
86
+
87
+ # conversion for plan [type = com.ning.billing.catalog.api.Plan]
88
+ @plan = @plan.to_java unless @plan.nil?
89
+
90
+ # conversion for price_list [type = com.ning.billing.catalog.api.PriceList]
91
+ @price_list = @price_list.to_java unless @price_list.nil?
92
+
93
+ # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
94
+ @current_phase = @current_phase.to_java unless @current_phase.nil?
95
+
96
+ # conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
97
+ @product_category = Java::com.ning.billing.catalog.api.ProductCategory.value_of("#{@product_category.to_s}") unless @product_category.nil?
98
+
99
+ # conversion for last_active_product [type = com.ning.billing.catalog.api.Product]
100
+ @last_active_product = @last_active_product.to_java unless @last_active_product.nil?
101
+
102
+ # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
103
+ @last_active_plan = @last_active_plan.to_java unless @last_active_plan.nil?
104
+
105
+ # conversion for last_active_price_list [type = com.ning.billing.catalog.api.PriceList]
106
+ @last_active_price_list = @last_active_price_list.to_java unless @last_active_price_list.nil?
107
+
108
+ # conversion for last_active_product_category [type = com.ning.billing.catalog.api.ProductCategory]
109
+ @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?
110
+ self
111
+ end
112
+
113
+ def to_ruby(j_obj)
114
+ # conversion for id [type = java.util.UUID]
115
+ @id = j_obj.id
116
+ @id = @id.nil? ? nil : @id.to_s
117
+
118
+ # conversion for created_date [type = org.joda.time.DateTime]
119
+ @created_date = j_obj.created_date
120
+ if !@created_date.nil?
121
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
122
+ str = fmt.print(@created_date)
123
+ @created_date = DateTime.iso8601(str)
124
+ end
125
+
126
+ # conversion for updated_date [type = org.joda.time.DateTime]
127
+ @updated_date = j_obj.updated_date
128
+ if !@updated_date.nil?
129
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
130
+ str = fmt.print(@updated_date)
131
+ @updated_date = DateTime.iso8601(str)
132
+ end
133
+
134
+ # conversion for base_entitlement_id [type = java.util.UUID]
135
+ @base_entitlement_id = j_obj.base_entitlement_id
136
+ @base_entitlement_id = @base_entitlement_id.nil? ? nil : @base_entitlement_id.to_s
137
+
138
+ # conversion for bundle_id [type = java.util.UUID]
139
+ @bundle_id = j_obj.bundle_id
140
+ @bundle_id = @bundle_id.nil? ? nil : @bundle_id.to_s
141
+
142
+ # conversion for account_id [type = java.util.UUID]
143
+ @account_id = j_obj.account_id
144
+ @account_id = @account_id.nil? ? nil : @account_id.to_s
145
+
146
+ # conversion for external_key [type = java.lang.String]
147
+ @external_key = j_obj.external_key
148
+
149
+ # conversion for state [type = com.ning.billing.entitlement.api.EntitlementState]
150
+ @state = j_obj.state
151
+ @state = @state.to_s.to_sym unless @state.nil?
152
+
153
+ # conversion for source_type [type = com.ning.billing.entitlement.api.EntitlementSourceType]
154
+ @source_type = j_obj.source_type
155
+ @source_type = @source_type.to_s.to_sym unless @source_type.nil?
156
+
157
+ # conversion for effective_start_date [type = org.joda.time.LocalDate]
158
+ @effective_start_date = j_obj.effective_start_date
159
+ if !@effective_start_date.nil?
160
+ @effective_start_date = @effective_start_date.to_s
161
+ end
162
+
163
+ # conversion for effective_end_date [type = org.joda.time.LocalDate]
164
+ @effective_end_date = j_obj.effective_end_date
165
+ if !@effective_end_date.nil?
166
+ @effective_end_date = @effective_end_date.to_s
167
+ end
168
+
169
+ # conversion for product [type = com.ning.billing.catalog.api.Product]
170
+ @product = j_obj.product
171
+ @product = Killbill::Plugin::Model::Product.new.to_ruby(@product) unless @product.nil?
172
+
173
+ # conversion for plan [type = com.ning.billing.catalog.api.Plan]
174
+ @plan = j_obj.plan
175
+ @plan = Killbill::Plugin::Model::Plan.new.to_ruby(@plan) unless @plan.nil?
176
+
177
+ # conversion for price_list [type = com.ning.billing.catalog.api.PriceList]
178
+ @price_list = j_obj.price_list
179
+ @price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@price_list) unless @price_list.nil?
180
+
181
+ # conversion for current_phase [type = com.ning.billing.catalog.api.PlanPhase]
182
+ @current_phase = j_obj.current_phase
183
+ @current_phase = Killbill::Plugin::Model::PlanPhase.new.to_ruby(@current_phase) unless @current_phase.nil?
184
+
185
+ # conversion for product_category [type = com.ning.billing.catalog.api.ProductCategory]
186
+ @product_category = j_obj.product_category
187
+ @product_category = @product_category.to_s.to_sym unless @product_category.nil?
188
+
189
+ # conversion for last_active_product [type = com.ning.billing.catalog.api.Product]
190
+ @last_active_product = j_obj.last_active_product
191
+ @last_active_product = Killbill::Plugin::Model::Product.new.to_ruby(@last_active_product) unless @last_active_product.nil?
192
+
193
+ # conversion for last_active_plan [type = com.ning.billing.catalog.api.Plan]
194
+ @last_active_plan = j_obj.last_active_plan
195
+ @last_active_plan = Killbill::Plugin::Model::Plan.new.to_ruby(@last_active_plan) unless @last_active_plan.nil?
196
+
197
+ # conversion for last_active_price_list [type = com.ning.billing.catalog.api.PriceList]
198
+ @last_active_price_list = j_obj.last_active_price_list
199
+ @last_active_price_list = Killbill::Plugin::Model::PriceList.new.to_ruby(@last_active_price_list) unless @last_active_price_list.nil?
200
+
201
+ # conversion for last_active_product_category [type = com.ning.billing.catalog.api.ProductCategory]
202
+ @last_active_product_category = j_obj.last_active_product_category
203
+ @last_active_product_category = @last_active_product_category.to_s.to_sym unless @last_active_product_category.nil?
204
+ self
205
+ end
206
+
207
+ end
208
+ end
209
+ end
210
+ end
@@ -0,0 +1,89 @@
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 EntitlementAOStatusDryRun
32
+
33
+ include com.ning.billing.entitlement.api.EntitlementAOStatusDryRun
34
+
35
+ attr_accessor :id, :product_name, :billing_period, :price_list, :phase_type, :reason
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 product_name [type = java.lang.String]
45
+ @product_name = @product_name.to_s unless @product_name.nil?
46
+
47
+ # conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
48
+ @billing_period = Java::com.ning.billing.catalog.api.BillingPeriod.value_of("#{@billing_period.to_s}") unless @billing_period.nil?
49
+
50
+ # conversion for price_list [type = java.lang.String]
51
+ @price_list = @price_list.to_s unless @price_list.nil?
52
+
53
+ # conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
54
+ @phase_type = Java::com.ning.billing.catalog.api.PhaseType.value_of("#{@phase_type.to_s}") unless @phase_type.nil?
55
+
56
+ # conversion for reason [type = com.ning.billing.entitlement.api.DryRunChangeReason]
57
+ @reason = Java::com.ning.billing.entitlement.api.DryRunChangeReason.value_of("#{@reason.to_s}") unless @reason.nil?
58
+ self
59
+ end
60
+
61
+ def to_ruby(j_obj)
62
+ # conversion for id [type = java.util.UUID]
63
+ @id = j_obj.id
64
+ @id = @id.nil? ? nil : @id.to_s
65
+
66
+ # conversion for product_name [type = java.lang.String]
67
+ @product_name = j_obj.product_name
68
+
69
+ # conversion for billing_period [type = com.ning.billing.catalog.api.BillingPeriod]
70
+ @billing_period = j_obj.billing_period
71
+ @billing_period = @billing_period.to_s.to_sym unless @billing_period.nil?
72
+
73
+ # conversion for price_list [type = java.lang.String]
74
+ @price_list = j_obj.price_list
75
+
76
+ # conversion for phase_type [type = com.ning.billing.catalog.api.PhaseType]
77
+ @phase_type = j_obj.phase_type
78
+ @phase_type = @phase_type.to_s.to_sym unless @phase_type.nil?
79
+
80
+ # conversion for reason [type = com.ning.billing.entitlement.api.DryRunChangeReason]
81
+ @reason = j_obj.reason
82
+ @reason = @reason.to_s.to_sym unless @reason.nil?
83
+ self
84
+ end
85
+
86
+ end
87
+ end
88
+ end
89
+ end