• Namespace
  • Class

Namespaces

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

Classes

  • Capture
  • Order
  • Refund

Class Capture

Order Management: Capture resource.

ArrayObject implements IteratorAggregate, Traversable, ArrayAccess, Serializable, Countable
Extended by Klarna\Rest\Resource
Extended by Klarna\Rest\OrderManagement\Capture
Namespace: Klarna\Rest\OrderManagement
Example: docs/examples/OrderManagementAPI/Captures/add_shipping_info.php
Example: docs/examples/OrderManagementAPI/Captures/fetch_captures.php
Example: docs/examples/OrderManagementAPI/Captures/trigger_send_out.php
Example: docs/examples/OrderManagementAPI/Captures/update_customer_details.php
Located at Klarna/Rest/OrderManagement/Capture.php

Methods summary

public
# __construct( Klarna\Rest\Transport\ConnectorInterface $connector, string $orderUrl, string $captureId = null )

Constructs a Capture instance.

Constructs a Capture instance.

Parameters

$connector
HTTP transport connector
$orderUrl
Parent order resource url
$captureId
Capture ID

Overrides

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

Creates the resource.

Creates the resource.

Parameters

$data
Creation data

Returns

Klarna\Rest\OrderManagement\Capture

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
public Klarna\Rest\OrderManagement\Capture
# addShippingInfo( array $data )

Appends shipping information to the capture.

Appends shipping information to the capture.

Parameters

$data
Shipping info data

Returns

Klarna\Rest\OrderManagement\Capture

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
public Klarna\Rest\OrderManagement\Capture
# updateCustomerDetails( array $data )

Updates the customers details.

Updates the customers details.

Parameters

$data
Customer details data

Returns

Klarna\Rest\OrderManagement\Capture

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
public Klarna\Rest\OrderManagement\Capture
# triggerSendout( )

Trigger send outs for this capture.

Trigger send outs for this capture.

Returns

Klarna\Rest\OrderManagement\Capture

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

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.

# '/captures'

Properties inherited from Klarna\Rest\Resource

$connector, $url

API documentation generated by ApiGen