Class: ServerMetaInfo
- Inherits:
-
Object
- Object
- ServerMetaInfo
- Defined in:
- lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb
Instance Attribute Summary collapse
-
#integrator ⇒ Object
Returns the value of attribute integrator.
-
#platform_identifier ⇒ Object
Returns the value of attribute platform_identifier.
-
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
-
#sdk_identifier ⇒ Object
Returns the value of attribute sdk_identifier.
Instance Method Summary collapse
-
#initialize(integrator = '') ⇒ ServerMetaInfo
constructor
A new instance of ServerMetaInfo.
- #to_json ⇒ Object
Constructor Details
#initialize(integrator = '') ⇒ ServerMetaInfo
Returns a new instance of ServerMetaInfo.
7 8 9 10 11 12 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 7 def initialize(integrator = '') @platform_identifier = "#{RbConfig::CONFIG['host_os']}, ruby version is: #{RUBY_VERSION}" @sdk_identifier = 'RubyServerSDK/v1.0.0' # Adjust version as needed @sdk_creator = 'PAYONE GmbH' @integrator = integrator end |
Instance Attribute Details
#integrator ⇒ Object
Returns the value of attribute integrator.
5 6 7 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 5 def integrator @integrator end |
#platform_identifier ⇒ Object
Returns the value of attribute platform_identifier.
5 6 7 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 5 def platform_identifier @platform_identifier end |
#sdk_creator ⇒ Object
Returns the value of attribute sdk_creator.
5 6 7 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 5 def sdk_creator @sdk_creator end |
#sdk_identifier ⇒ Object
Returns the value of attribute sdk_identifier.
5 6 7 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 5 def sdk_identifier @sdk_identifier end |
Instance Method Details
#to_json ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/PCP-server-Ruby-SDK/utils/server_meta_info.rb', line 14 def to_json JSON.pretty_generate({ platform_identifier: @platform_identifier, sdk_identifier: @sdk_identifier, sdk_creator: @sdk_creator, integrator: @integrator }) end |