Skip to content

Commit a10a1fd

Browse files
authored
Updated the portins update method to clear the ActualFocDate field (#74)
* Updated the portins update method to clear the ActualFocDate field * made sure foc was set before clearing it
1 parent 46c4b5f commit a10a1fd

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ PHP Client library for Bandwidth's Phone Number Dashboard (AKA: Dashboard, Iris)
2424
| 3.0.0 | Updated to guzzle 7. This version no longer supports verisons of PHP less than 7.2. Older versions of this package will still work on PHP versions less than 7.2 |
2525
| 3.1.0 | Added application management |
2626
| 3.2.0 | Update SipPeerTelephoneNumber to enable/disabe SMS |
27+
| 3.3.0 | Added PortOutStatus, ActualFocDate, and SPID to the portout model |
28+
| 3.3.1 | Updated the portins update method to clear the ActualFocDate field |
2729

2830
## Supported PHP Versions
2931

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Bandwidth's Iris SDK for PHP",
55
"keywords": ["iris","sdk","php"],
66
"homepage": "http://dev.bandwidth.com",
7-
"reference": "v3.1.0",
7+
"reference": "v3.3.1",
88
"license": "MIT",
99
"authors": [
1010
],

src/PortinsModel.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,17 @@ public function save() {
122122
}
123123

124124
public function update() {
125+
$set = isset($this->ActualFocDate);
126+
if ($set) {
127+
$actualFocDate = $this->ActualFocDate;
128+
$this->ActualFocDate = null; //need to clear this since the API doesn't accept this value when set
129+
}
125130
$data = parent::put($this->get_id(), "LnpOrderSupp", $this->to_array());
126131
$this->set_data($data);
132+
133+
if ($set) {
134+
$this->ActualFocDate = $actualFocDate;
135+
}
127136
}
128137

129138
public function delete() {

0 commit comments

Comments
 (0)