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
-
#configuration_id ⇒ String
The current value of configuration_id.
-
#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
#configuration_id ⇒ String
Returns the current value of configuration_id.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16 def configuration_id @configuration_id end |
#contact_website_url ⇒ String
Returns the current value of contact_website_url.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16 def contact_website_url @contact_website_url end |
#seller ⇒ Ingenico::Connect::SDK::Domain::Payment::Seller
Returns the current value of seller.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16 def seller @seller end |
#website_url ⇒ String
Returns the current value of website_url.
16 17 18 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 16 def website_url @website_url end |
Instance Method Details
#from_hash(hash) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 36 def from_hash(hash) super if hash.has_key? 'configurationId' @configuration_id = hash['configurationId'] end 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
27 28 29 30 31 32 33 34 |
# File 'lib/ingenico/connect/sdk/domain/payment/merchant.rb', line 27 def to_h hash = super hash['configurationId'] = @configuration_id unless @configuration_id.nil? 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 |