From d0ea171ddb022ce0a54238997a3e7b6ba3b9eb1c Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 13:33:22 -0500 Subject: [PATCH 01/13] Removed duplicate class definition --- src/simpleModels/OrderHistory.php | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/simpleModels/OrderHistory.php diff --git a/src/simpleModels/OrderHistory.php b/src/simpleModels/OrderHistory.php deleted file mode 100644 index 4e82d40..0000000 --- a/src/simpleModels/OrderHistory.php +++ /dev/null @@ -1,18 +0,0 @@ - array("type" => "string"), - "Note" => array("type" => "string"), - "Author" => array("type" => "string"), - "Status" => array("type" => "string") - ); - - public function __construct($data) { - $this->set_data($data, true); - } -} From c3ef01681129a0fb1efe91db717021dada729e31 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 13:51:53 -0500 Subject: [PATCH 02/13] Added POST /csrs function --- src/Account.php | 6 ++++++ src/simpleModels/Csr.php | 28 ++++++++++++++++++++++++++++ src/simpleModels/CsrResponse.php | 29 +++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 src/simpleModels/Csr.php create mode 100644 src/simpleModels/CsrResponse.php diff --git a/src/Account.php b/src/Account.php index 763b296..2641dd9 100644 --- a/src/Account.php +++ b/src/Account.php @@ -320,4 +320,10 @@ public function getRemoveImportedTnOrderHistory($id) { $response = parent::_get($url); return new OrderHistoryResponse($response); } + + public function createCsrOrder(Csr $order) { + $url = sprintf('%s/%s', $this->account_id, 'csrs'); + $data = parent::post($url, 'Csr', $order->to_array()); + return new CsrResponse($data); + } } diff --git a/src/simpleModels/Csr.php b/src/simpleModels/Csr.php new file mode 100644 index 0000000..8d062bb --- /dev/null +++ b/src/simpleModels/Csr.php @@ -0,0 +1,28 @@ + array("type" => "string"), + "WorkingOrBillingTelephoneNumber" => array("type" => "string"), + "AccountNumber" => array("type" => "string"), + "AccountTelephoneNumber" => array("type" => "string"), + "EndUserName" => array("type" => "string"), + "AuthorizingUserName" => array("type" => "string"), + "CustomerCode" => array("type" => "string"), + "EndUserPIN" => array("type" => "string"), + "EndUserPassword" => array("type" => "string"), + "AddressLine1" => array("type" => "string"), + "City" => array("type" => "string"), + "State" => array("type" => "string"), + "ZIPCode" => array("type" => "string"), + "TypeOfService" => array("type" => "string") + ); + + public function __construct($data) { + $this->set_data($data); + } +} diff --git a/src/simpleModels/CsrResponse.php b/src/simpleModels/CsrResponse.php new file mode 100644 index 0000000..167becc --- /dev/null +++ b/src/simpleModels/CsrResponse.php @@ -0,0 +1,29 @@ + array("type" => "string"), + "Status" => array("type" => "string"), + "AccountNumber" => array("type" => "string"), + "AccountTelephoneNumber" => array("type" => "string"), + "EndUserName" => array("type" => "string"), + "AuthorizingUserName" => array("type" => "string"), + "CustomerCode" => array("type" => "string"), + "EndUserPIN" => array("type" => "string"), + "EndUserPassword" => array("type" => "string"), + "AddressLine1" => array("type" => "string"), + "City" => array("type" => "string"), + "State" => array("type" => "string"), + "ZIPCode" => array("type" => "string"), + "TypeOfService" => array("type" => "string"), + "Errors" => array("type" => "\Iris\Error") + ); + + public function __construct($data) { + $this->set_data($data); + } +} From 342bdb807173840d0a0a01849f97e0d0a6d4b2f1 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 14:23:19 -0500 Subject: [PATCH 03/13] Added csrs/orderid endpoints --- README.md | 30 ++++++++++++++++++++++++++++++ src/Account.php | 12 ++++++++++++ src/simpleModels/Csr.php | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 759e2b5..cdb3021 100644 --- a/README.md +++ b/README.md @@ -695,3 +695,33 @@ print_r($account->getRemoveImportedTnOrder("some_id_value")->ProcessingStatus); ```PHP print_r($account->getRemoveImportedTnOrderHistory("some_id_value")->OrderHistory[0]->Status); ``` + +## CSR + +### Create CSR Order + +```PHP +$csrOrder = new \Iris\Csr(array( + "CustomerOrderId" => "order id", + "WorkingOrBillingTelephoneNumber" => "5554443333" +)); + +print_r($account->createCsrOrder(csrOrder)); +``` + +### Replace CSR Order + +```PHP +$csrOrder = new \Iris\Csr(array( + "CustomerOrderId" => "order id", + "WorkingOrBillingTelephoneNumber" => "5554443333" +)); + +print_r($account->replaceCsrOrder("order_id", csrOrder)); +``` + +### Get CSR Order + +```PHP +print_r($account->getCsrOrder("order_id")); +``` diff --git a/src/Account.php b/src/Account.php index 2641dd9..d4546d5 100644 --- a/src/Account.php +++ b/src/Account.php @@ -326,4 +326,16 @@ public function createCsrOrder(Csr $order) { $data = parent::post($url, 'Csr', $order->to_array()); return new CsrResponse($data); } + + public function getCsrOrder($id) { + $url = sprintf('%s/%s/%s', $this->account_id, 'csrs', $id); + $response = parent::_get($url); + return new CsrResponse($response); + } + + public function replaceCsrOrder($id, Csr $order) { + $url = sprintf('%s/%s/%s', $this->account_id, 'csrs', $id); + $response = parent::put($url, 'Csr', $order->to_array()); + return new CsrResponse($response); + } } diff --git a/src/simpleModels/Csr.php b/src/simpleModels/Csr.php index 8d062bb..0e4e6ab 100644 --- a/src/simpleModels/Csr.php +++ b/src/simpleModels/Csr.php @@ -19,7 +19,8 @@ class Csr { "City" => array("type" => "string"), "State" => array("type" => "string"), "ZIPCode" => array("type" => "string"), - "TypeOfService" => array("type" => "string") + "TypeOfService" => array("type" => "string"), + "Status" => array("type" => "string") ); public function __construct($data) { From 02d6372ea068eb5b0136e38e61f664437ce39332 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 14:37:03 -0500 Subject: [PATCH 04/13] Added csr notes endpoint --- README.md | 21 +++++++++++++++++++-- src/Account.php | 12 ++++++++++++ src/simpleModels/NotesList.php | 14 ++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/simpleModels/NotesList.php diff --git a/README.md b/README.md index cdb3021..be616d7 100644 --- a/README.md +++ b/README.md @@ -706,7 +706,7 @@ $csrOrder = new \Iris\Csr(array( "WorkingOrBillingTelephoneNumber" => "5554443333" )); -print_r($account->createCsrOrder(csrOrder)); +print_r($account->createCsrOrder($csrOrder)); ``` ### Replace CSR Order @@ -717,7 +717,7 @@ $csrOrder = new \Iris\Csr(array( "WorkingOrBillingTelephoneNumber" => "5554443333" )); -print_r($account->replaceCsrOrder("order_id", csrOrder)); +print_r($account->replaceCsrOrder("order_id", $csrOrder)); ``` ### Get CSR Order @@ -725,3 +725,20 @@ print_r($account->replaceCsrOrder("order_id", csrOrder)); ```PHP print_r($account->getCsrOrder("order_id")); ``` + +### Get CSR Order Notes + +```PHP +print_r($account->getCsrOrderNotes("order_id")); +``` + +### Add CSR Order Note + +```PHP +$note = new \Iris\Note(array( + "UserId" => "id", + "Description" => "description" +)); + +print_r($account->addNoteToCsr("order_id", $note)); +``` diff --git a/src/Account.php b/src/Account.php index d4546d5..840c39e 100644 --- a/src/Account.php +++ b/src/Account.php @@ -338,4 +338,16 @@ public function replaceCsrOrder($id, Csr $order) { $response = parent::put($url, 'Csr', $order->to_array()); return new CsrResponse($response); } + + public function getCsrOrderNotes($id) { + $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $id, 'notes'); + $response = parent::_get($url); + return new NotesList($response); + } + + public function addNoteToCsr($id, Note $note) { + $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $id, 'notes'); + $data = parent::post($url, 'Note', $note->to_array()); + return $data; + } } diff --git a/src/simpleModels/NotesList.php b/src/simpleModels/NotesList.php new file mode 100644 index 0000000..42fe99c --- /dev/null +++ b/src/simpleModels/NotesList.php @@ -0,0 +1,14 @@ + array("type" => "\Iris\Note") + ); + public function __construct($data) { + $this->set_data($data); + } +} From 998bc4f20c2399eb609a85f442a915e104c4e562 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 14:41:26 -0500 Subject: [PATCH 05/13] Added csr order note update --- README.md | 11 +++++++++++ src/Account.php | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index be616d7..5ef9062 100644 --- a/README.md +++ b/README.md @@ -742,3 +742,14 @@ $note = new \Iris\Note(array( print_r($account->addNoteToCsr("order_id", $note)); ``` + +### Update CSR Order Note + +```PHP +$note = new \Iris\Note(array( + "UserId" => "id", + "Description" => "description" +)); + +print_r($account->updateCsrOrderNote("order_id", "note_id", $note)); +``` diff --git a/src/Account.php b/src/Account.php index 840c39e..da3f53c 100644 --- a/src/Account.php +++ b/src/Account.php @@ -350,4 +350,10 @@ public function addNoteToCsr($id, Note $note) { $data = parent::post($url, 'Note', $note->to_array()); return $data; } + + public function updateCsrOrderNote($orderId, $noteId, Note $note) { + $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $orderId, 'notes', $noteId); + $response = parent::put($url, 'Note', $note->to_array()); + return $data; + } } From cf034f74f75e260649c8f16d0141f05f41e57c76 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 15:28:26 -0500 Subject: [PATCH 06/13] Added tests --- src/simpleModels/NotesList.php | 17 +++++- tests/AccountTest.php | 96 ++++++++++++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 1 deletion(-) diff --git a/src/simpleModels/NotesList.php b/src/simpleModels/NotesList.php index 42fe99c..bf85c4c 100644 --- a/src/simpleModels/NotesList.php +++ b/src/simpleModels/NotesList.php @@ -6,9 +6,24 @@ class NotesList { use BaseModel; protected $fields = array( - "Note" => array("type" => "\Iris\Note") + "Note" => array("type" => "\Iris\NotesListNote") ); public function __construct($data) { $this->set_data($data); } } + +class NotesListNote { + use BaseModel; + + protected $fields = array( + "Id" => array("type" => "string"), + "UserId" => array("type" => "string"), + "Description" => array("type" => "string"), + "LastDateModifier" => array("type" => "string") + ); + + public function __construct($data) { + $this->set_data($data); + } +} diff --git a/tests/AccountTest.php b/tests/AccountTest.php index 2522d8c..71512c2 100644 --- a/tests/AccountTest.php +++ b/tests/AccountTest.php @@ -137,6 +137,72 @@ public static function setUpBeforeClass() { "), + new Response(200, [], " + + 4f5b3804-3d0d-49de-a133-d4b67ad6fa11 + RECEIVED + 123456789ABC + 9196191234 + Bandwidth User + Auth Bandwidth User + 123 + 123ABC + supersecretpassword123 + 900 Main Campus Drive + Raleigh + NC + 27606 + business + "), + new Response(200, [], " + + 4f5b3804-3d0d-49de-a133-d4b67ad6fa11 + RECEIVED + 123456789ABC + 9196191234 + Bandwidth User + Auth Bandwidth User + 123 + 123ABC + supersecretpassword123 + 900 Main Campus Drive + Raleigh + NC + 27606 + business + "), + new Response(200, [], " + + 4f5b3804-3d0d-49de-a133-d4b67ad6fa11 + RECEIVED + 123456789ABC + 9196191234 + Bandwidth User + Auth Bandwidth User + 123 + 123ABC + supersecretpassword123 + 900 Main Campus Drive + Raleigh + NC + 27606 + business + "), + new Response(200, [], " + + + 87037 + jbm + This is a test note + 2014-11-16T04:01:10.000Z + + + 87039 + smckinnon + This is a second test note + 2014-11-16T04:08:46.000Z + + "), ]); self::$container = []; @@ -392,4 +458,34 @@ public function testCheckTnsPortability() { self::$index++; } + + public function testCreateCsrOrder() { + $request = new \Iris\Csr(array()); + $response = self::$account->createCsrOrder($request); + + $this->assertEquals("4f5b3804-3d0d-49de-a133-d4b67ad6fa11", $response->OrderId); + self::$index++; + } + + public function testGetCsrOrder() { + $response = self::$account->getCsrOrder("id"); + $this->assertEquals("4f5b3804-3d0d-49de-a133-d4b67ad6fa11", $response->OrderId); + self::$index++; + } + + public function testReplaceCsrOrder() { + $request = new \Iris\Csr(array()); + $response = self::$account->replaceCsrOrder("id", $request); + + $this->assertEquals("4f5b3804-3d0d-49de-a133-d4b67ad6fa11", $response->OrderId); + self::$index++; + } + + public function testGetCsrOrderNotes() { + $response = self::$account->getCsrOrderNotes("order_id", "note"); + + $this->assertEquals("This is a test note", $response->Note[0]->Description); + $this->assertEquals("This is a second test note", $response->Note[1]->Description); + self::$index++; + } } From 80ff4109ed3e41a396823e39b4cd426b19f29789 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 15:29:04 -0500 Subject: [PATCH 07/13] Updated version --- README.md | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ef9062..65cfa6b 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ PHP Client library for Bandwidth's Phone Number Dashboard (AKA: Dashboard, Iris) | 2.0.7 | Fixed error handling for Errors fields | | 2.0.8 | Fixed rate center check | | 2.1.0 | Added `importTnOrders`, `removeImportedTnOrders`, `inserviceNumbers`, and `importTnChecker` endpoints | +| 2.2.0 | Added `csrs` endpoints | ## Supported PHP Versions diff --git a/composer.json b/composer.json index 2633d92..bd74f0b 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Bandwidth's Iris SDK for PHP", "keywords": ["iris","sdk","php"], "homepage": "http://dev.bandwidth.com", - "reference": "v2.1.0", + "reference": "v2.2.0", "license": "MIT", "authors": [ ], From 9efe680d32c67230d9a6a37d6bbe670cd8a32159 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Mon, 24 Feb 2020 15:41:12 -0500 Subject: [PATCH 08/13] Updated readme examples --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 65cfa6b..937e107 100644 --- a/README.md +++ b/README.md @@ -707,7 +707,8 @@ $csrOrder = new \Iris\Csr(array( "WorkingOrBillingTelephoneNumber" => "5554443333" )); -print_r($account->createCsrOrder($csrOrder)); +$response = $account->createCsrOrder($csrOrder); +print_r($response->OrderId); ``` ### Replace CSR Order @@ -718,19 +719,22 @@ $csrOrder = new \Iris\Csr(array( "WorkingOrBillingTelephoneNumber" => "5554443333" )); -print_r($account->replaceCsrOrder("order_id", $csrOrder)); +$response = $account->replaceCsrOrder("order_id", $csrOrder); +print_r($response->OrderId); ``` ### Get CSR Order ```PHP -print_r($account->getCsrOrder("order_id")); +$response = $account->getCsrOrder("order_id"); +print_r($response->OrderId); ``` ### Get CSR Order Notes ```PHP -print_r($account->getCsrOrderNotes("order_id")); +$response = $account->getCsrOrderNotes("order_id"); +print_r($response->Note[0]->Description); ``` ### Add CSR Order Note @@ -741,7 +745,8 @@ $note = new \Iris\Note(array( "Description" => "description" )); -print_r($account->addNoteToCsr("order_id", $note)); +$response = $account->addNoteToCsr("order_id", $note); +print_r($response); ``` ### Update CSR Order Note @@ -752,5 +757,6 @@ $note = new \Iris\Note(array( "Description" => "description" )); -print_r($account->updateCsrOrderNote("order_id", "note_id", $note)); +$response = $account->updateCsrOrderNote("order_id", "note_id", $note); +print_r($response); ``` From 4dbfb42e0c0e7eae5108fcd78f6d3606513e2afc Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Tue, 25 Feb 2020 10:48:07 -0500 Subject: [PATCH 09/13] updated readme and notes stuff --- README.md | 6 ++---- src/Account.php | 6 +++--- src/simpleModels/{NotesList.php => CsrNote.php} | 13 +------------ src/simpleModels/CsrNotesList.php | 14 ++++++++++++++ 4 files changed, 20 insertions(+), 19 deletions(-) rename src/simpleModels/{NotesList.php => CsrNote.php} (60%) create mode 100644 src/simpleModels/CsrNotesList.php diff --git a/README.md b/README.md index 937e107..ba29b5c 100644 --- a/README.md +++ b/README.md @@ -745,8 +745,7 @@ $note = new \Iris\Note(array( "Description" => "description" )); -$response = $account->addNoteToCsr("order_id", $note); -print_r($response); +$account->addNoteToCsr("order_id", $note); ``` ### Update CSR Order Note @@ -757,6 +756,5 @@ $note = new \Iris\Note(array( "Description" => "description" )); -$response = $account->updateCsrOrderNote("order_id", "note_id", $note); -print_r($response); +$account->updateCsrOrderNote("order_id", "note_id", $note); ``` diff --git a/src/Account.php b/src/Account.php index da3f53c..d2f4020 100644 --- a/src/Account.php +++ b/src/Account.php @@ -342,16 +342,16 @@ public function replaceCsrOrder($id, Csr $order) { public function getCsrOrderNotes($id) { $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $id, 'notes'); $response = parent::_get($url); - return new NotesList($response); + return new CsrNotesList($response); } - public function addNoteToCsr($id, Note $note) { + public function addNoteToCsr($id, CsrNote $note) { $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $id, 'notes'); $data = parent::post($url, 'Note', $note->to_array()); return $data; } - public function updateCsrOrderNote($orderId, $noteId, Note $note) { + public function updateCsrOrderNote($orderId, $noteId, CsrNote $note) { $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $orderId, 'notes', $noteId); $response = parent::put($url, 'Note', $note->to_array()); return $data; diff --git a/src/simpleModels/NotesList.php b/src/simpleModels/CsrNote.php similarity index 60% rename from src/simpleModels/NotesList.php rename to src/simpleModels/CsrNote.php index bf85c4c..40832e1 100644 --- a/src/simpleModels/NotesList.php +++ b/src/simpleModels/CsrNote.php @@ -2,18 +2,7 @@ namespace Iris; -class NotesList { - use BaseModel; - - protected $fields = array( - "Note" => array("type" => "\Iris\NotesListNote") - ); - public function __construct($data) { - $this->set_data($data); - } -} - -class NotesListNote { +class CsrNote { use BaseModel; protected $fields = array( diff --git a/src/simpleModels/CsrNotesList.php b/src/simpleModels/CsrNotesList.php new file mode 100644 index 0000000..2c37130 --- /dev/null +++ b/src/simpleModels/CsrNotesList.php @@ -0,0 +1,14 @@ + array("type" => "\Iris\CsrNote") + ); + public function __construct($data) { + $this->set_data($data); + } +} From 7c43b32800231fce72832037042c5ba0538552ce Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Tue, 25 Feb 2020 10:53:27 -0500 Subject: [PATCH 10/13] Fixed readme and update note url --- README.md | 4 ++-- src/Account.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba29b5c..31a8802 100644 --- a/README.md +++ b/README.md @@ -740,7 +740,7 @@ print_r($response->Note[0]->Description); ### Add CSR Order Note ```PHP -$note = new \Iris\Note(array( +$note = new \Iris\CsrNote(array( "UserId" => "id", "Description" => "description" )); @@ -751,7 +751,7 @@ $account->addNoteToCsr("order_id", $note); ### Update CSR Order Note ```PHP -$note = new \Iris\Note(array( +$note = new \Iris\CsrNote(array( "UserId" => "id", "Description" => "description" )); diff --git a/src/Account.php b/src/Account.php index d2f4020..98beb46 100644 --- a/src/Account.php +++ b/src/Account.php @@ -352,8 +352,8 @@ public function addNoteToCsr($id, CsrNote $note) { } public function updateCsrOrderNote($orderId, $noteId, CsrNote $note) { - $url = sprintf('%s/%s/%s/%s', $this->account_id, 'csrs', $orderId, 'notes', $noteId); - $response = parent::put($url, 'Note', $note->to_array()); + $url = sprintf('%s/%s/%s/%s/%s', $this->account_id, 'csrs', $orderId, 'notes', $noteId); + $data = parent::put($url, 'Note', $note->to_array()); return $data; } } From b4f95f09c977f989cee7f5fb9d7512e905dc4119 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Tue, 25 Feb 2020 15:52:13 -0500 Subject: [PATCH 11/13] Fixed models for response --- src/simpleModels/CsrData.php | 19 +++++++++++++++++++ src/simpleModels/CsrResponse.php | 20 +++++++++++++++++++- src/simpleModels/ServiceAddress.php | 1 + 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/simpleModels/CsrData.php diff --git a/src/simpleModels/CsrData.php b/src/simpleModels/CsrData.php new file mode 100644 index 0000000..7249492 --- /dev/null +++ b/src/simpleModels/CsrData.php @@ -0,0 +1,19 @@ + array("type" => "string"), + "AccountNumber" => array("type" => "string"), + "CustomerName" => array("type" => "string"), + "ServiceAddress" => array("type" => "\Iris\ServiceAddress"), + "WorkingTelephoneNumbersOnAccount" => array("type" => "\Iris\TelephoneNumbers") + ); + + public function __construct($data) { + $this->set_data($data); + } +} diff --git a/src/simpleModels/CsrResponse.php b/src/simpleModels/CsrResponse.php index 167becc..430d75e 100644 --- a/src/simpleModels/CsrResponse.php +++ b/src/simpleModels/CsrResponse.php @@ -20,7 +20,25 @@ class CsrResponse { "State" => array("type" => "string"), "ZIPCode" => array("type" => "string"), "TypeOfService" => array("type" => "string"), - "Errors" => array("type" => "\Iris\Error") + "Errors" => array("type" => "\Iris\Error"), + "CustomerOrderId" => array("type" => "string"), + "LastModifiedBy" => array("type" => "string"), + "OrderCreateDate" => array("type" => "string"), + "AccountId" => array("type" => "string"), + "LastModifiedDate" => array("type" => "string"), + "AccountNumber" => array("type" => "string"), + "AccountTelephoneNumber" => array("type" => "string"), + "EndUserName" => array("type" => "string"), + "AuthorizingUserName" => array("type" => "string"), + "CustomerCode" => array("type" => "string"), + "EndUserPIN" => array("type" => "string"), + "EndUserPassword" => array("type" => "string"), + "AddressLine1" => array("type" => "string"), + "City" => array("type" => "string"), + "State" => array("type" => "string"), + "ZIPCode" => array("type" => "string"), + "TypeOfService" => array("type" => "string"), + "CsrData" => array("type" => "\Iris\CsrData") ); public function __construct($data) { diff --git a/src/simpleModels/ServiceAddress.php b/src/simpleModels/ServiceAddress.php index 9586b12..6bb1ea1 100644 --- a/src/simpleModels/ServiceAddress.php +++ b/src/simpleModels/ServiceAddress.php @@ -21,6 +21,7 @@ class ServiceAddress { "AddressLine2" => array("type" => "string"), "PlusFour" => array("type" => "string"), "AddressType" => array("type" => "string"), + "UnparsedAddress" => array("type" => "string") ); public function __construct($data) { From 4285a0c5db9a65d19053b96f75ad250bf20cdec9 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Tue, 25 Feb 2020 15:56:11 -0500 Subject: [PATCH 12/13] Added state to service address --- src/simpleModels/ServiceAddress.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/simpleModels/ServiceAddress.php b/src/simpleModels/ServiceAddress.php index 6bb1ea1..1deaa4b 100644 --- a/src/simpleModels/ServiceAddress.php +++ b/src/simpleModels/ServiceAddress.php @@ -10,6 +10,7 @@ class ServiceAddress { "HouseNumber" => array("type" => "string", "required" => true), "StreetName" => array("type" => "string", "required" => true), "StateCode" => array("type" => "string", "required" => true), + "State" => array("type" => "string"), "Zip" => array("type" => "string"), "Country" => array("type" => "string"), "County" => array("type" => "string"), From 71d21dfb8afa56ed584a52dd05866f968271fc24 Mon Sep 17 00:00:00 2001 From: jmulford-bandwidth Date: Tue, 25 Feb 2020 16:33:25 -0500 Subject: [PATCH 13/13] Fixed error list --- src/simpleModels/CsrResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simpleModels/CsrResponse.php b/src/simpleModels/CsrResponse.php index 430d75e..975757c 100644 --- a/src/simpleModels/CsrResponse.php +++ b/src/simpleModels/CsrResponse.php @@ -20,7 +20,7 @@ class CsrResponse { "State" => array("type" => "string"), "ZIPCode" => array("type" => "string"), "TypeOfService" => array("type" => "string"), - "Errors" => array("type" => "\Iris\Error"), + "Errors" => array("type" => "\Iris\ErrorList"), "CustomerOrderId" => array("type" => "string"), "LastModifiedBy" => array("type" => "string"), "OrderCreateDate" => array("type" => "string"),