Class: Killbill::Plugin::Model::PaymentMethod
- Defined in:
- lib/killbill/gen/api/payment_method.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#external_key ⇒ Object
Returns the value of attribute external_key.
-
#id ⇒ Object
Returns the value of attribute id.
-
#is_active ⇒ Object
Returns the value of attribute is_active.
-
#plugin_detail ⇒ Object
Returns the value of attribute plugin_detail.
-
#plugin_name ⇒ Object
Returns the value of attribute plugin_name.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
Instance Method Summary collapse
-
#initialize ⇒ PaymentMethod
constructor
A new instance of PaymentMethod.
- #to_java ⇒ Object
- #to_ruby(j_obj) ⇒ Object
Constructor Details
#initialize ⇒ PaymentMethod
Returns a new instance of PaymentMethod.
39 40 |
# File 'lib/killbill/gen/api/payment_method.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/api/payment_method.rb', line 37 def account_id @account_id end |
#created_date ⇒ Object
Returns the value of attribute created_date.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def created_date @created_date end |
#external_key ⇒ Object
Returns the value of attribute external_key.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def external_key @external_key end |
#id ⇒ Object
Returns the value of attribute id.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def id @id end |
#is_active ⇒ Object
Returns the value of attribute is_active.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def is_active @is_active end |
#plugin_detail ⇒ Object
Returns the value of attribute plugin_detail.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def plugin_detail @plugin_detail end |
#plugin_name ⇒ Object
Returns the value of attribute plugin_name.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def plugin_name @plugin_name end |
#updated_date ⇒ Object
Returns the value of attribute updated_date.
37 38 39 |
# File 'lib/killbill/gen/api/payment_method.rb', line 37 def updated_date @updated_date 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 |
# File 'lib/killbill/gen/api/payment_method.rb', line 42 def to_java() # conversion for id [type = java.util.UUID] @id = java.util.UUID.fromString(@id.to_s) unless @id.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 external_key [type = java.lang.String] @external_key = @external_key.to_s unless @external_key.nil? # conversion for account_id [type = java.util.UUID] @account_id = java.util.UUID.fromString(@account_id.to_s) unless @account_id.nil? # conversion for is_active [type = java.lang.Boolean] @is_active = @is_active.nil? ? java.lang.Boolean.new(false) : java.lang.Boolean.new(@is_active) # conversion for plugin_name [type = java.lang.String] @plugin_name = @plugin_name.to_s unless @plugin_name.nil? # conversion for plugin_detail [type = org.killbill.billing.payment.api.PaymentMethodPlugin] @plugin_detail = @plugin_detail.to_java unless @plugin_detail.nil? self end |
#to_ruby(j_obj) ⇒ Object
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 |
# File 'lib/killbill/gen/api/payment_method.rb', line 75 def to_ruby(j_obj) # conversion for id [type = java.util.UUID] @id = j_obj.id @id = @id.nil? ? nil : @id.to_s # 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 external_key [type = java.lang.String] @external_key = j_obj.external_key # 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 is_active [type = java.lang.Boolean] @is_active = j_obj.is_active if @is_active.nil? @is_active = false else tmp_bool = (@is_active.java_kind_of? java.lang.Boolean) ? @is_active.boolean_value : @is_active @is_active = tmp_bool ? true : false end # conversion for plugin_name [type = java.lang.String] @plugin_name = j_obj.plugin_name # conversion for plugin_detail [type = org.killbill.billing.payment.api.PaymentMethodPlugin] @plugin_detail = j_obj.plugin_detail @plugin_detail = Killbill::Plugin::Model::PaymentMethodPlugin.new.to_ruby(@plugin_detail) unless @plugin_detail.nil? self end |