Class ButtonKeys
Instant shopping ButtonKeys resource.
-
ArrayObject
implements
IteratorAggregate,
Traversable,
ArrayAccess,
Serializable,
Countable
-
Klarna\Rest\Resource
-
Klarna\Rest\InstantShopping\ButtonKeys
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
|
public
array
|
#
create( array $data )
Creates a button key based on setup options.
Creates a button key based on setup options.
Parameters
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
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
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
|
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
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'
|
$connector
,
$url