killbill 1.0.19 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. data/Jarfile +4 -2
  2. data/VERSION +1 -1
  3. data/killbill.gemspec +4 -3
  4. data/lib/killbill.rb +7 -51
  5. data/lib/killbill/creator.rb +10 -18
  6. data/lib/killbill/gen/account.rb +208 -27
  7. data/lib/killbill/gen/account_api_exception.rb +66 -0
  8. data/lib/killbill/gen/account_data.rb +166 -23
  9. data/lib/killbill/gen/account_email.rb +80 -8
  10. data/lib/killbill/gen/account_service.rb +55 -0
  11. data/lib/killbill/gen/account_user_api.rb +187 -0
  12. data/lib/killbill/gen/audit_user_api.rb +196 -0
  13. data/lib/killbill/gen/beatrix_service.rb +55 -0
  14. data/lib/killbill/gen/billing_exception_base.rb +66 -0
  15. data/lib/killbill/gen/blockable.rb +91 -0
  16. data/lib/killbill/gen/blocking_api_exception.rb +66 -0
  17. data/lib/killbill/gen/blocking_state.rb +150 -16
  18. data/lib/killbill/gen/call_context.rb +107 -13
  19. data/lib/killbill/gen/catalog.rb +76 -0
  20. data/lib/killbill/gen/catalog_api_exception.rb +66 -0
  21. data/lib/killbill/gen/catalog_service.rb +69 -0
  22. data/lib/killbill/gen/catalog_user_api.rb +54 -0
  23. data/lib/killbill/gen/column_info.rb +67 -0
  24. data/lib/killbill/gen/control_tag.rb +112 -0
  25. data/lib/killbill/gen/currency_value_null.rb +66 -0
  26. data/lib/killbill/gen/custom_field.rb +93 -10
  27. data/lib/killbill/gen/custom_field_api_exception.rb +66 -0
  28. data/lib/killbill/gen/custom_field_user_api.rb +115 -0
  29. data/lib/killbill/gen/database_export_output_stream.rb +51 -0
  30. data/lib/killbill/gen/default_mutable_account_data.rb +180 -0
  31. data/lib/killbill/gen/duration.rb +62 -0
  32. data/lib/killbill/gen/entitlement_service.rb +55 -0
  33. data/lib/killbill/gen/entitlement_user_api.rb +272 -0
  34. data/lib/killbill/gen/entitlement_user_api_exception.rb +66 -0
  35. data/lib/killbill/gen/entity.rb +84 -0
  36. data/lib/killbill/gen/entity_persistence_exception.rb +66 -0
  37. data/lib/killbill/gen/export_user_api.rb +17 -0
  38. data/lib/killbill/gen/ext_bus_event.rb +68 -9
  39. data/lib/killbill/gen/external_bus.rb +51 -0
  40. data/lib/killbill/gen/illegal_plan_change.rb +66 -0
  41. data/lib/killbill/gen/international_price.rb +79 -0
  42. data/lib/killbill/gen/invalid_config_exception.rb +49 -0
  43. data/lib/killbill/gen/invoice.rb +238 -23
  44. data/lib/killbill/gen/invoice_api_exception.rb +66 -0
  45. data/lib/killbill/gen/invoice_creation_event.rb +51 -0
  46. data/lib/killbill/gen/invoice_item.rb +179 -21
  47. data/lib/killbill/gen/invoice_migration_api.rb +66 -0
  48. data/lib/killbill/gen/invoice_notifier.rb +51 -0
  49. data/lib/killbill/gen/invoice_payment.rb +135 -15
  50. data/lib/killbill/gen/invoice_payment_api.rb +208 -0
  51. data/lib/killbill/gen/invoice_service.rb +55 -0
  52. data/lib/killbill/gen/invoice_user_api.rb +461 -0
  53. data/lib/killbill/gen/junction_api.rb +60 -0
  54. data/lib/killbill/gen/limit.rb +68 -0
  55. data/lib/killbill/gen/listing.rb +63 -0
  56. data/lib/killbill/gen/migration_account_data.rb +228 -0
  57. data/lib/killbill/gen/migration_plan.rb +143 -0
  58. data/lib/killbill/gen/mutable_account_data.rb +182 -0
  59. data/lib/killbill/gen/no_op_payment_plugin_api.rb +254 -0
  60. data/lib/killbill/gen/payment.rb +183 -20
  61. data/lib/killbill/gen/payment_api.rb +433 -0
  62. data/lib/killbill/gen/payment_api_exception.rb +66 -0
  63. data/lib/killbill/gen/payment_attempt.rb +100 -10
  64. data/lib/killbill/gen/payment_info_plugin.rb +103 -12
  65. data/lib/killbill/gen/payment_method.rb +116 -0
  66. data/lib/killbill/gen/payment_method_info_plugin.rb +64 -7
  67. data/lib/killbill/gen/payment_method_kv_info.rb +56 -6
  68. data/lib/killbill/gen/payment_method_plugin.rb +142 -20
  69. data/lib/killbill/gen/payment_plugin_api.rb +232 -0
  70. data/lib/killbill/gen/payment_plugin_api_exception.rb +59 -0
  71. data/lib/killbill/gen/payment_service.rb +62 -0
  72. data/lib/killbill/gen/plan.rb +143 -0
  73. data/lib/killbill/gen/plan_change_result.rb +68 -0
  74. data/lib/killbill/gen/plan_phase.rb +104 -0
  75. data/lib/killbill/gen/plan_phase_specifier.rb +80 -0
  76. data/lib/killbill/gen/plan_specifier.rb +73 -0
  77. data/lib/killbill/gen/price.rb +67 -0
  78. data/lib/killbill/gen/price_list.rb +74 -0
  79. data/lib/killbill/gen/price_list_set.rb +56 -0
  80. data/lib/killbill/gen/product.rb +101 -0
  81. data/lib/killbill/gen/record_id_api.rb +55 -0
  82. data/lib/killbill/gen/refund.rb +126 -13
  83. data/lib/killbill/gen/refund_info_plugin.rb +96 -10
  84. data/lib/killbill/gen/require_gen.rb +97 -15
  85. data/lib/killbill/gen/static_catalog.rb +137 -0
  86. data/lib/killbill/gen/subscription.rb +258 -28
  87. data/lib/killbill/gen/subscription_bundle.rb +94 -10
  88. data/lib/killbill/gen/subscription_status_dry_run.rb +89 -0
  89. data/lib/killbill/gen/subscription_transition.rb +196 -0
  90. data/lib/killbill/gen/tag.rb +88 -9
  91. data/lib/killbill/gen/tag_api_exception.rb +66 -0
  92. data/lib/killbill/gen/tag_definition.rb +110 -10
  93. data/lib/killbill/gen/tag_definition_api_exception.rb +66 -0
  94. data/lib/killbill/gen/tag_user_api.rb +239 -0
  95. data/lib/killbill/gen/tenant.rb +102 -0
  96. data/lib/killbill/gen/tenant_api_exception.rb +66 -0
  97. data/lib/killbill/gen/tenant_context.rb +39 -4
  98. data/lib/killbill/gen/tenant_data.rb +67 -0
  99. data/lib/killbill/gen/tenant_kv.rb +96 -0
  100. data/lib/killbill/gen/tenant_service.rb +55 -0
  101. data/lib/killbill/gen/tenant_user_api.rb +127 -0
  102. data/lib/killbill/gen/unit.rb +55 -0
  103. data/lib/killbill/jnotification.rb +1 -1
  104. data/lib/killbill/jpayment.rb +10 -7
  105. data/lib/killbill/jplugin.rb +63 -61
  106. data/lib/killbill/killbill_api.rb +42 -9
  107. data/spec/killbill/jnotification_spec.rb +15 -1
  108. data/spec/killbill/jpayment_spec.rb +12 -8
  109. data/spec/killbill/killbillapi_spec.rb +23 -21
  110. data/spec/killbill/payment_plugin_spec.rb +1 -9
  111. data/spec/killbill/payment_test.rb +21 -5
  112. metadata +96 -22
  113. data/lib/killbill/gen/audit_log.rb +0 -28
  114. data/lib/killbill/gen/call_origin.rb +0 -34
  115. data/lib/killbill/gen/currency.rb +0 -34
  116. data/lib/killbill/gen/date_time_zone.rb +0 -35
  117. data/lib/killbill/gen/ext_bus_event_type.rb +0 -34
  118. data/lib/killbill/gen/invoice_payment_type.rb +0 -34
  119. data/lib/killbill/gen/object_type.rb +0 -34
  120. data/lib/killbill/gen/payment_plugin_status.rb +0 -34
  121. data/lib/killbill/gen/refund_plugin_status.rb +0 -34
  122. data/lib/killbill/gen/subscription_source_type.rb +0 -34
  123. data/lib/killbill/gen/subscription_state.rb +0 -34
  124. data/lib/killbill/gen/user_type.rb +0 -34
  125. data/lib/killbill/gen/uuid.rb +0 -22
  126. data/lib/killbill/jconverter.rb +0 -537
  127. data/lib/killbill/jkillbill_api.rb +0 -137
  128. data/spec/killbill/jconverter_spec.rb +0 -193
@@ -1,26 +1,116 @@
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
+
1
19
 
2
20
  #
3
- # Ruby classes automatically generated from java classes-- don't edit
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
4
23
  #
24
+
25
+
5
26
  module Killbill
6
27
  module Plugin
7
28
  module Model
8
29
 
30
+ java_package 'com.ning.billing.payment.api'
9
31
  class PaymentAttempt
10
32
 
11
33
  include com.ning.billing.payment.api.PaymentAttempt
12
34
 
13
- attr_reader :id, :created_date, :updated_date, :effective_date, :gateway_error_code, :gateway_error_msg, :payment_status
35
+ attr_accessor :id, :created_date, :updated_date, :effective_date, :gateway_error_code, :gateway_error_msg, :payment_status
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 effective_date [type = org.joda.time.DateTime]
57
+ if !@effective_date.nil?
58
+ @effective_date = (@effective_date.kind_of? Time) ? DateTime.parse(@effective_date.to_s) : @effective_date
59
+ @effective_date = Java::org.joda.time.DateTime.new(@effective_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
60
+ end
61
+
62
+ # conversion for gateway_error_code [type = java.lang.String]
63
+ @gateway_error_code = @gateway_error_code.to_s unless @gateway_error_code.nil?
14
64
 
15
- def initialize(id, created_date, updated_date, effective_date, gateway_error_code, gateway_error_msg, payment_status)
16
- @id = id
17
- @created_date = created_date
18
- @updated_date = updated_date
19
- @effective_date = effective_date
20
- @gateway_error_code = gateway_error_code
21
- @gateway_error_msg = gateway_error_msg
22
- @payment_status = payment_status
65
+ # conversion for gateway_error_msg [type = java.lang.String]
66
+ @gateway_error_msg = @gateway_error_msg.to_s unless @gateway_error_msg.nil?
67
+
68
+ # conversion for payment_status [type = com.ning.billing.payment.api.PaymentStatus]
69
+ @payment_status = Java::com.ning.billing.payment.api.PaymentStatus.value_of("#{@payment_status.to_s}") unless @payment_status.nil?
70
+ self
71
+ end
72
+
73
+ def to_ruby(j_obj)
74
+ # conversion for id [type = java.util.UUID]
75
+ @id = j_obj.id
76
+ @id = @id.nil? ? nil : @id.to_s
77
+
78
+ # conversion for created_date [type = org.joda.time.DateTime]
79
+ @created_date = j_obj.created_date
80
+ if !@created_date.nil?
81
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
82
+ str = fmt.print(@created_date)
83
+ @created_date = DateTime.iso8601(str)
84
+ end
85
+
86
+ # conversion for updated_date [type = org.joda.time.DateTime]
87
+ @updated_date = j_obj.updated_date
88
+ if !@updated_date.nil?
89
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
90
+ str = fmt.print(@updated_date)
91
+ @updated_date = DateTime.iso8601(str)
92
+ end
93
+
94
+ # conversion for effective_date [type = org.joda.time.DateTime]
95
+ @effective_date = j_obj.effective_date
96
+ if !@effective_date.nil?
97
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
98
+ str = fmt.print(@effective_date)
99
+ @effective_date = DateTime.iso8601(str)
100
+ end
101
+
102
+ # conversion for gateway_error_code [type = java.lang.String]
103
+ @gateway_error_code = j_obj.gateway_error_code
104
+
105
+ # conversion for gateway_error_msg [type = java.lang.String]
106
+ @gateway_error_msg = j_obj.gateway_error_msg
107
+
108
+ # conversion for payment_status [type = com.ning.billing.payment.api.PaymentStatus]
109
+ @payment_status = j_obj.payment_status
110
+ @payment_status = @payment_status.to_s.to_sym unless @payment_status.nil?
111
+ self
23
112
  end
113
+
24
114
  end
25
115
  end
26
116
  end
@@ -1,27 +1,118 @@
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
+
1
19
 
2
20
  #
3
- # Ruby classes automatically generated from java classes-- don't edit
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
4
23
  #
24
+
25
+
5
26
  module Killbill
6
27
  module Plugin
7
28
  module Model
8
29
 
30
+ java_package 'com.ning.billing.payment.plugin.api'
9
31
  class PaymentInfoPlugin
10
32
 
11
33
  include com.ning.billing.payment.plugin.api.PaymentInfoPlugin
12
34
 
13
- attr_reader :amount, :created_date, :effective_date, :status, :gateway_error, :gateway_error_code, :first_payment_reference_id, :second_payment_reference_id
14
-
15
- def initialize(amount, created_date, effective_date, status, gateway_error, gateway_error_code, first_payment_reference_id, second_payment_reference_id)
16
- @amount = amount
17
- @created_date = created_date
18
- @effective_date = effective_date
19
- @status = status
20
- @gateway_error = gateway_error
21
- @gateway_error_code = gateway_error_code
22
- @first_payment_reference_id = first_payment_reference_id
23
- @second_payment_reference_id = second_payment_reference_id
35
+ attr_accessor :amount, :created_date, :effective_date, :status, :gateway_error, :gateway_error_code, :first_payment_reference_id, :second_payment_reference_id
36
+
37
+ def initialize()
24
38
  end
39
+
40
+ def to_java()
41
+ # conversion for amount [type = java.math.BigDecimal]
42
+ if @amount.nil?
43
+ @amount = java.math.BigDecimal::ZERO
44
+ else
45
+ @amount = java.math.BigDecimal.new(@amount.to_i)
46
+ end
47
+
48
+ # conversion for created_date [type = org.joda.time.DateTime]
49
+ if !@created_date.nil?
50
+ @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date
51
+ @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
52
+ end
53
+
54
+ # conversion for effective_date [type = org.joda.time.DateTime]
55
+ if !@effective_date.nil?
56
+ @effective_date = (@effective_date.kind_of? Time) ? DateTime.parse(@effective_date.to_s) : @effective_date
57
+ @effective_date = Java::org.joda.time.DateTime.new(@effective_date.to_s, Java::org.joda.time.DateTimeZone::UTC)
58
+ end
59
+
60
+ # conversion for status [type = com.ning.billing.payment.plugin.api.PaymentPluginStatus]
61
+ @status = Java::com.ning.billing.payment.plugin.api.PaymentPluginStatus.value_of("#{@status.to_s}") unless @status.nil?
62
+
63
+ # conversion for gateway_error [type = java.lang.String]
64
+ @gateway_error = @gateway_error.to_s unless @gateway_error.nil?
65
+
66
+ # conversion for gateway_error_code [type = java.lang.String]
67
+ @gateway_error_code = @gateway_error_code.to_s unless @gateway_error_code.nil?
68
+
69
+ # conversion for first_payment_reference_id [type = java.lang.String]
70
+ @first_payment_reference_id = @first_payment_reference_id.to_s unless @first_payment_reference_id.nil?
71
+
72
+ # conversion for second_payment_reference_id [type = java.lang.String]
73
+ @second_payment_reference_id = @second_payment_reference_id.to_s unless @second_payment_reference_id.nil?
74
+ self
75
+ end
76
+
77
+ def to_ruby(j_obj)
78
+ # conversion for amount [type = java.math.BigDecimal]
79
+ @amount = j_obj.amount
80
+ @amount = @amount.nil? ? 0 : @amount.to_s.to_i
81
+
82
+ # conversion for created_date [type = org.joda.time.DateTime]
83
+ @created_date = j_obj.created_date
84
+ if !@created_date.nil?
85
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
86
+ str = fmt.print(@created_date)
87
+ @created_date = DateTime.iso8601(str)
88
+ end
89
+
90
+ # conversion for effective_date [type = org.joda.time.DateTime]
91
+ @effective_date = j_obj.effective_date
92
+ if !@effective_date.nil?
93
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
94
+ str = fmt.print(@effective_date)
95
+ @effective_date = DateTime.iso8601(str)
96
+ end
97
+
98
+ # conversion for status [type = com.ning.billing.payment.plugin.api.PaymentPluginStatus]
99
+ @status = j_obj.status
100
+ @status = @status.to_s.to_sym unless @status.nil?
101
+
102
+ # conversion for gateway_error [type = java.lang.String]
103
+ @gateway_error = j_obj.gateway_error
104
+
105
+ # conversion for gateway_error_code [type = java.lang.String]
106
+ @gateway_error_code = j_obj.gateway_error_code
107
+
108
+ # conversion for first_payment_reference_id [type = java.lang.String]
109
+ @first_payment_reference_id = j_obj.first_payment_reference_id
110
+
111
+ # conversion for second_payment_reference_id [type = java.lang.String]
112
+ @second_payment_reference_id = j_obj.second_payment_reference_id
113
+ self
114
+ end
115
+
25
116
  end
26
117
  end
27
118
  end
@@ -0,0 +1,116 @@
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.payment.api'
31
+ class PaymentMethod
32
+
33
+ include com.ning.billing.payment.api.PaymentMethod
34
+
35
+ attr_accessor :id, :created_date, :updated_date, :account_id, :is_active, :plugin_name, :plugin_detail
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 account_id [type = java.util.UUID]
57
+ @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil?
58
+
59
+ # conversion for is_active [type = java.lang.Boolean]
60
+ @is_active = @is_active.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_active)
61
+
62
+ # conversion for plugin_name [type = java.lang.String]
63
+ @plugin_name = @plugin_name.to_s unless @plugin_name.nil?
64
+
65
+ # conversion for plugin_detail [type = com.ning.billing.payment.api.PaymentMethodPlugin]
66
+ @plugin_detail = @plugin_detail.to_java unless @plugin_detail.nil?
67
+ self
68
+ end
69
+
70
+ def to_ruby(j_obj)
71
+ # conversion for id [type = java.util.UUID]
72
+ @id = j_obj.id
73
+ @id = @id.nil? ? nil : @id.to_s
74
+
75
+ # conversion for created_date [type = org.joda.time.DateTime]
76
+ @created_date = j_obj.created_date
77
+ if !@created_date.nil?
78
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
79
+ str = fmt.print(@created_date)
80
+ @created_date = DateTime.iso8601(str)
81
+ end
82
+
83
+ # conversion for updated_date [type = org.joda.time.DateTime]
84
+ @updated_date = j_obj.updated_date
85
+ if !@updated_date.nil?
86
+ fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time
87
+ str = fmt.print(@updated_date)
88
+ @updated_date = DateTime.iso8601(str)
89
+ end
90
+
91
+ # conversion for account_id [type = java.util.UUID]
92
+ @account_id = j_obj.account_id
93
+ @account_id = @account_id.nil? ? nil : @account_id.to_s
94
+
95
+ # conversion for is_active [type = java.lang.Boolean]
96
+ @is_active = j_obj.is_active
97
+ if @is_active.nil?
98
+ @is_active = false
99
+ else
100
+ tmp_bool = (@is_active.java_kind_of? java.lang.Boolean) ? @is_active.boolean_value : @is_active
101
+ @is_active = tmp_bool ? true : false
102
+ end
103
+
104
+ # conversion for plugin_name [type = java.lang.String]
105
+ @plugin_name = j_obj.plugin_name
106
+
107
+ # conversion for plugin_detail [type = com.ning.billing.payment.api.PaymentMethodPlugin]
108
+ @plugin_detail = j_obj.plugin_detail
109
+ @plugin_detail = Killbill::Plugin::Model::PaymentMethodPlugin.new.to_ruby(@plugin_detail) unless @plugin_detail.nil?
110
+ self
111
+ end
112
+
113
+ end
114
+ end
115
+ end
116
+ end
@@ -1,23 +1,80 @@
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
+
1
19
 
2
20
  #
3
- # Ruby classes automatically generated from java classes-- don't edit
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
4
23
  #
24
+
25
+
5
26
  module Killbill
6
27
  module Plugin
7
28
  module Model
8
29
 
30
+ java_package 'com.ning.billing.payment.plugin.api'
9
31
  class PaymentMethodInfoPlugin
10
32
 
11
33
  include com.ning.billing.payment.plugin.api.PaymentMethodInfoPlugin
12
34
 
13
- attr_reader :account_id, :payment_method_id, :is_default, :external_payment_method_id
35
+ attr_accessor :account_id, :payment_method_id, :is_default, :external_payment_method_id
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 payment_method_id [type = java.util.UUID]
45
+ @payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil?
14
46
 
15
- def initialize(account_id, payment_method_id, is_default, external_payment_method_id)
16
- @account_id = account_id
17
- @payment_method_id = payment_method_id
18
- @is_default = is_default
19
- @external_payment_method_id = external_payment_method_id
47
+ # conversion for is_default [type = boolean]
48
+ @is_default = @is_default.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_default)
49
+
50
+ # conversion for external_payment_method_id [type = java.lang.String]
51
+ @external_payment_method_id = @external_payment_method_id.to_s unless @external_payment_method_id.nil?
52
+ self
20
53
  end
54
+
55
+ def to_ruby(j_obj)
56
+ # conversion for account_id [type = java.util.UUID]
57
+ @account_id = j_obj.account_id
58
+ @account_id = @account_id.nil? ? nil : @account_id.to_s
59
+
60
+ # conversion for payment_method_id [type = java.util.UUID]
61
+ @payment_method_id = j_obj.payment_method_id
62
+ @payment_method_id = @payment_method_id.nil? ? nil : @payment_method_id.to_s
63
+
64
+ # conversion for is_default [type = boolean]
65
+ @is_default = j_obj.is_default
66
+ if @is_default.nil?
67
+ @is_default = false
68
+ else
69
+ tmp_bool = (@is_default.java_kind_of? java.lang.Boolean) ? @is_default.boolean_value : @is_default
70
+ @is_default = tmp_bool ? true : false
71
+ end
72
+
73
+ # conversion for external_payment_method_id [type = java.lang.String]
74
+ @external_payment_method_id = j_obj.external_payment_method_id
75
+ self
76
+ end
77
+
21
78
  end
22
79
  end
23
80
  end