Class: Opera::MobileStore::PaymentInfo::Check

Inherits:
Opera::MobileStore::PaymentInfo show all
Defined in:
lib/opera/mobile_store/payment_info.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Opera::MobileStore::PaymentInfo

deserialize, #type

Methods included from InspectableAttributes

#inspect

Instance Attribute Details

#addressObject

Returns the value of attribute address.



47
48
49
# File 'lib/opera/mobile_store/payment_info.rb', line 47

def address
  @address
end

#nameObject

Returns the value of attribute name.



47
48
49
# File 'lib/opera/mobile_store/payment_info.rb', line 47

def name
  @name
end

Class Method Details

.build_from_nokogiri_node(node) ⇒ Object



49
50
51
52
53
54
# File 'lib/opera/mobile_store/payment_info.rb', line 49

def self.build_from_nokogiri_node(node)
  self.new(
    name:    node.xpath("string(payment_check_name)"),
    address: node.xpath("string(payment_check_address)")
  )
end

Instance Method Details

#attributesObject



56
57
58
59
60
61
62
# File 'lib/opera/mobile_store/payment_info.rb', line 56

def attributes
  [:type, :name, :address].inject({}) do |hash, method|
    value = self.public_send method
    hash[method] = value unless value.nil?
    hash
  end
end