Class: OnlinePayments::SDK::MetaDataProvider::ServerMetaInfo
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::MetaDataProvider::ServerMetaInfo
- Defined in:
- lib/onlinepayments/sdk/meta_data_provider.rb
Overview
Stores metadata about the server so it can be sent to the Online Payments 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.
32 33 34 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 32 def integrator @integrator end |
#platform_identifier ⇒ Object
String containing system information (Operating system and Ruby version).
25 26 27 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 25 def platform_identifier @platform_identifier end |
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
30 31 32 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 30 def sdk_creator @sdk_creator end |
#sdk_identifier ⇒ Object
String containing this SDK version.
28 29 30 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 28 def sdk_identifier @sdk_identifier end |
#shopping_cart_extension ⇒ Object
Returns the value of attribute shopping_cart_extension.
34 35 36 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 34 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
48 49 50 51 52 53 54 55 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 48 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 = 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.
37 38 39 40 41 42 43 44 45 |
# File 'lib/onlinepayments/sdk/meta_data_provider.rb', line 37 def to_h hash = super hash['platformIdentifier'] = @platform_identifier if @platform_identifier hash['sdkIdentifier'] = @sdk_identifier if @sdk_identifier hash['sdkCreator'] = @sdk_creator if @sdk_creator hash['integrator'] = @integrator if @integrator hash['shoppingCartExtension'] = @shopping_cart_extension.to_h if @shopping_cart_extension hash end |