Skip to content

Commit 89bf49f

Browse files
committed
Merge branch 'master' into 50-add-request-id-to-reply-objects
2 parents a745524 + 7f2c8e3 commit 89bf49f

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ php:
33
- '5.6'
44
- '7.1'
55
- '7.2'
6+
- '7.3'
67

78
cache:
89
directories:

src/Account/Entities/InvoiceQuery.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ class InvoiceQuery
6161
*/
6262
public $status;
6363

64+
/**
65+
* @var \DateTime
66+
*/
67+
public $date;
68+
6469
/**
6570
* InvoiceQuery constructor.
6671
*
@@ -76,6 +81,10 @@ public function __construct($item = null)
7681
? DateTime::createFromFormat(DateTime::ISO8601, $item->resolution_date)
7782
: null;
7883

84+
$date = ($item->date != null)
85+
? DateTime::createFromFormat(DateTime::ISO8601, $item->date)
86+
: null;
87+
7988
$this->id = $item->id;
8089
$this->contactId = $item->contact_id;
8190
$this->amount = $item->amount;
@@ -86,6 +95,7 @@ public function __construct($item = null)
8695
$this->contactMethod = $item->contact_method;
8796
$this->resolution = $item->resolution;
8897
$this->resolutionDate = $resolutionDate;
98+
$this->date = $date;
8999
$this->status = $item->status;
90100
}
91101
}

src/PSS/ReplyClient.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public function create($requestId, $reply)
9494
*/
9595
public function upload($replyId, $name, $content)
9696
{
97-
$name = urlencode($name);
9897
$uri = "v1/replies/$replyId/attachments/$name";
9998
$response = $this->request('POST', $uri, $content);
10099

@@ -107,7 +106,7 @@ public function upload($replyId, $name, $content)
107106
/**
108107
* Downloads an attachment
109108
*
110-
* @return \GuzzleHttp\Psr7\Stream
109+
* @return \UKFast\SDK\PSS\Entities\Download
111110
*/
112111
public function download($replyId, $name)
113112
{

tests/Account/InvoiceQueryTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function get_invoice_query_by_id()
3535
"contact_method" => "email",
3636
"resolution" => "This issue was resolved.",
3737
"resolution_date" => '2019-10-25T00:00:00+01:00',
38-
"status" => "Submitted"
38+
"status" => "Submitted",
39+
"date" => "2019-11-07T10:56:54+00:00"
3940
],
4041
"meta" => []
4142
])),
@@ -61,6 +62,7 @@ public function get_invoice_query_by_id()
6162
$this->assertEquals("This issue was resolved.", $invoiceQuery->resolution);
6263
$this->assertInstanceOf(DateTime::class, $invoiceQuery->resolutionDate);
6364
$this->assertEquals("Submitted", $invoiceQuery->status);
65+
$this->assertInstanceOf(DateTime::class, $invoiceQuery->date);
6466
}
6567

6668
/**

0 commit comments

Comments
 (0)