Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 185 additions & 166 deletions openapi.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions src/Checkouts/Checkouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
class CheckoutsCreateApplePaySessionRequest
{
/**
* the context to create this apple pay session.
* Hostname of the website displaying the Apple Pay payment sheet, without a URL scheme or path. Use the domain registered for Apple Pay.
*
* @var string
*/
public string $context;

/**
* The target url to create this apple pay session.
* Apple Pay validation URL received as `validationURL` in the browser's `onvalidatemerchant` event.
*
* @var string
*/
Expand Down Expand Up @@ -107,7 +107,7 @@ class CheckoutsListAvailablePaymentMethodsResponseItem
class CheckoutsListParams
{
/**
* Filters the list of checkout resources by the unique reference of the checkout.
* Filters checkouts by the merchant-defined `checkout_reference` supplied when creating the checkout. This is separate from the SumUp-generated checkout `id`.
*
* @var string|null
*/
Expand All @@ -123,14 +123,14 @@ class CheckoutsListParams
class CheckoutsListAvailablePaymentMethodsParams
{
/**
* The amount for which the payment methods should be eligible, in major units.
* Payment amount in major units, for example `9.99` for EUR 9.99. When filtering by `amount`, also provide `currency`.
*
* @var float|null
*/
public ?float $amount = null;

/**
* The currency for which the payment methods should be eligible.
* Three-letter ISO 4217 currency code for which the payment methods should be eligible, for example `EUR`.
*
* @var string|null
*/
Expand Down Expand Up @@ -224,7 +224,7 @@ public function create(\SumUp\Types\CheckoutCreateRequest|array $body, ?RequestO
/**
* Create an Apple Pay session
*
* @param string $checkoutId Unique identifier of the checkout resource.
* @param string $checkoutId SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.
* @param CheckoutsCreateApplePaySessionRequest|array<string, mixed>|null $body Optional request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand Down Expand Up @@ -260,7 +260,7 @@ public function createApplePaySession(string $checkoutId, CheckoutsCreateApplePa
/**
* Deactivate a checkout
*
* @param string $checkoutId Unique identifier of the checkout resource.
* @param string $checkoutId SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.
* @param RequestOptions|null $requestOptions Optional typed request options
*
* @return \SumUp\Types\Checkout
Expand All @@ -287,7 +287,7 @@ public function deactivate(string $checkoutId, ?RequestOptions $requestOptions =
/**
* Retrieve a checkout
*
* @param string $checkoutId Unique identifier of the checkout resource.
* @param string $checkoutId SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.
* @param RequestOptions|null $requestOptions Optional typed request options
*
* @return \SumUp\Types\CheckoutSuccess
Expand Down Expand Up @@ -393,7 +393,7 @@ public function listAvailablePaymentMethods(string $merchantCode, ?CheckoutsList
/**
* Process a checkout
*
* @param string $checkoutId Unique identifier of the checkout resource.
* @param string $checkoutId SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.
* @param \SumUp\Types\ProcessCheckout|array<string, mixed> $body Required request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand Down Expand Up @@ -430,7 +430,7 @@ public function process(string $checkoutId, \SumUp\Types\ProcessCheckout|array $
/**
* Update a checkout
*
* @param string $checkoutId Unique identifier of the checkout resource.
* @param string $checkoutId SumUp-generated `id` returned when creating a checkout. Use this value to retrieve, update, process, or deactivate the checkout.
* @param \SumUp\Types\CheckoutUpdateRequest|array<string, mixed> $body Required request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand Down
14 changes: 7 additions & 7 deletions src/Customers/Customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public static function fromArray(array $data): self
/**
* Class Customers
*
* Allow your regular customers to save their information with the Customers model.
* Customers represent payers in your integration. Create a customer with your own `customer_id` to associate their personal details and saved payment instruments with your business records.
*
* This will prevent re-entering payment instrument information for recurring payments on your platform.
* To save a card, create a checkout for that customer with `purpose = SETUP_RECURRING_PAYMENT`, then process it with the payer's consent and mandate details. See the [tokenization guide](https://developer.sumup.com/online-payments/guides/tokenization-with-payment-sdk/).
*
* Depending on the needs you can allow, creating, listing or deactivating payment instruments & creating, retrieving and updating customers.
* Use the Customers endpoints to create, retrieve, or update customer details and to list or deactivate saved payment instruments. For subsequent payments, process a new checkout with the saved instrument's `token` and its associated `customer_id`.
*
* @package SumUp\Services
*/
Expand Down Expand Up @@ -126,7 +126,7 @@ public function create(\SumUp\Types\Customer|array $body, ?RequestOptions $reque
/**
* Deactivate a payment instrument
*
* @param string $customerId Unique identifier of the saved customer resource.
* @param string $customerId The `customer_id` you supplied when creating the customer.
* @param string $token Unique token identifying the card saved as a payment instrument resource.
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand Down Expand Up @@ -157,7 +157,7 @@ public function deactivatePaymentInstrument(string $customerId, string $token, ?
/**
* Retrieve a customer
*
* @param string $customerId Unique identifier of the saved customer resource.
* @param string $customerId The `customer_id` you supplied when creating the customer.
* @param RequestOptions|null $requestOptions Optional typed request options
*
* @return \SumUp\Types\Customer
Expand All @@ -184,7 +184,7 @@ public function get(string $customerId, ?RequestOptions $requestOptions = null):
/**
* List payment instruments
*
* @param string $customerId Unique identifier of the saved customer resource.
* @param string $customerId The `customer_id` you supplied when creating the customer.
* @param RequestOptions|null $requestOptions Optional typed request options
*
* @return \SumUp\Types\PaymentInstrumentResponse[]
Expand Down Expand Up @@ -213,7 +213,7 @@ public function listPaymentInstruments(string $customerId, ?RequestOptions $requ
/**
* Update a customer
*
* @param string $customerId Unique identifier of the saved customer resource.
* @param string $customerId The `customer_id` you supplied when creating the customer.
* @param CustomersUpdateRequest|array<string, mixed> $body Required request payload
* @param RequestOptions|null $requestOptions Optional typed request options
*
Expand Down
10 changes: 0 additions & 10 deletions src/Members/Members.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,6 @@ class MembersListParams
*/
public ?string $userId = null;

/**
* Filter the returned members by user type. Repeat this parameter to include multiple user types.
*
* @var string[]|null
*/
public ?array $userType = null;

/**
* Filter the returned members by the membership status.
*
Expand Down Expand Up @@ -453,9 +446,6 @@ public function list(string $merchantCode, ?MembersListParams $queryParams = nul
if (isset($queryParams->userId)) {
$queryParamsData['user.id'] = $queryParams->userId;
}
if (isset($queryParams->userType)) {
$queryParamsData['user.type'] = $queryParams->userType;
}
if (isset($queryParams->status)) {
$queryParamsData['status'] = $queryParams->status;
}
Expand Down
18 changes: 14 additions & 4 deletions src/Memberships/Memberships.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,28 @@ class MembershipsListParams
*/
public ?string $resourceName = null;

/**
* Filter memberships by the ID of the resource the membership is in.
*
* @var string|null
*/
public ?string $resourceId = null;

/**
* Filter memberships by the parent of the resource the membership is in.
* When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. Pass explicit null to filter for resources without a parent.
* Omit both `resource.parent.id` and `resource.parent.type` to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.
*
* @var string|null
*/
public ?string $resourceParentId = null;

/**
* Filter memberships by the parent of the resource the membership is in.
* When filtering by parent both `resource.parent.id` and `resource.parent.type` must be present. Pass explicit null to filter for resources without a parent.
* Omit both `resource.parent.id` and `resource.parent.type` to skip parent filtering. When filtering by parent, both parameters must be present. To select resources without a parent, set each parameter to an empty value. Otherwise, both parameters must identify a parent.
*
* @var mixed|null
* @var string|null
*/
public mixed $resourceParentType = null;
public ?string $resourceParentType = null;

/**
* Filter the returned memberships by role.
Expand Down Expand Up @@ -181,6 +188,9 @@ public function list(?MembershipsListParams $queryParams = null, ?RequestOptions
if (isset($queryParams->resourceName)) {
$queryParamsData['resource.name'] = $queryParams->resourceName;
}
if (isset($queryParams->resourceId)) {
$queryParamsData['resource.id'] = $queryParams->resourceId;
}
if (isset($queryParams->resourceParentId)) {
$queryParamsData['resource.parent.id'] = $queryParams->resourceParentId;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Receipts/Receipts.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ReceiptsGetParams
/**
* Class Receipts
*
* The Receipts model obtains receipt-like details for specific transactions.
* Retrieve structured receipt data for a transaction, including payment, merchant, and acquirer details. Use this data to display a receipt in your application. The response is JSON, rather than a rendered receipt document.
*
* @package SumUp\Services
*/
Expand Down
14 changes: 7 additions & 7 deletions src/Transactions/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class TransactionsRefundRequest
{
/**
* Amount to be refunded. Eligible amount can't exceed the amount of the transaction and varies based on country and currency. If you do not specify a value, the system performs a full refund of the transaction.
* Amount to refund in major units of the transaction's currency, for example `5` for EUR 5.00. It must be greater than zero and cannot exceed the amount eligible for a refund. Eligibility depends on the transaction and country/currency rules. If omitted, the system requests a full refund.
*
* @var float|null
*/
Expand Down Expand Up @@ -122,28 +122,28 @@ class TransactionsListParams
public ?string $transactionCode = null;

/**
* Specifies the order in which the returned results are displayed.
* Sort direction for the transaction history. Use `ascending` or `descending`; the default is `ascending`.
*
* @var string|null
*/
public ?string $order = null;

/**
* Specifies the maximum number of results per page. Value must be a positive integer and if not specified, will return 10 results.
* Maximum number of transactions per page. Must be a positive integer. Defaults to `10` when omitted; a page can contain fewer results.
*
* @var int|null
*/
public ?int $limit = null;

/**
* Filters the returned results by user email.
* Filters transactions by user email. For multiple values, repeat the query parameter, for example `users[]=first@example.com&users[]=second@example.com`.
*
* @var string[]|null
*/
public ?array $usersList = null;

/**
* Filters the returned results by the specified list of final statuses of the transactions.
* Filters transactions by the listed final statuses. For multiple values, repeat the query parameter, for example `statuses[]=SUCCESSFUL&statuses[]=REFUNDED`.
*
* @var string[]|null
*/
Expand Down Expand Up @@ -185,7 +185,7 @@ class TransactionsListParams
public ?string $newestTime = null;

/**
* Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *smaller* than the specified value. This parameters supersedes the `newest_time` parameter (if both are provided in the request).
* Pagination reference that returns results before the specified reference. Use the value from a returned pagination link rather than constructing it yourself. This parameter takes precedence over `newest_time` when both are provided.
*
* @var string|null
*/
Expand All @@ -199,7 +199,7 @@ class TransactionsListParams
public ?string $oldestTime = null;

/**
* Filters the results by the reference ID of transaction events and returns only transactions with events whose IDs are *greater* than the specified value. This parameters supersedes the `oldest_time` parameter (if both are provided in the request).
* Pagination reference that returns results after the specified reference. Use the value from a returned pagination link rather than constructing it yourself. This parameter takes precedence over `oldest_time` when both are provided.
*
* @var string|null
*/
Expand Down
Loading
Loading