Class: Ingenico::Connect::SDK::MetaDataProvider::ServerMetaInfo
- Inherits:
-
DataObject
- Object
- DataObject
- Ingenico::Connect::SDK::MetaDataProvider::ServerMetaInfo
- Defined in:
- lib/ingenico/connect/sdk/meta_data_provider.rb
Overview
Stores metadata about the server so it can be sent to the Ingenico ePayments platform
Instance Attribute Summary collapse
-
#integrator ⇒ Object
Returns the value of attribute integrator.
-
#platform_identifier ⇒ Object
String containing system information (Operating system and Ruby version).
-
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
-
#sdk_identifier ⇒ Object
String containing this SDK version.
-
#shopping_cart_extension ⇒ Object
Returns the value of attribute shopping_cart_extension.
Instance Method Summary collapse
-
#from_hash(hash) ⇒ Object
Initializes the ServerMetaInfo object with properties stored in the parameter hash.
-
#to_h ⇒ Object
Returns the values of all attributes as a hash.
Methods inherited from DataObject
Instance Attribute Details
#integrator ⇒ Object
Returns the value of attribute integrator.
30 31 32 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 30 def integrator @integrator end |
#platform_identifier ⇒ Object
String containing system information (Operating system and Ruby version).
23 24 25 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 23 def platform_identifier @platform_identifier end |
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
28 29 30 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 28 def sdk_creator @sdk_creator end |
#sdk_identifier ⇒ Object
String containing this SDK version.
26 27 28 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 26 def sdk_identifier @sdk_identifier end |
#shopping_cart_extension ⇒ Object
Returns the value of attribute shopping_cart_extension.
32 33 34 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 32 def shopping_cart_extension @shopping_cart_extension end |
Instance Method Details
#from_hash(hash) ⇒ Object
Initializes the ServerMetaInfo object with properties stored in the parameter hash
46 47 48 49 50 51 52 53 54 55 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 46 def from_hash(hash) super @platform_identifier = hash['platformIdentifier'] if hash.has_key?('platformIdentifier') @sdk_identifier = hash['sdkIdentifier'] if hash.has_key?('sdkIdentifier') @sdk_creator = hash['sdkCreator'] if hash.has_key?('sdkCreator') @integrator = hash['integrator'] if hash.has_key?('integrator') if hash.has_key?('shoppingCartExtension') @shopping_cart_extension = Domain::Metadata::ShoppingCartExtension.new_from_hash(hash['shoppingCartExtension']) end end |
#to_h ⇒ Object
Returns the values of all attributes as a hash.
35 36 37 38 39 40 41 42 43 |
# File 'lib/ingenico/connect/sdk/meta_data_provider.rb', line 35 def to_h hash = super add_to_hash(hash, 'platformIdentifier', platform_identifier) add_to_hash(hash, 'sdkIdentifier', sdk_identifier) add_to_hash(hash, 'sdkCreator', sdk_creator) add_to_hash(hash, 'integrator', integrator) add_to_hash(hash, 'shoppingCartExtension', shopping_cart_extension) hash end |