Skip to content

Commit 05d3ae7

Browse files
authored
Merge pull request #22 from TrueLayer/feature/PLUG-106-commands
PLUG-106: Change order placement flow and refactor
2 parents 177ad9f + 600cd40 commit 05d3ae7

File tree

93 files changed

+3475
-3131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3475
-3131
lines changed

.github/workflows/codesniffer.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

Api/Log/RepositoryInterface.php renamed to Api/Log/LogServiceInterface.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,32 @@
1111
* Log repository interface
1212
* @api
1313
*/
14-
interface RepositoryInterface
14+
interface LogServiceInterface
1515
{
16-
1716
/**
1817
* Add record to error log
1918
*
2019
* @param string $type
2120
* @param mixed $data
2221
*/
23-
public function addErrorLog(string $type, $data): void;
22+
public function error(string $type, $data): LogServiceInterface;
2423

2524
/**
2625
* Add record to debug log
2726
*
2827
* @param string $type
2928
* @param mixed $data
3029
*/
31-
public function addDebugLog(string $type, $data): void;
30+
public function debug(string $type, $data): LogServiceInterface;
31+
32+
/**
33+
* @param string|int $prefix
34+
*/
35+
public function addPrefix($prefix): LogServiceInterface;
36+
37+
/**
38+
* @param string|int $prefix
39+
* @return LogServiceInterface
40+
*/
41+
public function removePrefix($prefix): LogServiceInterface;
3242
}
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?php
2+
/**
3+
* Copyright © TrueLayer Ltd. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace TrueLayer\Connect\Api\Transaction;
9+
10+
use Magento\Framework\Api\ExtensibleDataInterface;
11+
12+
/**
13+
* Interface for transaction model
14+
* @api
15+
*/
16+
interface BaseTransactionDataInterface extends ExtensibleDataInterface
17+
{
18+
/**
19+
* Constants for keys of data array.
20+
*/
21+
public const ENTITY_ID = 'entity_id';
22+
public const ORDER_ID = 'order_id';
23+
public const STATUS = 'status';
24+
public const FAILURE_REASON = 'failure_reason';
25+
public const IS_LOCKED = 'is_locked';
26+
27+
/**
28+
* Returns the ID.
29+
*
30+
* @return int ID.
31+
*/
32+
public function getEntityId(): int;
33+
34+
/**
35+
* Returns the order ID.
36+
*
37+
* @return int|null order ID.
38+
*/
39+
public function getOrderId(): ?int;
40+
41+
/**
42+
* Sets the order ID.
43+
*
44+
* @param int $orderId
45+
* @return $this
46+
*/
47+
public function setOrderId(int $orderId): self;
48+
49+
/**
50+
* Return the payment uuid.
51+
*
52+
* @return string|null
53+
*/
54+
public function getPaymentUuid(): ?string;
55+
56+
/**
57+
* Set the payment uuid.
58+
*
59+
* @param string $value
60+
* @return $this
61+
*/
62+
public function setPaymentUuid(string $value): self;
63+
64+
/**
65+
* Return status.
66+
*
67+
* @return string|null
68+
*/
69+
public function getStatus(): ?string;
70+
71+
/**
72+
* Set status.
73+
*
74+
* @param string $status
75+
* @return $this
76+
*/
77+
public function setStatus(string $status): self;
78+
79+
/**
80+
* Get failure reason.
81+
*
82+
* @return string|null
83+
*/
84+
public function getFailureReason(): ?string;
85+
86+
/**
87+
* Set failure reason.
88+
*
89+
* @param string $failureReason
90+
* @return $this
91+
*/
92+
public function setFailureReason(string $failureReason): self;
93+
94+
/**
95+
* Return is_locked.
96+
*
97+
* @return bool
98+
*/
99+
public function getIsLocked(): bool;
100+
101+
/**
102+
* Set is_locked.
103+
*
104+
* @param bool $isLocked
105+
* @return $this
106+
*/
107+
public function setIsLocked(bool $isLocked): self;
108+
}

Api/Transaction/Data/DataInterface.php

Lines changed: 0 additions & 157 deletions
This file was deleted.

Api/Transaction/Data/SearchResultsInterface.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)