• Namespace
  • Class

Namespaces

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

Classes

  • ButtonKeys
  • Orders

Class Orders

Instant shopping Order resource.

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

Methods summary

public
# __construct( Klarna\Rest\Transport\ConnectorInterface $connector, string $authorizationToken )

Constructs an Order instance.

Constructs an Order instance.

Parameters

$connector
HTTP transport connector
$authorizationToken
Authorization Token

Overrides

Klarna\Rest\Resource::__construct
public Klarna\Rest\InstantShopping\Orders
# retrieve( )

Retrieves an authorized order based on the authorization token.

Retrieves an authorized order based on the authorization token.

Returns

Klarna\Rest\InstantShopping\Orders

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
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-retrieves-an-authorized-order-based-on-the-authorization-token

Codingstandardsignoreend

Codingstandardsignorestart

public Klarna\Rest\InstantShopping\Orders
# decline( array $data = null )

Declines an authorized order identified by the authorization token.

Declines an authorized order identified by the authorization token.

Parameters

$data
Decline data

Returns

Klarna\Rest\InstantShopping\Orders

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 location header is missing
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-declines-an-authorized-order-identified-by-the-authorization-token

Codingstandardsignoreend

Codingstandardsignorestart

public array
# approve( array $data )

Approves the authorized order and places an order identified by the authorization token.

Approves the authorized order and places an order identified by the authorization token.

Parameters

$data
Order data

Returns

array
approving status

Throws

Klarna\Rest\Transport\Exception\ConnectorException
When the API replies with an error response
GuzzleHttp\Exception\RequestException
When an error is encountered
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-approve-the-authorized-order-and-place-an-order-identified-by-the-authorization-token

Codingstandardsignoreend

Codingstandardsignorestart

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/authorizations'

Properties inherited from Klarna\Rest\Resource

$connector, $url

API documentation generated by ApiGen