Class: Ingenico::Connect::SDK::Domain::Payment::Merchant
- Inherits:
-
Ingenico::Connect::SDK::DataObject
- Object
- Ingenico::Connect::SDK::DataObject
- Ingenico::Connect::SDK::Domain::Payment::Merchant
- Defined in:
- lib/ingenico/connect/sdk/domain/payment/merchant.rb
Instance Attribute Summary collapse
-
#contact_website_url ⇒ String
The current value of contact_website_url.
-
#seller ⇒ Ingenico::Connect::SDK::Domain::Payment::Seller
The current value of seller.
-
#website_url ⇒ String
The current value of website_url.
Instance Method Summary collapse
Methods inherited from Ingenico::Connect::SDK::DataObject
Instance Attribute Details
#contact_website_url ⇒ String
Returns the current value of contact_website_url.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 15 def contact_website_url @contact_website_url end |
#seller ⇒ Ingenico::Connect::SDK::Domain::Payment::Seller
Returns the current value of seller.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 15 def seller @seller end |
#website_url ⇒ String
Returns the current value of website_url.
15 16 17 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 15 def website_url @website_url end |
Instance Method Details
#from_hash(hash) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 32 def from_hash(hash) super if hash.has_key? 'contactWebsiteUrl' @contact_website_url = hash['contactWebsiteUrl'] end if hash.has_key? 'seller' raise TypeError, "value '%s' is not a Hash" % [hash['seller']] unless hash['seller'].is_a? Hash @seller = Ingenico::Connect::SDK::Domain::Payment::Seller.new_from_hash(hash['seller']) end if hash.has_key? 'websiteUrl' @website_url = hash['websiteUrl'] end end |
#to_h ⇒ Hash
24 25 26 27 28 29 30 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 24 def to_h hash = super hash['contactWebsiteUrl'] = @contact_website_url unless @contact_website_url.nil? hash['seller'] = @seller.to_h unless @seller.nil? hash['websiteUrl'] = @website_url unless @website_url.nil? hash end |