Class: Killbill::Plugin::Model::PaymentControlContext
- Defined in:
- lib/killbill/gen/plugin-api/payment_control_context.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#attempt_payment_id ⇒ Object
Returns the value of attribute attempt_payment_id.
-
#call_origin ⇒ Object
Returns the value of attribute call_origin.
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#hpp_type ⇒ Object
Returns the value of attribute hpp_type.
-
#is_api_payment ⇒ Object
Returns the value of attribute is_api_payment.
-
#payment_api_type ⇒ Object
Returns the value of attribute payment_api_type.
-
#payment_external_key ⇒ Object
Returns the value of attribute payment_external_key.
-
#payment_id ⇒ Object
Returns the value of attribute payment_id.
-
#payment_method_id ⇒ Object
Returns the value of attribute payment_method_id.
-
#payment_plugin_name ⇒ Object
Returns the value of attribute payment_plugin_name.
-
#processed_amount ⇒ Object
Returns the value of attribute processed_amount.
-
#processed_currency ⇒ Object
Returns the value of attribute processed_currency.
-
#reason_code ⇒ Object
Returns the value of attribute reason_code.
-
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
-
#transaction_external_key ⇒ Object
Returns the value of attribute transaction_external_key.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
-
#user_token ⇒ Object
Returns the value of attribute user_token.
-
#user_type ⇒ Object
Returns the value of attribute user_type.
Instance Method Summary collapse
-
#initialize ⇒ PaymentControlContext
constructor
A new instance of PaymentControlContext.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ PaymentControlContext
Returns a new instance of PaymentControlContext.
39 40 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 39 def initialize() end |
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def account_id @account_id end |
#amount ⇒ Object
Returns the value of attribute amount.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def amount @amount end |
#attempt_payment_id ⇒ Object
Returns the value of attribute attempt_payment_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def attempt_payment_id @attempt_payment_id end |
#call_origin ⇒ Object
Returns the value of attribute call_origin.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def call_origin @call_origin end |
#comments ⇒ Object
Returns the value of attribute comments.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def comments @comments end |
#created_date ⇒ Object
Returns the value of attribute created_date.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def created_date @created_date end |
#currency ⇒ Object
Returns the value of attribute currency.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def currency @currency end |
#hpp_type ⇒ Object
Returns the value of attribute hpp_type.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def hpp_type @hpp_type end |
#is_api_payment ⇒ Object
Returns the value of attribute is_api_payment.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def is_api_payment @is_api_payment end |
#payment_api_type ⇒ Object
Returns the value of attribute payment_api_type.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def payment_api_type @payment_api_type end |
#payment_external_key ⇒ Object
Returns the value of attribute payment_external_key.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def payment_external_key @payment_external_key end |
#payment_id ⇒ Object
Returns the value of attribute payment_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def payment_id @payment_id end |
#payment_method_id ⇒ Object
Returns the value of attribute payment_method_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def payment_method_id @payment_method_id end |
#payment_plugin_name ⇒ Object
Returns the value of attribute payment_plugin_name.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def payment_plugin_name @payment_plugin_name end |
#processed_amount ⇒ Object
Returns the value of attribute processed_amount.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def processed_amount @processed_amount end |
#processed_currency ⇒ Object
Returns the value of attribute processed_currency.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def processed_currency @processed_currency end |
#reason_code ⇒ Object
Returns the value of attribute reason_code.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def reason_code @reason_code end |
#tenant_id ⇒ Object
Returns the value of attribute tenant_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def tenant_id @tenant_id end |
#transaction_external_key ⇒ Object
Returns the value of attribute transaction_external_key.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def transaction_external_key @transaction_external_key end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def transaction_id @transaction_id end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def transaction_type @transaction_type end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def updated_date @updated_date end |
#user_name ⇒ Object
Returns the value of attribute user_name.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def user_name @user_name end |
#user_token ⇒ Object
Returns the value of attribute user_token.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def user_token @user_token end |
#user_type ⇒ Object
Returns the value of attribute user_type.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 37 def user_type @user_type end |
Instance Method Details
#to_java ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 42 def to_java() # conversion for user_token [type = java.util.UUID] @user_token = java.util.UUID.fromString(@user_token.to_s) unless @user_token.nil? # conversion for user_name [type = java.lang.String] @user_name = @user_name.to_s unless @user_name.nil? # conversion for call_origin [type = org.killbill.billing.util.callcontext.CallOrigin] @call_origin = Java::org.killbill.billing.util.callcontext.CallOrigin.value_of( @call_origin.to_s ) unless @call_origin.nil? # conversion for user_type [type = org.killbill.billing.util.callcontext.UserType] @user_type = Java::org.killbill.billing.util.callcontext.UserType.value_of( @user_type.to_s ) unless @user_type.nil? # conversion for reason_code [type = java.lang.String] @reason_code = @reason_code.to_s unless @reason_code.nil? # conversion for comments [type = java.lang.String] @comments = @comments.to_s unless @comments.nil? # conversion for created_date [type = org.joda.time.DateTime] if !@created_date.nil? @created_date = (@created_date.kind_of? Time) ? DateTime.parse(@created_date.to_s) : @created_date @created_date = Java::org.joda.time.DateTime.new(@created_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for updated_date [type = org.joda.time.DateTime] if !@updated_date.nil? @updated_date = (@updated_date.kind_of? Time) ? DateTime.parse(@updated_date.to_s) : @updated_date @updated_date = Java::org.joda.time.DateTime.new(@updated_date.to_s, Java::org.joda.time.DateTimeZone::UTC) end # conversion for account_id [type = java.util.UUID] @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil? # conversion for tenant_id [type = java.util.UUID] @tenant_id = java.util.UUID.fromString(@tenant_id.to_s) unless @tenant_id.nil? # conversion for payment_id [type = java.util.UUID] @payment_id = java.util.UUID.fromString(@payment_id.to_s) unless @payment_id.nil? # conversion for attempt_payment_id [type = java.util.UUID] @attempt_payment_id = java.util.UUID.fromString(@attempt_payment_id.to_s) unless @attempt_payment_id.nil? # conversion for payment_external_key [type = java.lang.String] @payment_external_key = @payment_external_key.to_s unless @payment_external_key.nil? # conversion for transaction_id [type = java.util.UUID] @transaction_id = java.util.UUID.fromString(@transaction_id.to_s) unless @transaction_id.nil? # conversion for transaction_external_key [type = java.lang.String] @transaction_external_key = @transaction_external_key.to_s unless @transaction_external_key.nil? # conversion for payment_api_type [type = org.killbill.billing.control.plugin.api.PaymentApiType] @payment_api_type = Java::org.killbill.billing.control.plugin.api.PaymentApiType.value_of( @payment_api_type.to_s ) unless @payment_api_type.nil? # conversion for transaction_type [type = org.killbill.billing.payment.api.TransactionType] @transaction_type = Java::org.killbill.billing.payment.api.TransactionType.value_of( @transaction_type.to_s ) unless @transaction_type.nil? # conversion for hpp_type [type = org.killbill.billing.control.plugin.api.HPPType] @hpp_type = Java::org.killbill.billing.control.plugin.api.HPPType.value_of( @hpp_type.to_s ) unless @hpp_type.nil? # conversion for amount [type = java.math.BigDecimal] if @amount.nil? @amount = java.math.BigDecimal::ZERO else @amount = java.math.BigDecimal.new(@amount.to_s) end # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @currency.to_s ) unless @currency.nil? # conversion for payment_method_id [type = java.util.UUID] @payment_method_id = java.util.UUID.fromString(@payment_method_id.to_s) unless @payment_method_id.nil? # conversion for payment_plugin_name [type = java.lang.String] @payment_plugin_name = @payment_plugin_name.to_s unless @payment_plugin_name.nil? # conversion for processed_amount [type = java.math.BigDecimal] if @processed_amount.nil? @processed_amount = java.math.BigDecimal::ZERO else @processed_amount = java.math.BigDecimal.new(@processed_amount.to_s) end # conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency] @processed_currency = Java::org.killbill.billing.catalog.api.Currency.value_of( @processed_currency.to_s ) unless @processed_currency.nil? # conversion for is_api_payment [type = boolean] @is_api_payment = @is_api_payment.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_api_payment) self end |
#to_ruby(j_obj) ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/killbill/gen/plugin-api/payment_control_context.rb', line 134 def to_ruby(j_obj) # conversion for user_token [type = java.util.UUID] @user_token = j_obj.user_token @user_token = @user_token.nil? ? nil : @user_token.to_s # conversion for user_name [type = java.lang.String] @user_name = j_obj.user_name # conversion for call_origin [type = org.killbill.billing.util.callcontext.CallOrigin] @call_origin = j_obj.call_origin @call_origin = @call_origin.to_s.to_sym unless @call_origin.nil? # conversion for user_type [type = org.killbill.billing.util.callcontext.UserType] @user_type = j_obj.user_type @user_type = @user_type.to_s.to_sym unless @user_type.nil? # conversion for reason_code [type = java.lang.String] @reason_code = j_obj.reason_code # conversion for comments [type = java.lang.String] @comments = j_obj.comments # conversion for created_date [type = org.joda.time.DateTime] @created_date = j_obj.created_date if !@created_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@created_date) @created_date = DateTime.iso8601(str) end # conversion for updated_date [type = org.joda.time.DateTime] @updated_date = j_obj.updated_date if !@updated_date.nil? fmt = Java::org.joda.time.format.ISODateTimeFormat.date_time_no_millis # See https://github.com/killbill/killbill-java-parser/issues/3 str = fmt.print(@updated_date) @updated_date = DateTime.iso8601(str) end # conversion for account_id [type = java.util.UUID] @account_id = j_obj.account_id @account_id = @account_id.nil? ? nil : @account_id.to_s # conversion for tenant_id [type = java.util.UUID] @tenant_id = j_obj.tenant_id @tenant_id = @tenant_id.nil? ? nil : @tenant_id.to_s # conversion for payment_id [type = java.util.UUID] @payment_id = j_obj.payment_id @payment_id = @payment_id.nil? ? nil : @payment_id.to_s # conversion for attempt_payment_id [type = java.util.UUID] @attempt_payment_id = j_obj.attempt_payment_id @attempt_payment_id = @attempt_payment_id.nil? ? nil : @attempt_payment_id.to_s # conversion for payment_external_key [type = java.lang.String] @payment_external_key = j_obj.payment_external_key # conversion for transaction_id [type = java.util.UUID] @transaction_id = j_obj.transaction_id @transaction_id = @transaction_id.nil? ? nil : @transaction_id.to_s # conversion for transaction_external_key [type = java.lang.String] @transaction_external_key = j_obj.transaction_external_key # conversion for payment_api_type [type = org.killbill.billing.control.plugin.api.PaymentApiType] @payment_api_type = j_obj.payment_api_type @payment_api_type = @payment_api_type.to_s.to_sym unless @payment_api_type.nil? # conversion for transaction_type [type = org.killbill.billing.payment.api.TransactionType] @transaction_type = j_obj.transaction_type @transaction_type = @transaction_type.to_s.to_sym unless @transaction_type.nil? # conversion for hpp_type [type = org.killbill.billing.control.plugin.api.HPPType] @hpp_type = j_obj.hpp_type @hpp_type = @hpp_type.to_s.to_sym unless @hpp_type.nil? # conversion for amount [type = java.math.BigDecimal] @amount = j_obj.amount @amount = @amount.nil? ? 0 : BigDecimal.new(@amount.to_s) # conversion for currency [type = org.killbill.billing.catalog.api.Currency] @currency = j_obj.currency @currency = @currency.to_s.to_sym unless @currency.nil? # conversion for payment_method_id [type = java.util.UUID] @payment_method_id = j_obj.payment_method_id @payment_method_id = @payment_method_id.nil? ? nil : @payment_method_id.to_s # conversion for payment_plugin_name [type = java.lang.String] @payment_plugin_name = j_obj.payment_plugin_name # conversion for processed_amount [type = java.math.BigDecimal] @processed_amount = j_obj.processed_amount @processed_amount = @processed_amount.nil? ? 0 : BigDecimal.new(@processed_amount.to_s) # conversion for processed_currency [type = org.killbill.billing.catalog.api.Currency] @processed_currency = j_obj.processed_currency @processed_currency = @processed_currency.to_s.to_sym unless @processed_currency.nil? # conversion for is_api_payment [type = boolean] @is_api_payment = j_obj.is_api_payment if @is_api_payment.nil? @is_api_payment = false else tmp_bool = (@is_api_payment.java_kind_of? java.lang.Boolean) ? @is_api_payment.boolean_value : @is_api_payment @is_api_payment = tmp_bool ? true : false end self end |