Commit 22488e72 by Murlidhar Fichadia

Initial commit

parents
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# php-cs-fixer cache
.php_cs.cache
.php-cs-fixer.cache
# PHPUnit cache
.phpunit.result.cache
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
.gitignore
.openapi-generator-ignore
.php-cs-fixer.dist.php
.travis.yml
README.md
composer.json
docs/Api/CapturesApi.md
docs/Api/OrdersApi.md
docs/Api/RefundsApi.md
docs/Model/Addon.md
docs/Model/Address.md
docs/Model/CancelNotAllowedErrorMessage.md
docs/Model/Capture.md
docs/Model/CaptureNotAllowedErrorMessage.md
docs/Model/CaptureObject.md
docs/Model/CarrierProduct.md
docs/Model/Customer.md
docs/Model/ErrorMessageDto.md
docs/Model/ExtendDueDateOptions.md
docs/Model/ExtendDueDateRequest.md
docs/Model/InitialPaymentMethodDto.md
docs/Model/Location.md
docs/Model/MerchantOrderDto.md
docs/Model/NoSuchCaptureErrorMessage.md
docs/Model/NoSuchOrderErrorMessage.md
docs/Model/NotAllowedErrorMessage.md
docs/Model/NotFoundErrorMessage.md
docs/Model/OptionDto.md
docs/Model/OrderLine.md
docs/Model/ProductIdentifiers.md
docs/Model/Refund.md
docs/Model/RefundNotAllowedErrorMessage.md
docs/Model/RefundObject.md
docs/Model/SelectedShippingOptionDto.md
docs/Model/ShippingInfo.md
docs/Model/Subscription.md
docs/Model/Timeslot.md
docs/Model/UpdateAuthorization.md
docs/Model/UpdateConsumer.md
docs/Model/UpdateMerchantReferences.md
docs/Model/UpdateShippingInfo.md
git_push.sh
lib/Api/CapturesApi.php
lib/Api/OrdersApi.php
lib/Api/RefundsApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/Model/Addon.php
lib/Model/Address.php
lib/Model/CancelNotAllowedErrorMessage.php
lib/Model/Capture.php
lib/Model/CaptureNotAllowedErrorMessage.php
lib/Model/CaptureObject.php
lib/Model/CarrierProduct.php
lib/Model/Customer.php
lib/Model/ErrorMessageDto.php
lib/Model/ExtendDueDateOptions.php
lib/Model/ExtendDueDateRequest.php
lib/Model/InitialPaymentMethodDto.php
lib/Model/Location.php
lib/Model/MerchantOrderDto.php
lib/Model/ModelInterface.php
lib/Model/NoSuchCaptureErrorMessage.php
lib/Model/NoSuchOrderErrorMessage.php
lib/Model/NotAllowedErrorMessage.php
lib/Model/NotFoundErrorMessage.php
lib/Model/OptionDto.php
lib/Model/OrderLine.php
lib/Model/ProductIdentifiers.php
lib/Model/Refund.php
lib/Model/RefundNotAllowedErrorMessage.php
lib/Model/RefundObject.php
lib/Model/SelectedShippingOptionDto.php
lib/Model/ShippingInfo.php
lib/Model/Subscription.php
lib/Model/Timeslot.php
lib/Model/UpdateAuthorization.php
lib/Model/UpdateConsumer.php
lib/Model/UpdateMerchantReferences.php
lib/Model/UpdateShippingInfo.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/CapturesApiTest.php
test/Api/OrdersApiTest.php
test/Api/RefundsApiTest.php
test/Model/AddonTest.php
test/Model/AddressTest.php
test/Model/CancelNotAllowedErrorMessageTest.php
test/Model/CaptureNotAllowedErrorMessageTest.php
test/Model/CaptureObjectTest.php
test/Model/CaptureTest.php
test/Model/CarrierProductTest.php
test/Model/CustomerTest.php
test/Model/ErrorMessageDtoTest.php
test/Model/ExtendDueDateOptionsTest.php
test/Model/ExtendDueDateRequestTest.php
test/Model/InitialPaymentMethodDtoTest.php
test/Model/LocationTest.php
test/Model/MerchantOrderDtoTest.php
test/Model/NoSuchCaptureErrorMessageTest.php
test/Model/NoSuchOrderErrorMessageTest.php
test/Model/NotAllowedErrorMessageTest.php
test/Model/NotFoundErrorMessageTest.php
test/Model/OptionDtoTest.php
test/Model/OrderLineTest.php
test/Model/ProductIdentifiersTest.php
test/Model/RefundNotAllowedErrorMessageTest.php
test/Model/RefundObjectTest.php
test/Model/RefundTest.php
test/Model/SelectedShippingOptionDtoTest.php
test/Model/ShippingInfoTest.php
test/Model/SubscriptionTest.php
test/Model/TimeslotTest.php
test/Model/UpdateAuthorizationTest.php
test/Model/UpdateConsumerTest.php
test/Model/UpdateMerchantReferencesTest.php
test/Model/UpdateShippingInfoTest.php
<?php
/**
* @generated
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->exclude('test')
->exclude('tests')
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
'no_leading_import_slash' => false,
])
->setFinder($finder)
;
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"
# OpenAPIClient-php
The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order.
Read more on the [Order management](https://docs.klarna.com/order-management/) process.
## Installation & Usage
### Requirements
PHP 7.4 and later.
Should also work with PHP 8.0.
### Composer
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\CapturesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string | Order id
$capture_id = 'capture_id_example'; // string | Capture id
$update_shipping_info = new \OpenAPI\Client\Model\UpdateShippingInfo(); // \OpenAPI\Client\Model\UpdateShippingInfo
$klarna_idempotency_key = 'klarna_idempotency_key_example'; // string | This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters.
try {
$apiInstance->appendShippingInfo($order_id, $capture_id, $update_shipping_info, $klarna_idempotency_key);
} catch (Exception $e) {
echo 'Exception when calling CapturesApi->appendShippingInfo: ', $e->getMessage(), PHP_EOL;
}
```
## API Endpoints
All URIs are relative to *https://api.klarna.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*CapturesApi* | [**appendShippingInfo**](docs/Api/CapturesApi.md#appendshippinginfo) | **POST** /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/shipping-info | Add shipping information
*CapturesApi* | [**captureOrder**](docs/Api/CapturesApi.md#captureorder) | **POST** /ordermanagement/v1/orders/{order_id}/captures | Capture an order
*CapturesApi* | [**extendDueDate**](docs/Api/CapturesApi.md#extendduedate) | **PATCH** /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/extend-due-date | Extend payment due date
*CapturesApi* | [**getCapture**](docs/Api/CapturesApi.md#getcapture) | **GET** /ordermanagement/v1/orders/{order_id}/captures/{capture_id} | Get capture details
*CapturesApi* | [**getCaptures**](docs/Api/CapturesApi.md#getcaptures) | **GET** /ordermanagement/v1/orders/{order_id}/captures | List all order captures
*CapturesApi* | [**getOptionsForExtendDueDate**](docs/Api/CapturesApi.md#getoptionsforextendduedate) | **GET** /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/extend-due-date-options | List options for extension of payment due date
*CapturesApi* | [**triggerSendOut**](docs/Api/CapturesApi.md#triggersendout) | **POST** /ordermanagement/v1/orders/{order_id}/captures/{capture_id}/trigger-send-out | Send customer communication
*OrdersApi* | [**acknowledgeOrder**](docs/Api/OrdersApi.md#acknowledgeorder) | **POST** /ordermanagement/v1/orders/{order_id}/acknowledge | Acknowledge a Kustom checkout order
*OrdersApi* | [**appendOrderShippingInfo**](docs/Api/OrdersApi.md#appendordershippinginfo) | **POST** /ordermanagement/v1/orders/{order_id}/shipping-info | Add shipping information
*OrdersApi* | [**cancelOrder**](docs/Api/OrdersApi.md#cancelorder) | **POST** /ordermanagement/v1/orders/{order_id}/cancel | Cancel an order
*OrdersApi* | [**extendAuthorizationTime**](docs/Api/OrdersApi.md#extendauthorizationtime) | **POST** /ordermanagement/v1/orders/{order_id}/extend-authorization-time | Extend the authorization time
*OrdersApi* | [**getOrder**](docs/Api/OrdersApi.md#getorder) | **GET** /ordermanagement/v1/orders/{order_id} | Get order details
*OrdersApi* | [**releaseRemainingAuthorization**](docs/Api/OrdersApi.md#releaseremainingauthorization) | **POST** /ordermanagement/v1/orders/{order_id}/release-remaining-authorization | Release an authorization
*OrdersApi* | [**updateAuthorization**](docs/Api/OrdersApi.md#updateauthorization) | **PATCH** /ordermanagement/v1/orders/{order_id}/authorization | Update the order amount and order lines
*OrdersApi* | [**updateConsumerDetails**](docs/Api/OrdersApi.md#updateconsumerdetails) | **PATCH** /ordermanagement/v1/orders/{order_id}/customer-details | Update customer addresses
*OrdersApi* | [**updateMerchantReferences**](docs/Api/OrdersApi.md#updatemerchantreferences) | **PATCH** /ordermanagement/v1/orders/{order_id}/merchant-references | Update merchant references
*RefundsApi* | [**get**](docs/Api/RefundsApi.md#get) | **GET** /ordermanagement/v1/orders/{order_id}/refunds/{refund_id} | Get refund details
*RefundsApi* | [**refundOrder**](docs/Api/RefundsApi.md#refundorder) | **POST** /ordermanagement/v1/orders/{order_id}/refunds | Refund an order
## Models
- [Addon](docs/Model/Addon.md)
- [Address](docs/Model/Address.md)
- [CancelNotAllowedErrorMessage](docs/Model/CancelNotAllowedErrorMessage.md)
- [Capture](docs/Model/Capture.md)
- [CaptureNotAllowedErrorMessage](docs/Model/CaptureNotAllowedErrorMessage.md)
- [CaptureObject](docs/Model/CaptureObject.md)
- [CarrierProduct](docs/Model/CarrierProduct.md)
- [Customer](docs/Model/Customer.md)
- [ErrorMessageDto](docs/Model/ErrorMessageDto.md)
- [ExtendDueDateOptions](docs/Model/ExtendDueDateOptions.md)
- [ExtendDueDateRequest](docs/Model/ExtendDueDateRequest.md)
- [InitialPaymentMethodDto](docs/Model/InitialPaymentMethodDto.md)
- [Location](docs/Model/Location.md)
- [MerchantOrderDto](docs/Model/MerchantOrderDto.md)
- [NoSuchCaptureErrorMessage](docs/Model/NoSuchCaptureErrorMessage.md)
- [NoSuchOrderErrorMessage](docs/Model/NoSuchOrderErrorMessage.md)
- [NotAllowedErrorMessage](docs/Model/NotAllowedErrorMessage.md)
- [NotFoundErrorMessage](docs/Model/NotFoundErrorMessage.md)
- [OptionDto](docs/Model/OptionDto.md)
- [OrderLine](docs/Model/OrderLine.md)
- [ProductIdentifiers](docs/Model/ProductIdentifiers.md)
- [Refund](docs/Model/Refund.md)
- [RefundNotAllowedErrorMessage](docs/Model/RefundNotAllowedErrorMessage.md)
- [RefundObject](docs/Model/RefundObject.md)
- [SelectedShippingOptionDto](docs/Model/SelectedShippingOptionDto.md)
- [ShippingInfo](docs/Model/ShippingInfo.md)
- [Subscription](docs/Model/Subscription.md)
- [Timeslot](docs/Model/Timeslot.md)
- [UpdateAuthorization](docs/Model/UpdateAuthorization.md)
- [UpdateConsumer](docs/Model/UpdateConsumer.md)
- [UpdateMerchantReferences](docs/Model/UpdateMerchantReferences.md)
- [UpdateShippingInfo](docs/Model/UpdateShippingInfo.md)
## Authorization
Authentication schemes defined for the API:
### basicAuth
- **Type**: HTTP basic authentication
## Tests
To run the tests, use:
```bash
composer install
vendor/bin/phpunit
```
## Author
## About this package
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `1.0`
- Generator version: `7.12.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
{
"description": "The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
},
"autoload": {
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "OpenAPI\\Client\\Test\\" : "test/" }
}
}
# OpenAPI\Client\RefundsApi
All URIs are relative to https://api.klarna.com, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**get()**](RefundsApi.md#get) | **GET** /ordermanagement/v1/orders/{order_id}/refunds/{refund_id} | Get refund details |
| [**refundOrder()**](RefundsApi.md#refundOrder) | **POST** /ordermanagement/v1/orders/{order_id}/refunds | Refund an order |
## `get()`
```php
get($order_id, $refund_id): \OpenAPI\Client\Model\Refund
```
Get refund details
Get refund.
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\RefundsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string | Order id
$refund_id = 'refund_id_example'; // string | Refund id
try {
$result = $apiInstance->get($order_id, $refund_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RefundsApi->get: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **order_id** | **string**| Order id | |
| **refund_id** | **string**| Refund id | |
### Return type
[**\OpenAPI\Client\Model\Refund**](../Model/Refund.md)
### Authorization
[basicAuth](../../README.md#basicAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `refundOrder()`
```php
refundOrder($order_id, $refund_object, $klarna_idempotency_key): string
```
Refund an order
Create a refund. Read more on [Refunds](https://docs.klarna.com/payments/after-payments/order-management/manage-orders-with-the-api/refund-orders-and-manage-authorizations/)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new OpenAPI\Client\Api\RefundsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$order_id = 'order_id_example'; // string | Order id
$refund_object = new \OpenAPI\Client\Model\RefundObject(); // \OpenAPI\Client\Model\RefundObject
$klarna_idempotency_key = 'klarna_idempotency_key_example'; // string | This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters.
try {
$result = $apiInstance->refundOrder($order_id, $refund_object, $klarna_idempotency_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RefundsApi->refundOrder: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **order_id** | **string**| Order id | |
| **refund_object** | [**\OpenAPI\Client\Model\RefundObject**](../Model/RefundObject.md)| | |
| **klarna_idempotency_key** | **string**| This header will guarantee the idempotency of the operation. The key should be unique and is recommended to be a UUID version 4. Retries of requests are safe to be applied in case of errors such as network errors, socket errors and timeouts. Input values of the operation are disregarded when evaluating the idempotency of the operation, only the key matters. | [optional] |
### Return type
**string**
### Authorization
[basicAuth](../../README.md#basicAuth)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
# # Addon
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**external_id** | **string** | The ID provided by the TMS | [optional]
**price** | **int** | The price of the add-on |
**type** | **string** | The type of the add-on, e.g. sms or entry-code |
**user_input** | **string** | The text provided by the user | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Address
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**attention** | **string** | &#39;Attn.&#39; - optional parameter. | [optional]
**city** | **string** | City. | [optional]
**country** | **string** | Country. ISO 3166 alpha-2. | [optional]
**email** | **string** | E-mail address. | [optional]
**family_name** | **string** | Family name. | [optional]
**given_name** | **string** | Given name. | [optional]
**organization_name** | **string** | Organization name (if applicable). Only applicable for B2B customers. | [optional]
**phone** | **string** | Phone number. | [optional]
**postal_code** | **string** | Postcode. Validation according to [Universal Postal Union addressing system](https://www.upu.int/en/activities/addressing/postal-addressing-systems-in-member-countries.html). | [optional]
**region** | **string** | State/Region. Required for US. | [optional]
**street_address** | **string** | First line of street address. Validation according to [Universal Postal Union addressing system](https://www.upu.int/en/activities/addressing/postal-addressing-systems-in-member-countries.html) | [optional]
**street_address2** | **string** | Second line of street address. | [optional]
**title** | **string** | Title. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # CancelNotAllowedErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Capture
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
**capture_id** | **string** | The capture id. Generated when the capture is created. | [optional]
**captured_amount** | **int** | The captured amount in minor units. | [optional]
**captured_at** | **\DateTime** | The time of the capture. Specified in ISO 8601. | [optional]
**description** | **string** | Description of the capture shown to the customer. | [optional]
**klarna_reference** | **string** | Customer friendly reference id, used as a reference when communicating with the customer. | [optional]
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | List of order lines for the capture shown to the customer. | [optional]
**reference** | **string** | Internal reference to the capture which will be included in the settlement files. Max length is 255 characters. | [optional]
**refunded_amount** | **int** | Refunded amount for this capture in minor units. | [optional]
**shipping_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
**shipping_info** | [**\OpenAPI\Client\Model\ShippingInfo[]**](ShippingInfo.md) | Shipping information for this capture. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # CaptureNotAllowedErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # CaptureObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**captured_amount** | **int** | The captured amount in minor units. |
**description** | **string** | Description of the capture shown to the customer. Maximum 255 characters. | [optional]
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | Order lines for this capture. Maximum 1000 items. | [optional]
**reference** | **string** | Internal reference to the capture. This will be included in the settlement files. Max length is 255 characters. | [optional]
**shipping_delay** | **int** | Delay before the order will be shipped. Use for improving the customer experience regarding payments. This field is currently not returned when reading the order. Minimum: 0. Please note: to be able to submit values larger than 0, this has to be enabled in your merchant account. Please contact Klarna for further information. | [optional]
**shipping_info** | [**\OpenAPI\Client\Model\ShippingInfo[]**](ShippingInfo.md) | Shipping information for this capture. Maximum 500 items. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # CarrierProduct
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**identifier** | **string** | Id of carrier product | [optional]
**name** | **string** | Name of carrier product | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Customer
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**date_of_birth** | **\DateTime** | The customer date of birth. ISO 8601. | [optional]
**national_identification_number** | **string** | The customer national identification number | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # ErrorMessageDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | | [optional]
**error_code** | **string** | | [optional]
**error_messages** | **string[]** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # ExtendDueDateOptions
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**currency** | **string** | The currency for the fees. Specified in ISO 4217 format. | [optional]
**options** | [**\OpenAPI\Client\Model\OptionDto[]**](OptionDto.md) | The available options and corresponding fees for extending the due date | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # ExtendDueDateRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**number_of_days** | **int** | Number of days to extend the due date. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # InitialPaymentMethodDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **string** | The description of the initial payment method. | [optional]
**number_of_installments** | **int** | The number of installments (if applicable). | [optional]
**type** | **string** | The type of the initial payment method. One of ACCOUNT, ALTERNATIVE_PAYMENT_METHOD, BANK_TRANSFER, CARD, DEFERRED_INTEREST, DIRECT_DEBIT, FIXED_AMOUNT_BY_CARD, FIXED_AMOUNT, FIXED_SUM_CREDIT, INVOICE_BUSINESS, INVOICE, MOBILEPAY, PAY_BY_CARD, PAY_IN_X, PAY_LATER_BY_CARD, PAY_LATER_IN_PARTS, SWISH, OTHER | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Location
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
**id** | **string** | The location id | [optional]
**name** | **string** | The display name of the location | [optional]
**price** | **int** | The price for this location | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # MerchantOrderDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**billing_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
**captured_amount** | **int** | The total amount of all captures. In minor units. | [optional]
**captures** | [**\OpenAPI\Client\Model\Capture[]**](Capture.md) | List of captures for this order. | [optional]
**created_at** | **\DateTime** | The time for the purchase. Formatted according to ISO 8601. | [optional]
**customer** | [**\OpenAPI\Client\Model\Customer**](Customer.md) | | [optional]
**expires_at** | **\DateTime** | Order expiration time. The order can only be captured until this time. Formatted according to ISO 8601. | [optional]
**fraud_status** | **string** | Fraud status for the order. Either ACCEPTED, PENDING or REJECTED. | [optional]
**initial_payment_method** | [**\OpenAPI\Client\Model\InitialPaymentMethodDto**](InitialPaymentMethodDto.md) | | [optional]
**klarna_reference** | **string** | A Klarna generated reference that is shorter than the Klarna Order Id and is used as a customer friendly reference. It is most often used as a reference when Klarna is communicating with the customer with regard to payment statuses. | [optional]
**locale** | **string** | The customers locale. Specified according to RFC 1766. | [optional]
**merchant_data** | **string** | Text field for storing data about the order. Set at order creation. | [optional]
**merchant_reference1** | **string** | The order number that the merchant should assign to the order. This is how a customer would reference the purchase they made. If supplied, it is labeled as the Order Number within post purchase communications as well as the Klarna App. | [optional]
**merchant_reference2** | **string** | Can be used to store your internal reference to the order. This is generally an internal reference number that merchants use as alternate identifier that matches their internal ERP or Order Management system. | [optional]
**order_amount** | **int** | The order amount in minor units. That is the smallest currency unit available such as cent or penny. | [optional]
**order_id** | **string** | The unique order ID. Cannot be longer than 255 characters. | [optional]
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | An array of order_line objects. Each line represents one item in the cart. | [optional]
**original_order_amount** | **int** | The original order amount. In minor units. | [optional]
**purchase_country** | **string** | The purchase country. Formatted according to ISO 3166-1 alpha-2. | [optional]
**purchase_currency** | **string** | The currency for this order. Specified in ISO 4217 format. | [optional]
**refunded_amount** | **int** | The total amount of refunded for this order. In minor units. | [optional]
**refunds** | [**\OpenAPI\Client\Model\Refund[]**](Refund.md) | List of refunds for this order. | [optional]
**remaining_authorized_amount** | **int** | The remaining authorized amount for this order. To increase the &#x60;remaining_authorized_amount&#x60; the &#x60;order_amount&#x60; needs to be increased. | [optional]
**selected_shipping_option** | [**\OpenAPI\Client\Model\SelectedShippingOptionDto**](SelectedShippingOptionDto.md) | | [optional]
**shipping_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
**shipping_info** | [**\OpenAPI\Client\Model\ShippingInfo[]**](ShippingInfo.md) | Shipping information for this order. | [optional]
**status** | **string** | The order status. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # NoSuchCaptureErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # NoSuchOrderErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # NotAllowedErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # NotFoundErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # OptionDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **int** | The fee for extending the due date this many days. In minor units. | [optional]
**number_of_days** | **int** | How many days to extend the due date with | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # OrderLine
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**image_url** | **string** | URL to an image that can be embedded in communications between Klarna and the customer. | [optional]
**merchant_data** | **string** | Data about the order line. | [optional]
**name** | **string** | Descriptive item name. |
**product_identifiers** | [**\OpenAPI\Client\Model\ProductIdentifiers**](ProductIdentifiers.md) | | [optional]
**product_url** | **string** | URL to the product that can be used in communications between Klarna and the customer. | [optional]
**quantity** | **int** | Item quantity. |
**quantity_unit** | **string** | Unit used to describe the quantity. | [optional]
**reference** | **string** | Article number, SKU, or similar identifier on the product variant level. | [optional]
**subscription** | [**\OpenAPI\Client\Model\Subscription**](Subscription.md) | | [optional]
**tax_rate** | **int** | The tax rate in percent with two implicit decimals. | [optional]
**total_amount** | **int** | Total amount including tax and discounts (&#x60;quantity * unit_price - total_discount_amount&#x60;). |
**total_discount_amount** | **int** | The discount amount in minor units. Includes tax. Example: 1200 &#x3D; $12. Max value: 200000000 | [optional]
**total_tax_amount** | **int** | The total tax amount in minor units. | [optional]
**type** | **string** | Order line type. | [optional]
**unit_price** | **int** | Unit price including tax without applying discounts in minor units. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # ProductIdentifiers
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**brand** | **string** | The product&#39;s brand name as generally recognized by consumers. If no brand is available for a product, do not supply any value. Maximum 70 characters. Example: Intel | [optional]
**category_path** | **string** | The product&#39;s category path as used in the merchant&#39;s webshop. Include the full and most detailed category and separate the segments with &#39; &gt; &#39;. Maximum 750 characters. Example: Electronics Store &gt; Computers &amp; Tablets &gt; Desktops | [optional]
**color** | **string** | Color to be shown to the end customer (max 64 characters). Example: Denim blue | [optional]
**global_trade_item_number** | **string** | The product&#39;s Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. Exclude dashes and spaces, where possible. Maximum 50 characters. Example: 735858293167 | [optional]
**manufacturer_part_number** | **string** | The product&#39;s Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible. Maximum 70 characters. Example: BOXNUC5CPYH | [optional]
**size** | **string** | Size to be shown to the end customer (max 64 characters). Example: 4 | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Refund
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**credit_invoice** | **bool** | Only relevant for B2B Orders. If the flag is set to true for an order with B2B_invoice as payment method, the customer will receive the refund as a credit invoice. | [optional]
**description** | **string** | Description of the refund shown to the customer. Max length is 255 characters. | [optional]
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines. | [optional]
**reference** | **string** | Internal reference to the refund that is also included in the settlement files. Max length is 255 characters. | [optional]
**refund_id** | **string** | The refund id. Generated when the refund is created. | [optional]
**refunded_amount** | **int** | Refunded amount in minor units. | [optional]
**refunded_at** | **\DateTime** | The time of the refund. ISO 8601. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # RefundNotAllowedErrorMessage
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**correlation_id** | **string** | Correlation id. For searching logs. | [optional]
**error_code** | **string** | Error code | [optional]
**error_messages** | **string[]** | Error messages | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # RefundObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **string** | Description of the refund shown to the customer. Max length is 255 characters. | [optional]
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines. | [optional]
**reference** | **string** | Internal reference to the refund. This will be included in the settlement files. Max length is 255 characters. | [optional]
**refunded_amount** | **int** | Refunded amount in minor units. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # SelectedShippingOptionDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**carrier** | **string** | The carrier for the selected shipping option | [optional]
**carrier_product** | [**\OpenAPI\Client\Model\CarrierProduct**](CarrierProduct.md) | | [optional]
**class** | **string** | The class of the selected shipping option | [optional]
**id** | **string** | The id of the selected shipping option as provided by the TMS | [optional]
**location** | [**\OpenAPI\Client\Model\Location**](Location.md) | | [optional]
**method** | **string** | The method of the selected shipping option | [optional]
**name** | **string** | The display name of the selected shipping option | [optional]
**price** | **int** | The price of the selected shipping option | [optional]
**selected_addons** | [**\OpenAPI\Client\Model\Addon[]**](Addon.md) | Array consisting of add-ons selected by the consumer, may be empty | [optional]
**tax_amount** | **int** | The tax amount of the selected shipping option | [optional]
**tax_rate** | **int** | The tax rate of the selected shipping option | [optional]
**timeslot** | [**\OpenAPI\Client\Model\Timeslot**](Timeslot.md) | | [optional]
**tms_reference** | **string** | The shipment_id provided by the TMS | [optional]
**type** | **string** | The type of the selected shipping option | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # ShippingInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**return_shipping_company** | **string** | Identifier of the shipping company for the return shipment. The value should be a valid SHIPPING_COMPANY from the [Carrier list](https://docs.klarna.com/payments/after-payments/order-management/more-actions/klarna-carrier-partner-list/). | [optional]
**return_tracking_number** | **string** | Tracking number for the return shipment. Maximum 100 characters. | [optional]
**return_tracking_uri** | **string** | URL where the customer can track the return shipment. Maximum 1024 characters. | [optional]
**shipping_company** | **string** | Identifier of the shipping company. The value should be a valid SHIPPING_COMPANY from the [Carrier list](https://docs.klarna.com/payments/after-payments/order-management/more-actions/klarna-carrier-partner-list/). | [optional]
**shipping_method** | **string** | Shipping method. Allowed values matches (PickUpStore|Home|BoxReg|BoxUnreg|PickUpPoint|Own|Postal|DHLPackstation|Digital|Undefined|PickUpWarehouse|ClickCollect|PalletDelivery) | [optional]
**tracking_number** | **string** | Tracking number for the shipment. Maximum 100 characters. | [optional]
**tracking_uri** | **string** | URI where the customer can track their shipment. Maximum 1024 characters. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Subscription
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**interval** | **string** | The cadence unit. Matches: DAY|WEEK|MONTH|YEAR |
**interval_count** | **int** | The number of intervals. |
**name** | **string** | The name of the subscription product. Maximum 255 characters. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # Timeslot
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cutoff** | **string** | Cutoff time for delivery | [optional]
**end** | **string** | End of the timeslot | [optional]
**id** | **string** | The timeslot id | [optional]
**price** | **int** | Price | [optional]
**start** | **string** | Start of the timeslot | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # UpdateAuthorization
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**description** | **string** | Description of the change. | [optional]
**order_amount** | **int** | The new total order amount. Minor units. |
**order_lines** | [**\OpenAPI\Client\Model\OrderLine[]**](OrderLine.md) | New set of order lines for the order. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # UpdateConsumer
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shipping_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # UpdateMerchantReferences
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**merchant_reference1** | **string** | New merchant reference 1. Old reference will be overwritten if this field is present. | [optional]
**merchant_reference2** | **string** | New merchant reference 2. Old reference will be overwritten if this field is present. | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
# # UpdateShippingInfo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shipping_info** | [**\OpenAPI\Client\Model\ShippingInfo[]**](ShippingInfo.md) | New shipping info. Maximum: 500 items. |
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
/**
* ApiException
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client;
use \Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ApiException extends Exception
{
/**
* The HTTP body of the server response either as Json or string.
*
* @var \stdClass|string|null
*/
protected $responseBody;
/**
* The HTTP header of the server response.
*
* @var string[][]|null
*/
protected $responseHeaders;
/**
* The deserialized response object
*
* @var \stdClass|string|null
*/
protected $responseObject;
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[][]|null $responseHeaders HTTP response header
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}
/**
* Gets the HTTP response header
*
* @return string[][]|null HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Gets the HTTP body of the server response either as Json or string
*
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
*/
public function getResponseBody()
{
return $this->responseBody;
}
/**
* Sets the deserialized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}
/**
* Gets the deserialized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
public function getResponseObject()
{
return $this->responseObject;
}
}
<?php
/**
* HeaderSelector
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client;
/**
* HeaderSelector Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class HeaderSelector
{
/**
* @param string[] $accept
* @param string $contentType
* @param bool $isMultipart
* @return string[]
*/
public function selectHeaders(array $accept, string $contentType, bool $isMultipart): array
{
$headers = [];
$accept = $this->selectAcceptHeader($accept);
if ($accept !== null) {
$headers['Accept'] = $accept;
}
if (!$isMultipart) {
if($contentType === '') {
$contentType = 'application/json';
}
$headers['Content-Type'] = $contentType;
}
return $headers;
}
/**
* Return the header 'Accept' based on an array of Accept provided.
*
* @param string[] $accept Array of header
*
* @return null|string Accept (e.g. application/json)
*/
private function selectAcceptHeader(array $accept): ?string
{
# filter out empty entries
$accept = array_filter($accept);
if (count($accept) === 0) {
return null;
}
# If there's only one Accept header, just use it
if (count($accept) === 1) {
return reset($accept);
}
# If none of the available Accept headers is of type "json", then just use all them
$headersWithJson = $this->selectJsonMimeList($accept);
if (count($headersWithJson) === 0) {
return implode(',', $accept);
}
# If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1,
# to give the highest priority to json-like headers - recalculating the existing ones, if needed
return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson);
}
/**
* Detects whether a string contains a valid JSON mime type
*
* @param string $searchString
* @return bool
*/
public function isJsonMime(string $searchString): bool
{
return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1;
}
/**
* Select all items from a list containing a JSON mime type
*
* @param array $mimeList
* @return array
*/
private function selectJsonMimeList(array $mimeList): array {
$jsonMimeList = [];
foreach ($mimeList as $mime) {
if($this->isJsonMime($mime)) {
$jsonMimeList[] = $mime;
}
}
return $jsonMimeList;
}
/**
* Create an Accept header string from the given "Accept" headers array, recalculating all weights
*
* @param string[] $accept Array of Accept Headers
* @param string[] $headersWithJson Array of Accept Headers of type "json"
*
* @return string "Accept" Header (e.g. "application/json, text/html; q=0.9")
*/
private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string
{
$processedHeaders = [
'withApplicationJson' => [],
'withJson' => [],
'withoutJson' => [],
];
foreach ($accept as $header) {
$headerData = $this->getHeaderAndWeight($header);
if (stripos($headerData['header'], 'application/json') === 0) {
$processedHeaders['withApplicationJson'][] = $headerData;
} elseif (in_array($header, $headersWithJson, true)) {
$processedHeaders['withJson'][] = $headerData;
} else {
$processedHeaders['withoutJson'][] = $headerData;
}
}
$acceptHeaders = [];
$currentWeight = 1000;
$hasMoreThan28Headers = count($accept) > 28;
foreach($processedHeaders as $headers) {
if (count($headers) > 0) {
$acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers);
}
}
$acceptHeaders = array_merge(...$acceptHeaders);
return implode(',', $acceptHeaders);
}
/**
* Given an Accept header, returns an associative array splitting the header and its weight
*
* @param string $header "Accept" Header
*
* @return array with the header and its weight
*/
private function getHeaderAndWeight(string $header): array
{
# matches headers with weight, splitting the header and the weight in $outputArray
if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) {
$headerData = [
'header' => $outputArray[1],
'weight' => (int)($outputArray[2] * 1000),
];
} else {
$headerData = [
'header' => trim($header),
'weight' => 1000,
];
}
return $headerData;
}
/**
* @param array[] $headers
* @param float $currentWeight
* @param bool $hasMoreThan28Headers
* @return string[] array of adjusted "Accept" headers
*/
private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array
{
usort($headers, function (array $a, array $b) {
return $b['weight'] - $a['weight'];
});
$acceptHeaders = [];
foreach ($headers as $index => $header) {
if($index > 0 && $headers[$index - 1]['weight'] > $header['weight'])
{
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
}
$weight = $currentWeight;
$acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight);
}
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
return $acceptHeaders;
}
/**
* @param string $header
* @param int $weight
* @return string
*/
private function buildAcceptHeader(string $header, int $weight): string
{
if($weight === 1000) {
return $header;
}
return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0');
}
/**
* Calculate the next weight, based on the current one.
*
* If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the
* following formula:
*
* next weight = current weight - 10 ^ (floor(log(current weight - 1)))
*
* ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) )
*
* Starting from 1000, this generates the following series:
*
* 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
*
* The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works
* if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1
* decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc.
*
* @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value)
* @param bool $hasMoreThan28Headers
* @return int
*/
public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int
{
if ($currentWeight <= 1) {
return 1;
}
if ($hasMoreThan28Headers) {
return $currentWeight - 1;
}
return $currentWeight - 10 ** floor( log10($currentWeight - 1) );
}
}
<?php
/**
* ModelInterface
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client\Model
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
/**
* Interface abstracting model access.
*
* @package OpenAPI\Client\Model
* @author OpenAPI Generator team
*/
interface ModelInterface
{
/**
* The original name of the model.
*
* @return string
*/
public function getModelName();
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes();
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats();
/**
* Array of attributes where the key is the local name, and the value is the original name
*
* @return array
*/
public static function attributeMap();
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters();
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters();
/**
* Show all the invalid properties with reasons.
*
* @return array
*/
public function listInvalidProperties();
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool
*/
public function valid();
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool;
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool;
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./lib/Api</directory>
<directory suffix=".php">./lib/Model</directory>
</include>
</coverage>
<testsuites>
<testsuite name="tests">
<directory>./test/Api</directory>
<directory>./test/Model</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
</phpunit>
<?php
/**
* CapturesApiTest
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the endpoint.
*/
namespace OpenAPI\Client\Test\Api;
use \OpenAPI\Client\Configuration;
use \OpenAPI\Client\ApiException;
use \OpenAPI\Client\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* CapturesApiTest Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CapturesApiTest extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test case for appendShippingInfo
*
* Add shipping information.
*
*/
public function testAppendShippingInfo()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for captureOrder
*
* Capture an order.
*
*/
public function testCaptureOrder()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for extendDueDate
*
* Extend payment due date.
*
*/
public function testExtendDueDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for getCapture
*
* Get capture details.
*
*/
public function testGetCapture()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for getCaptures
*
* List all order captures.
*
*/
public function testGetCaptures()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for getOptionsForExtendDueDate
*
* List options for extension of payment due date.
*
*/
public function testGetOptionsForExtendDueDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for triggerSendOut
*
* Send customer communication.
*
*/
public function testTriggerSendOut()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* OrdersApiTest
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the endpoint.
*/
namespace OpenAPI\Client\Test\Api;
use \OpenAPI\Client\Configuration;
use \OpenAPI\Client\ApiException;
use \OpenAPI\Client\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* OrdersApiTest Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class OrdersApiTest extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test case for acknowledgeOrder
*
* Acknowledge a Kustom checkout order.
*
*/
public function testAcknowledgeOrder()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for appendOrderShippingInfo
*
* Add shipping information.
*
*/
public function testAppendOrderShippingInfo()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for cancelOrder
*
* Cancel an order.
*
*/
public function testCancelOrder()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for extendAuthorizationTime
*
* Extend the authorization time.
*
*/
public function testExtendAuthorizationTime()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for getOrder
*
* Get order details.
*
*/
public function testGetOrder()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for releaseRemainingAuthorization
*
* Release an authorization.
*
*/
public function testReleaseRemainingAuthorization()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for updateAuthorization
*
* Update the order amount and order lines.
*
*/
public function testUpdateAuthorization()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for updateConsumerDetails
*
* Update customer addresses.
*
*/
public function testUpdateConsumerDetails()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for updateMerchantReferences
*
* Update merchant references.
*
*/
public function testUpdateMerchantReferences()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* RefundsApiTest
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the endpoint.
*/
namespace OpenAPI\Client\Test\Api;
use \OpenAPI\Client\Configuration;
use \OpenAPI\Client\ApiException;
use \OpenAPI\Client\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* RefundsApiTest Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class RefundsApiTest extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test case for get
*
* Get refund details.
*
*/
public function testGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for refundOrder
*
* Refund an order.
*
*/
public function testRefundOrder()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* AddonTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AddonTest Class Doc Comment
*
* @category Class
* @description Array consisting of add-ons selected by the consumer, may be empty
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AddonTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "Addon"
*/
public function testAddon()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "external_id"
*/
public function testPropertyExternalId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "price"
*/
public function testPropertyPrice()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "type"
*/
public function testPropertyType()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "user_input"
*/
public function testPropertyUserInput()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* AddressTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AddressTest Class Doc Comment
*
* @category Class
* @description Shipping address for the capture.
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AddressTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "Address"
*/
public function testAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "attention"
*/
public function testPropertyAttention()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "city"
*/
public function testPropertyCity()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "country"
*/
public function testPropertyCountry()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "email"
*/
public function testPropertyEmail()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "family_name"
*/
public function testPropertyFamilyName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "given_name"
*/
public function testPropertyGivenName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "organization_name"
*/
public function testPropertyOrganizationName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "phone"
*/
public function testPropertyPhone()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "postal_code"
*/
public function testPropertyPostalCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "region"
*/
public function testPropertyRegion()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "street_address"
*/
public function testPropertyStreetAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "street_address2"
*/
public function testPropertyStreetAddress2()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "title"
*/
public function testPropertyTitle()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CancelNotAllowedErrorMessageTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CancelNotAllowedErrorMessageTest Class Doc Comment
*
* @category Class
* @description CancelNotAllowedErrorMessage
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CancelNotAllowedErrorMessageTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "CancelNotAllowedErrorMessage"
*/
public function testCancelNotAllowedErrorMessage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "correlation_id"
*/
public function testPropertyCorrelationId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_code"
*/
public function testPropertyErrorCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_messages"
*/
public function testPropertyErrorMessages()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CaptureNotAllowedErrorMessageTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CaptureNotAllowedErrorMessageTest Class Doc Comment
*
* @category Class
* @description CaptureNotAllowedErrorMessage
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CaptureNotAllowedErrorMessageTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "CaptureNotAllowedErrorMessage"
*/
public function testCaptureNotAllowedErrorMessage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "correlation_id"
*/
public function testPropertyCorrelationId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_code"
*/
public function testPropertyErrorCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_messages"
*/
public function testPropertyErrorMessages()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CaptureObjectTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CaptureObjectTest Class Doc Comment
*
* @category Class
* @description Capture request data
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CaptureObjectTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "CaptureObject"
*/
public function testCaptureObject()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "captured_amount"
*/
public function testPropertyCapturedAmount()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "description"
*/
public function testPropertyDescription()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "order_lines"
*/
public function testPropertyOrderLines()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "reference"
*/
public function testPropertyReference()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "shipping_delay"
*/
public function testPropertyShippingDelay()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "shipping_info"
*/
public function testPropertyShippingInfo()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CaptureTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CaptureTest Class Doc Comment
*
* @category Class
* @description Capture
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CaptureTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "Capture"
*/
public function testCapture()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "billing_address"
*/
public function testPropertyBillingAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "capture_id"
*/
public function testPropertyCaptureId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "captured_amount"
*/
public function testPropertyCapturedAmount()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "captured_at"
*/
public function testPropertyCapturedAt()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "description"
*/
public function testPropertyDescription()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "klarna_reference"
*/
public function testPropertyKlarnaReference()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "order_lines"
*/
public function testPropertyOrderLines()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "reference"
*/
public function testPropertyReference()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "refunded_amount"
*/
public function testPropertyRefundedAmount()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "shipping_address"
*/
public function testPropertyShippingAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "shipping_info"
*/
public function testPropertyShippingInfo()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CarrierProductTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CarrierProductTest Class Doc Comment
*
* @category Class
* @description The chosen timeslot of the selected shipping option
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CarrierProductTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "CarrierProduct"
*/
public function testCarrierProduct()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "identifier"
*/
public function testPropertyIdentifier()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "name"
*/
public function testPropertyName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* CustomerTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CustomerTest Class Doc Comment
*
* @category Class
* @description Information about the customer placing the order.
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CustomerTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "Customer"
*/
public function testCustomer()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "date_of_birth"
*/
public function testPropertyDateOfBirth()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "national_identification_number"
*/
public function testPropertyNationalIdentificationNumber()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* ErrorMessageDtoTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* ErrorMessageDtoTest Class Doc Comment
*
* @category Class
* @description ErrorMessageDto
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ErrorMessageDtoTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "ErrorMessageDto"
*/
public function testErrorMessageDto()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "correlation_id"
*/
public function testPropertyCorrelationId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_code"
*/
public function testPropertyErrorCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "error_messages"
*/
public function testPropertyErrorMessages()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* ExtendDueDateOptionsTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* ExtendDueDateOptionsTest Class Doc Comment
*
* @category Class
* @description ExtendDueDateOptions
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ExtendDueDateOptionsTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "ExtendDueDateOptions"
*/
public function testExtendDueDateOptions()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "currency"
*/
public function testPropertyCurrency()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "options"
*/
public function testPropertyOptions()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* ExtendDueDateRequestTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* ExtendDueDateRequestTest Class Doc Comment
*
* @category Class
* @description ExtendDueDateRequest
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ExtendDueDateRequestTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "ExtendDueDateRequest"
*/
public function testExtendDueDateRequest()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "number_of_days"
*/
public function testPropertyNumberOfDays()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
<?php
/**
* InitialPaymentMethodDtoTest
*
* PHP version 7.4
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Klarna Order Management API
*
* The Order Management API is used for handling an order after the customer has completed the purchase. It is used for all actions you need to manage your orders. Examples being: updating, capturing, reading and refunding an order. Read more on the [Order management](https://docs.klarna.com/order-management/) process.
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Please update the test case below to test the model.
*/
namespace OpenAPI\Client\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* InitialPaymentMethodDtoTest Class Doc Comment
*
* @category Class
* @description Initial payment method for this order
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InitialPaymentMethodDtoTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "InitialPaymentMethodDto"
*/
public function testInitialPaymentMethodDto()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "description"
*/
public function testPropertyDescription()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "number_of_installments"
*/
public function testPropertyNumberOfInstallments()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "type"
*/
public function testPropertyType()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment