Class: Opera::MobileStore::PaymentInfo
- Inherits:
-
Object
- Object
- Opera::MobileStore::PaymentInfo
show all
- Includes:
- ActiveModel::Model, ActiveModel::Serialization, InspectableAttributes
- Defined in:
- lib/opera/mobile_store/payment_info.rb
Defined Under Namespace
Classes: Check, PayPal, Wired
Class Method Summary
collapse
Instance Method Summary
collapse
#inspect
Class Method Details
.build_from_nokogiri_node(node) ⇒ Object
.deserialize(serializable_hash) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/opera/mobile_store/payment_info.rb', line 30
def self.deserialize(serializable_hash)
attributes_hash = serializable_hash.inject({}) do |hsh, keyval|
field_name, field_value = keyval
case field_name
when 'payment_info'
field_value = PaymentInfo.deserialize field_value
end
hsh[field_name] = field_value
hsh
end
self.new attributes_hash
end
|
Instance Method Details
#type ⇒ Object
11
12
13
14
|
# File 'lib/opera/mobile_store/payment_info.rb', line 11
def type
ref_type = self.class.name.demodulize.downcase
ref_type == 'pay_pal' ? 'paypal' : ref_type
end
|