• Namespace
  • Class

Namespaces

  • Klarna
    • Exceptions
    • Rest
      • Checkout
      • CustomerToken
      • HostedPaymentPage
      • InstantShopping
      • MerchantCardService
      • OrderManagement
      • Payments
      • Settlements
      • Transport
        • Exception

Classes

  • ApiResponse
  • Connector
  • CURLConnector
  • GuzzleConnector
  • Method
  • ResponseValidator
  • UserAgent

Interfaces

  • ConnectorInterface
  • UserAgentInterface

Class UserAgent

HTTP user agent.

Klarna\Rest\Transport\UserAgent implements Klarna\Rest\Transport\UserAgentInterface
Namespace: Klarna\Rest\Transport
Located at Klarna/Rest/Transport/UserAgent.php

Methods summary

public Klarna\Rest\Transport\UserAgent
# setField( string $key, string $name, string $version = '', array $options = [] )

Sets the specified field.

Sets the specified field.

Parameters

$key
Component key, e.g. 'Language'
$name
Component name, e.g. 'PHP'
$version
Version identifier, e.g. '5.4.10'
$options
Additional information

Returns

Klarna\Rest\Transport\UserAgent
public string
# __toString( )

Serialises the user agent.

Serialises the user agent.

Returns

string

Implementation of

Klarna\Rest\Transport\UserAgentInterface::__toString()
public static Klarna\Rest\Transport\UserAgent
# createDefault( $options = [] )

Creates the default user agent.

Creates the default user agent.

Returns

Klarna\Rest\Transport\UserAgent

Magic methods summary

Constants summary

string NAME

Name of the SDK

Name of the SDK

# 'Klarna.kco_rest_php'
string VERSION

Version of the SDK.

Version of the SDK.

# '4.2.2'

Properties summary

protected array $fields

Components of the user agent.

Components of the user agent.

# []
API documentation generated by ApiGen