@@ -19,6 +19,7 @@ PHP Client library for Bandwidth's Phone Number Dashboard (AKA: Dashboard, Iris)
1919| 2.2.0 | Added ` csrs ` endpoints |
2020| 2.3.0 | Added ` loas ` endpoints for ImportTnOrders |
2121| 2.4.0 | Added Emergency Calling Notification, Emergeny Notification Group, Emergency Notification Endpoint, and Alternate End User Identity methods |
22+ | 2.5.0 | Added ` PortOutPasscode ` for TnOption orders |
2223
2324## Supported PHP Versions
2425
@@ -589,20 +590,77 @@ $billingReport->file(['stream' => true, 'sink' => $outFile]);
589590
590591## TN Options
591592
592- ### Create New TN Options (Async request)
593+ ### Get TN Option Orders
594+ ``` PHP
595+ $tnoptions = $account->tnoptions();
596+ $response = $tnoptions->getList();
597+ print_r($response[0]->OrderId);
598+ ```
599+
600+ ### GET TN Option Order
601+ ``` PHP
602+ $tnoptions = $account->tnoptions();
603+ $response = $tnoptions->tnoption("order_id");
604+ print_r($response->OrderCreateDate);
605+ ```
606+
607+ ### Get TN Option Order (error)
608+ ``` PHP
609+ $tnoptions = $account->tnoptions();
610+ $response = $tnoptions->tnoption("error_order_id");
611+ print_r($response->ErrorList->Error->Description); //note: Error could be an array or a single object
612+ //depending on how many errors are returned
613+ ```
614+
615+ ### Create Portout Passcode
616+ ``` PHP
617+ $tnoptions = $account->tnoptions();
618+ $data = array(
619+ "TnOptionGroups" => array(
620+ "TnOptionGroup" => array(
621+ "PortOutPasscode" => "12abd38",
622+ "TelephoneNumbers" => array(
623+ "TelephoneNumber" => "2018551020"
624+ )
625+ ),
626+ )
627+ );
628+ $response = $tnoptions->create($data);
629+ print_r($response->OrderCreateDate);
630+ ```
631+
632+ ### Create Call Forward Number
633+ ``` PHP
634+ $tnoptions = $account->tnoptions();
635+ $data = array(
636+ "TnOptionGroups" => array(
637+ "TnOptionGroup" => array(
638+ "CallForward" => "2018551022",
639+ "TelephoneNumbers" => array(
640+ "TelephoneNumber" => "2018551020"
641+ )
642+ ),
643+ )
644+ );
645+ $response = $tnoptions->create($data);
646+ print_r($response->OrderCreateDate);
647+ ```
648+
649+ ### Enable SMS
593650``` PHP
594651$tnoptions = $account->tnoptions();
595652$data = array(
596653 "TnOptionGroups" => array(
597654 "TnOptionGroup" => array(
598- "CallForward " => "< FORWARD _NUMBER > ",
655+ "Sms " => "on ",
599656 "TelephoneNumbers" => array(
600- "TelephoneNumber" => "< UPDATE _NUMBER > "
657+ "TelephoneNumber" => "2018551020 "
601658 )
602659 ),
603660 )
604661);
605- $tnoptions->create($data);
662+ $response = $tnoptions->create($data);
663+ print_r($response->OrderCreateDate);
606664```
607665
608666## Hosted Messaging Functions
0 commit comments