• Namespace
  • Class

Namespaces

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

Classes

  • ButtonKeys
  • Orders

Class ButtonKeys

Instant shopping ButtonKeys resource.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Klarna\Rest\Resource
Extended by Klarna\Rest\InstantShopping\ButtonKeys
Namespace: Klarna\Rest\InstantShopping
Located at Klarna/Rest/InstantShopping/ButtonKeys.php

Methods summary

public
# __construct( Klarna\Rest\Transport\ConnectorInterface $connector, string $buttonKey = null, string $key,… )

Constructs a ButtonKey instance.

Constructs a ButtonKey instance.

Parameters

$connector
HTTP transport connector
$buttonKey
Button identifier
$key,…
Button key based on setup options

Overrides

Klarna\Rest\Resource::__construct
public array
# create( array $data )

Creates a button key based on setup options.

Creates a button key based on setup options.

Parameters

$data
Creation data

Returns

array
Button properties

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
If the API replies with an unexpected response
LogicException
When Guzzle cannot populate the response

See

https://developers.klarna.com/api/#instant-shopping-api-create-a-button-key-based-on-setup-options
public array
# update( array $data )

Updates the setup options for a specific button key.

Updates the setup options for a specific button key.

Parameters

$data
Update data

Returns

array
Button properties

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
If the API replies with an unexpected response
RuntimeException
If key was not specified when creating a resource
LogicException
When Guzzle cannot populate the response

See

https://developers.klarna.com/api/#instant-shopping-api-update-the-setup-options-for-a-specific-button-key
public Klarna\Rest\InstantShopping\ButtonKeys
# retrieve( )

See the setup options for a specific button key.

See the setup options for a specific button key.

Returns

Klarna\Rest\InstantShopping\ButtonKeys

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
RuntimeException
If key was not specified when creating a resource
RuntimeException
On an unexpected API response
RuntimeException
If the response content type is not JSON
InvalidArgumentException
If the JSON cannot be parsed
LogicException
When Guzzle cannot populate the response

See

https://developers.klarna.com/api/#instant-shopping-api-see-the-setup-options-for-a-specific-button-key

Methods inherited from Klarna\Rest\Resource

delete(), exchangeArray(), fetch(), get(), getId(), getLocation(), patch(), post(), put(), request(), setId(), setLocation()

Methods inherited from ArrayObject

append(), asort(), count(), getArrayCopy(), getFlags(), getIterator(), getIteratorClass(), ksort(), natcasesort(), natsort(), offsetExists(), offsetGet(), offsetSet(), offsetUnset(), serialize(), setFlags(), setIteratorClass(), uasort(), uksort(), unserialize()

Magic methods summary

Constants summary

Constants inherited from Klarna\Rest\Resource

ID_FIELD

Constants inherited from ArrayObject

ARRAY_AS_PROPS, STD_PROP_LIST

Properties summary

public static string $path

Path to the resource endpoint.

Path to the resource endpoint.

# '/instantshopping/v1/buttons'

Properties inherited from Klarna\Rest\Resource

$connector, $url

API documentation generated by ApiGen