class Ingenico::Direct::SDK::MetaDataProvider::ServerMetaInfo

Stores metadata about the server so it can be sent to the Ingenico ePayments platform

Attributes

integrator[RW]
platform_identifier[RW]

String containing system information (Operating system and Ruby version).

sdk_creator[RW]
sdk_identifier[RW]

String containing this SDK version.

shopping_cart_extension[RW]

Public Instance Methods

from_hash(hash) click to toggle source

Initializes the ServerMetaInfo object with properties stored in the parameter hash

# File lib/ingenico/direct/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() click to toggle source

Returns the values of all attributes as a hash.

Calls superclass method Ingenico::Direct::SDK::DataObject#to_h
# File lib/ingenico/direct/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