Class: Worldline::Connect::SDK::Communication::MetadataProvider::ServerMetaInfo
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Connect::SDK::Communication::MetadataProvider::ServerMetaInfo
- Defined in:
- lib/worldline/connect/sdk/communication/metadata_provider.rb
Overview
Stores metadata about the server so it can be sent to the Worldline Global Collect 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 Domain::DataObject
Instance Attribute Details
#integrator ⇒ Object
Returns the value of attribute integrator.
40 41 42 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 40 def integrator @integrator end |
#platform_identifier ⇒ Object
String containing system information (Operating system and Ruby version).
33 34 35 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 33 def platform_identifier @platform_identifier end |
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
38 39 40 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 38 def sdk_creator @sdk_creator end |
#sdk_identifier ⇒ Object
String containing this SDK version.
36 37 38 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 36 def sdk_identifier @sdk_identifier end |
#shopping_cart_extension ⇒ Object
Returns the value of attribute shopping_cart_extension.
42 43 44 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 42 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
56 57 58 59 60 61 62 63 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 56 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' @shopping_cart_extension = Worldline::Connect::SDK::Domain::ShoppingCartExtension.new_from_hash(hash['shoppingCartExtension']) if hash.has_key? 'shoppingCartExtension' end |
#to_h ⇒ Object
Returns the values of all attributes as a hash.
45 46 47 48 49 50 51 52 53 |
# File 'lib/worldline/connect/sdk/communication/metadata_provider.rb', line 45 def to_h hash = super hash['platformIdentifier'] = @platform_identifier unless @platform_identifier.nil? hash['sdkIdentifier'] = @sdk_identifier unless @sdk_identifier.nil? hash['sdkCreator'] = @sdk_creator unless @sdk_creator.nil? hash['integrator'] = @integrator unless @integrator.nil? hash['shoppingCartExtension'] = @shopping_cart_extension.to_h unless @shopping_cart_extension.nil? hash end |