ruby-bandwidth-iris 2.3.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +513 -12
- data/examples/create_reservation_and_order.rb +79 -0
- data/examples/order_number.rb +83 -0
- data/lib/bandwidth-iris/aeui.rb +20 -0
- data/lib/bandwidth-iris/applications.rb +61 -0
- data/lib/bandwidth-iris/client.rb +6 -4
- data/lib/bandwidth-iris/emergency_notification_endpoints.rb +26 -0
- data/lib/bandwidth-iris/emergency_notification_groups.rb +39 -0
- data/lib/bandwidth-iris/emergency_notification_recipients.rb +37 -0
- data/lib/bandwidth-iris/order.rb +8 -0
- data/lib/bandwidth-iris/sip_peer_products.rb +118 -0
- data/lib/bandwidth-iris/tn_options.rb +26 -0
- data/lib/bandwidth-iris/tn_reservation.rb +4 -2
- data/lib/bandwidth-iris/version.rb +1 -1
- data/lib/ruby-bandwidth-iris.rb +7 -0
- data/spec/bandwidth-iris/aeui_spec.rb +25 -0
- data/spec/bandwidth-iris/application_spec.rb +90 -0
- data/spec/bandwidth-iris/emergency_notification_endpoints_spec.rb +35 -0
- data/spec/bandwidth-iris/emergency_notification_groups_spec.rb +48 -0
- data/spec/bandwidth-iris/emergency_notification_recipients_spec.rb +48 -0
- data/spec/bandwidth-iris/order_spec.rb +18 -9
- data/spec/bandwidth-iris/sip_peer_products_spec.rb +162 -0
- data/spec/bandwidth-iris/tn_options_spec.rb +42 -0
- data/spec/bandwidth-iris/tn_reservation_spec.rb +5 -5
- data/spec/xml.yml +28 -3
- metadata +25 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14a99ba0cef144d31f4fd049ccac5dd693d203ac362142530b77b2bd0ea7f880
|
4
|
+
data.tar.gz: af1a0f0090c789bcda82fab2ec87d71469229ca17eb5bd0b519a2721d4e425ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a27c0764fb56d578b5366dff2d34ca2ba067212d7a954dfb59f487df22c62a8eedb909b5364c74ef09ac589db5e0b43fde2045830cee86b6ea14d10657ee117
|
7
|
+
data.tar.gz: 4d17e5b5687f40cd2aecb138e0cac0f08e805b363e29c719bde3f7ae9ee14ef9f5347437fe8a1d37e29cea828bfe2971d59b0e06308d84da1574c8f0f557cdbc
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,14 +6,18 @@ Ruby Client library for IRIS / BBS API
|
|
6
6
|
|
7
7
|
## Release Notes
|
8
8
|
|
9
|
-
| Release Version | Notes
|
10
|
-
|
11
|
-
| 1.0.5
|
12
|
-
| 2.0.0
|
13
|
-
| 2.0.1
|
14
|
-
| 2.1.0
|
15
|
-
| 2.2.0
|
16
|
-
| 2.3.0
|
9
|
+
| Release Version | Notes |
|
10
|
+
|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
11
|
+
| 1.0.5 | Fixed incorrect generation of XML for a Disconnect request |
|
12
|
+
| 2.0.0 | Added `importTnOrders`, `removeImportedTnOrders`, `inserviceNumbers`, and `importTnChecker` endpoints. This release also changed the response body of `BandwidthIris::InServiceNumber.list()`. Please make sure to update your code to include this change. |
|
13
|
+
| 2.0.1 | Updated gem dependencies to be less restrictive |
|
14
|
+
| 2.1.0 | Added `csrs` endpoints |
|
15
|
+
| 2.2.0 | Added `loas` endpoints to `importTnOrders` |
|
16
|
+
| 2.3.0 | Added `get_tns_by_order_id` to the Orders class |
|
17
|
+
| 2.4.0.pre | Added application management and sippeer products endpoints |
|
18
|
+
| 2.5.0 | Added `get_order_response` to pull full `<OrderResponse>` object from API, added `id` back to order object on get requests. Fixed TN Reservation and updated tests to match reality |
|
19
|
+
| 2.6.0 | Added Emergency Calling Notification, Emergeny Notification Group, Emergency Notification Endpoint, and Alternate End User Identity methods |
|
20
|
+
| 2.7.0 | Added TNOptions endpoints |
|
17
21
|
|
18
22
|
## Install
|
19
23
|
|
@@ -77,6 +81,7 @@ When fetching objects from the API, it will always return an object that has the
|
|
77
81
|
instantiated so that you can call dependent methods as well as update, delete.
|
78
82
|
|
79
83
|
Example:
|
84
|
+
|
80
85
|
```ruby
|
81
86
|
site = BandwidthIris::Site.create({siteObject})
|
82
87
|
|
@@ -311,6 +316,16 @@ BandwidthIris::Order.create(order_data)
|
|
311
316
|
```ruby
|
312
317
|
order = BandwidthIris::Order.get("order_id")
|
313
318
|
```
|
319
|
+
|
320
|
+
### Get Order Response
|
321
|
+
|
322
|
+
The order response object contains more details returned in the `GET` `/orders/order-id` API.
|
323
|
+
|
324
|
+
```ruby
|
325
|
+
order = BandwidthIris::Order.get_order_response(client, "101")
|
326
|
+
completed_number = order.completed_numbers[:telephone_number][:full_number]
|
327
|
+
```
|
328
|
+
|
314
329
|
### List Orders
|
315
330
|
```ruby
|
316
331
|
BandwidthIris::Order.list(query)
|
@@ -463,7 +478,7 @@ sipPeer.delete()
|
|
463
478
|
### SipPeer TN Methods
|
464
479
|
```ruby
|
465
480
|
# get TN for this peer
|
466
|
-
sipPeer.get_tns(number)
|
481
|
+
sipPeer.get_tns(number)
|
467
482
|
|
468
483
|
# get all TNs for this peer
|
469
484
|
sipPeer.get_tns()
|
@@ -533,7 +548,7 @@ site.create_sip_peer(sipPeer)
|
|
533
548
|
```ruby
|
534
549
|
subscription = {
|
535
550
|
:order_type => "orders",
|
536
|
-
:
|
551
|
+
:callback_subscription => {
|
537
552
|
:URL => "http://mycallbackurl.com",
|
538
553
|
:user => "userid",
|
539
554
|
:expiry => 12000
|
@@ -588,7 +603,7 @@ tn.get_rate_center()
|
|
588
603
|
|
589
604
|
### Create TN Reservation
|
590
605
|
```ruby
|
591
|
-
BandwidthIris::TnReservation.create(
|
606
|
+
BandwidthIris::TnReservation.create("9195551212")
|
592
607
|
```
|
593
608
|
|
594
609
|
### Get TN Reservation
|
@@ -756,7 +771,7 @@ puts response[0][:file_name]
|
|
756
771
|
```ruby
|
757
772
|
metadata = {
|
758
773
|
:document_name => "file_name",
|
759
|
-
:document_type => "LOA"
|
774
|
+
:document_type => "LOA"
|
760
775
|
}
|
761
776
|
BandwidthIris::ImportTnOrders.update_loa_file_metadata("order_id", "file_id", metadata)
|
762
777
|
```
|
@@ -827,3 +842,489 @@ note_data = {
|
|
827
842
|
|
828
843
|
BandwidthIris::Csr.update_note("csr_id", "note_id", note_data)
|
829
844
|
```
|
845
|
+
|
846
|
+
## Application Management
|
847
|
+
|
848
|
+
### Create Application
|
849
|
+
|
850
|
+
```ruby
|
851
|
+
data = {
|
852
|
+
:service_type => "Messaging-V2",
|
853
|
+
:app_name => "Name",
|
854
|
+
:msg_callback_url => "https://test.com"
|
855
|
+
}
|
856
|
+
application = BandwidthIris::Applications.create_application(data)
|
857
|
+
puts application
|
858
|
+
```
|
859
|
+
|
860
|
+
### Get Applications
|
861
|
+
|
862
|
+
```ruby
|
863
|
+
applications = BandwidthIris::Applications.get_applications()
|
864
|
+
puts applications[0]
|
865
|
+
```
|
866
|
+
|
867
|
+
### Get An Application
|
868
|
+
|
869
|
+
```ruby
|
870
|
+
application = BandwidthIris::Applications.get_application("id")
|
871
|
+
puts application
|
872
|
+
```
|
873
|
+
|
874
|
+
### Partially Update An Application
|
875
|
+
|
876
|
+
```ruby
|
877
|
+
data = {
|
878
|
+
:app_name => "Name2"
|
879
|
+
}
|
880
|
+
application = BandwidthIris::Applications.partial_update_application("id", data)
|
881
|
+
puts application
|
882
|
+
```
|
883
|
+
|
884
|
+
### Completely Update An Application
|
885
|
+
|
886
|
+
```ruby
|
887
|
+
data = {
|
888
|
+
:service_type => "Messaging-V2",
|
889
|
+
:app_name => "Name2",
|
890
|
+
:msg_callback_url => "https://test2.com"
|
891
|
+
}
|
892
|
+
application = BandwidthIris::Applications.complete_update_application("id", data)
|
893
|
+
puts application
|
894
|
+
```
|
895
|
+
|
896
|
+
### Remove An Application
|
897
|
+
|
898
|
+
```ruby
|
899
|
+
BandwidthIris::Applications.delete_application("id")
|
900
|
+
```
|
901
|
+
|
902
|
+
### List Application Sippeers
|
903
|
+
|
904
|
+
```ruby
|
905
|
+
sippeers = BandwidthIris::Applications.get_application_sippeers("id")
|
906
|
+
puts sippeers[0]
|
907
|
+
```
|
908
|
+
|
909
|
+
## SipPeer Products
|
910
|
+
|
911
|
+
### Get Origination Settings
|
912
|
+
|
913
|
+
```ruby
|
914
|
+
puts BandwidthIris::SipPeerProducts.get_origination_settings("site_id", "sippeer_id")
|
915
|
+
```
|
916
|
+
|
917
|
+
### Create Origination Settings
|
918
|
+
|
919
|
+
```ruby
|
920
|
+
data = {
|
921
|
+
:voice_protocol => "HTTP"
|
922
|
+
}
|
923
|
+
puts BandwidthIris::SipPeerProducts.create_origination_settings("site_id", "sippeer_id", data)
|
924
|
+
```
|
925
|
+
|
926
|
+
### Update Origination Settings
|
927
|
+
|
928
|
+
```ruby
|
929
|
+
data = {
|
930
|
+
:voice_protocol => "HTTP"
|
931
|
+
}
|
932
|
+
BandwidthIris::SipPeerProducts.update_origination_settings("site_id", "sippeer_id", data)
|
933
|
+
```
|
934
|
+
|
935
|
+
### Get Termination Settings
|
936
|
+
|
937
|
+
```ruby
|
938
|
+
puts BandwidthIris::SipPeerProducts.get_termination_settings("site_id", "sippeer_id")
|
939
|
+
```
|
940
|
+
|
941
|
+
### Create Termination Settings
|
942
|
+
|
943
|
+
```ruby
|
944
|
+
data = {
|
945
|
+
:voice_protocol => "HTTP"
|
946
|
+
}
|
947
|
+
puts BandwidthIris::SipPeerProducts.create_termination_settings("site_id", "sippeer_id", data)
|
948
|
+
```
|
949
|
+
|
950
|
+
### Update Termination Settings
|
951
|
+
|
952
|
+
```ruby
|
953
|
+
data = {
|
954
|
+
:voice_protocol => "HTTP"
|
955
|
+
}
|
956
|
+
BandwidthIris::SipPeerProducts.update_termination_settings("site_id", "sippeer_id", data)
|
957
|
+
```
|
958
|
+
|
959
|
+
### Get Sms Feature Settings
|
960
|
+
|
961
|
+
```ruby
|
962
|
+
puts BandwidthIris::SipPeerProducts.get_sms_feature_settings("site_id", "sippeer_id")
|
963
|
+
```
|
964
|
+
|
965
|
+
### Create Sms Feature Settings
|
966
|
+
|
967
|
+
```ruby
|
968
|
+
data = {
|
969
|
+
:sip_peer_sms_feature_settings => {
|
970
|
+
:toll_free => true,
|
971
|
+
:protocol => "HTTP",
|
972
|
+
:zone_1 => true,
|
973
|
+
:zone_2 => false,
|
974
|
+
:zone_3 => false,
|
975
|
+
:zone_4 => false,
|
976
|
+
:zone_5 => false
|
977
|
+
},
|
978
|
+
:http_settings => {}
|
979
|
+
}
|
980
|
+
|
981
|
+
puts BandwidthIris::SipPeerProducts.create_sms_feature_settings("site_id", "sippeer_id", data)
|
982
|
+
```
|
983
|
+
|
984
|
+
### Update Sms Feature Settings
|
985
|
+
|
986
|
+
```ruby
|
987
|
+
data = {
|
988
|
+
:sip_peer_sms_feature_settings => {
|
989
|
+
:toll_free => true,
|
990
|
+
:protocol => "HTTP",
|
991
|
+
:zone_1 => true,
|
992
|
+
:zone_2 => false,
|
993
|
+
:zone_3 => false,
|
994
|
+
:zone_4 => false,
|
995
|
+
:zone_5 => false
|
996
|
+
},
|
997
|
+
:http_settings => {}
|
998
|
+
}
|
999
|
+
|
1000
|
+
puts BandwidthIris::SipPeerProducts.update_sms_feature_settings("site_id", "sippeer_id", data)
|
1001
|
+
```
|
1002
|
+
|
1003
|
+
### Delete Sms Feature Settings
|
1004
|
+
|
1005
|
+
```ruby
|
1006
|
+
BandwidthIris::SipPeerProducts.delete_sms_feature_settings("site_id", "sippeer_id")
|
1007
|
+
```
|
1008
|
+
|
1009
|
+
### Get Mms Feature Settings
|
1010
|
+
|
1011
|
+
```ruby
|
1012
|
+
puts BandwidthIris::SipPeerProducts.get_mms_feature_settings("site_id", "sippeer_id")
|
1013
|
+
```
|
1014
|
+
|
1015
|
+
### Create Mms Feature Settings
|
1016
|
+
|
1017
|
+
```ruby
|
1018
|
+
data = {
|
1019
|
+
:mms_settings => {
|
1020
|
+
:protocol => "HTTP"
|
1021
|
+
},
|
1022
|
+
:protocols => {
|
1023
|
+
:HTTP => {
|
1024
|
+
:http_settings => {}
|
1025
|
+
}
|
1026
|
+
}
|
1027
|
+
}
|
1028
|
+
|
1029
|
+
puts BandwidthIris::SipPeerProducts.create_mms_feature_settings("site_id", "sippeer_id", data)
|
1030
|
+
```
|
1031
|
+
|
1032
|
+
### Update Mms Feature Settings
|
1033
|
+
|
1034
|
+
```ruby
|
1035
|
+
data = {
|
1036
|
+
:mms_settings => {
|
1037
|
+
:protocol => "HTTP"
|
1038
|
+
},
|
1039
|
+
:protocols => {
|
1040
|
+
:HTTP => {
|
1041
|
+
:http_settings => {}
|
1042
|
+
}
|
1043
|
+
}
|
1044
|
+
}
|
1045
|
+
|
1046
|
+
BandwidthIris::SipPeerProducts.update_mms_feature_settings("site_id", "sippeer_id", data)
|
1047
|
+
```
|
1048
|
+
|
1049
|
+
### Delete Mms Feature Settings
|
1050
|
+
|
1051
|
+
```ruby
|
1052
|
+
BandwidthIris::SipPeerProducts.delete_mms_feature_settings("site_id", "sippeer_id")
|
1053
|
+
```
|
1054
|
+
|
1055
|
+
### Get Mms Feature Mms Settings
|
1056
|
+
|
1057
|
+
```ruby
|
1058
|
+
puts BandwidthIris::SipPeerProducts.get_mms_feature_mms_settings("site_id", "sippeer_id")
|
1059
|
+
```
|
1060
|
+
|
1061
|
+
### Get Messaging Application Settings
|
1062
|
+
|
1063
|
+
```ruby
|
1064
|
+
puts BandwidthIris::SipPeerProducts.get_messaging_application_settings("site_id", "sippeer_id")
|
1065
|
+
```
|
1066
|
+
|
1067
|
+
### Update Messaging Application Settings
|
1068
|
+
|
1069
|
+
```ruby
|
1070
|
+
data = {
|
1071
|
+
:http_messaging_v2_app_id => "4-d-4-8-5"
|
1072
|
+
}
|
1073
|
+
|
1074
|
+
puts BandwidthIris::SipPeerProducts.update_messaging_application_settings("site_id", "sippeer_id", data)
|
1075
|
+
```
|
1076
|
+
|
1077
|
+
### Get Messaging Settings
|
1078
|
+
|
1079
|
+
```ruby
|
1080
|
+
puts BandwidthIris::SipPeerProducts.get_messaging_settings("site_id", "sippeer_id")
|
1081
|
+
```
|
1082
|
+
|
1083
|
+
### Update Messaging Settings
|
1084
|
+
|
1085
|
+
```ruby
|
1086
|
+
data = {
|
1087
|
+
:break_out_countries => {
|
1088
|
+
:country => "CAN"
|
1089
|
+
}
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
puts BandwidthIris::SipPeerProducts.update_messaging_settings("site_id", "sippeer_id", data)
|
1093
|
+
```
|
1094
|
+
|
1095
|
+
## Emergency Notification Recipients
|
1096
|
+
|
1097
|
+
### Create Emergency Notification Recipient
|
1098
|
+
|
1099
|
+
```ruby
|
1100
|
+
data = {
|
1101
|
+
:description => "Email to Bldg. 3 Front Desk",
|
1102
|
+
:type => "EMAIL",
|
1103
|
+
:email_address => "foo@bar.com"
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
enr = BandwidthIris::EmergencyNotificationRecipients.create_emergency_notification_recipient(data)
|
1107
|
+
puts enr
|
1108
|
+
```
|
1109
|
+
### Get Emergency Notification Recipients
|
1110
|
+
|
1111
|
+
```ruby
|
1112
|
+
enrs = BandwidthIris::EmergencyNotificationRecipients.get_emergency_notification_recipients()
|
1113
|
+
puts enrs
|
1114
|
+
```
|
1115
|
+
|
1116
|
+
### Get Emergency Notification Recipient
|
1117
|
+
|
1118
|
+
```ruby
|
1119
|
+
enr = BandwidthIris::EmergencyNotificationRecipients.get_emergency_notification_recipient("id")
|
1120
|
+
puts enr
|
1121
|
+
```
|
1122
|
+
|
1123
|
+
### Replace Emergency Notification Recipient
|
1124
|
+
|
1125
|
+
```ruby
|
1126
|
+
data = {
|
1127
|
+
:description => "Email to Bldg. 3 Front Desk",
|
1128
|
+
:type => "EMAIL",
|
1129
|
+
:email_address => "foo@bar.com"
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
enr = BandwidthIris::EmergencyNotificationRecipients.replace_emergency_notification_recipient("id", data)
|
1133
|
+
puts enr
|
1134
|
+
```
|
1135
|
+
|
1136
|
+
### Delete Emergency Notification Recipient
|
1137
|
+
|
1138
|
+
```ruby
|
1139
|
+
BandwidthIris::EmergencyNotificationRecipients.delete_emergency_notification_recipient("id")
|
1140
|
+
```
|
1141
|
+
|
1142
|
+
## Emergeny Notification Group
|
1143
|
+
|
1144
|
+
### Create Emergency Notification Group Order
|
1145
|
+
|
1146
|
+
```ruby
|
1147
|
+
data = {
|
1148
|
+
:customer_order_id => "value",
|
1149
|
+
:added_emergency_notification_group => {
|
1150
|
+
:description => "description",
|
1151
|
+
:added_emergency_notification_recipients => {
|
1152
|
+
:emergency_notification_recipient => [
|
1153
|
+
{
|
1154
|
+
:identifier => "123"
|
1155
|
+
}
|
1156
|
+
]
|
1157
|
+
}
|
1158
|
+
}
|
1159
|
+
}
|
1160
|
+
|
1161
|
+
order = BandwidthIris::EmergencyNotificationGroups.create_emergency_notification_group_order(data)
|
1162
|
+
puts order
|
1163
|
+
```
|
1164
|
+
|
1165
|
+
### Get Emergency Notification Group Orders
|
1166
|
+
|
1167
|
+
```ruby
|
1168
|
+
orders = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group_orders()
|
1169
|
+
puts orders
|
1170
|
+
```
|
1171
|
+
|
1172
|
+
### Get Emergency Notification Group Order
|
1173
|
+
|
1174
|
+
```ruby
|
1175
|
+
order = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group_order("id")
|
1176
|
+
puts order
|
1177
|
+
```
|
1178
|
+
|
1179
|
+
### Get Emergency Notification Groups
|
1180
|
+
|
1181
|
+
```ruby
|
1182
|
+
groups = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_groups()
|
1183
|
+
puts groups
|
1184
|
+
```
|
1185
|
+
|
1186
|
+
### Get Emergency Notification Group
|
1187
|
+
|
1188
|
+
```ruby
|
1189
|
+
group = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group("id")
|
1190
|
+
puts group
|
1191
|
+
```
|
1192
|
+
|
1193
|
+
## Emergency Notification Endpoint
|
1194
|
+
|
1195
|
+
### Create Emergency Notification Endpoint Order
|
1196
|
+
|
1197
|
+
```ruby
|
1198
|
+
data = {
|
1199
|
+
:customer_order_id => "123",
|
1200
|
+
:emergency_notification_endpoint_associations => {
|
1201
|
+
:emergency_notification_group => {
|
1202
|
+
:identifier => "456"
|
1203
|
+
}
|
1204
|
+
}
|
1205
|
+
}
|
1206
|
+
|
1207
|
+
order = BandwidthIris::EmergencyNotificationEndpoints.create_emergency_notification_endpoint_order(data)
|
1208
|
+
puts order
|
1209
|
+
```
|
1210
|
+
|
1211
|
+
### Get Emergency Notification Endpoint Orders
|
1212
|
+
|
1213
|
+
```ruby
|
1214
|
+
orders = BandwidthIris::EmergencyNotificationEndpoints.get_emergency_notification_endpoint_orders()
|
1215
|
+
puts orders
|
1216
|
+
```
|
1217
|
+
|
1218
|
+
### Get Emergency Notification Endpoint Order
|
1219
|
+
|
1220
|
+
```ruby
|
1221
|
+
order = BandwidthIris::EmergencyNotificationEndpoints.get_emergency_notification_endpoint_order("id")
|
1222
|
+
puts order
|
1223
|
+
```
|
1224
|
+
|
1225
|
+
## Alternate End User Identiy
|
1226
|
+
|
1227
|
+
### Get Alternate End User Information
|
1228
|
+
|
1229
|
+
```ruby
|
1230
|
+
aeuis = BandwidthIris::AlternateEndUserIdentity.get_alternate_end_user_information()
|
1231
|
+
puts aeuis
|
1232
|
+
```
|
1233
|
+
|
1234
|
+
### Get Alternate Caller Information
|
1235
|
+
|
1236
|
+
```ruby
|
1237
|
+
aeui = AlternateEndUserIdentity.get_alternate_caller_information("id")
|
1238
|
+
puts aeui
|
1239
|
+
```
|
1240
|
+
|
1241
|
+
## TN Option Orders
|
1242
|
+
|
1243
|
+
### Get TN Option Orders
|
1244
|
+
|
1245
|
+
```ruby
|
1246
|
+
orders = BandwidthIris::TnOptions.get_tn_option_orders()
|
1247
|
+
puts orders
|
1248
|
+
```
|
1249
|
+
|
1250
|
+
### Get TN Option Order
|
1251
|
+
|
1252
|
+
```ruby
|
1253
|
+
order = BandwidthIris::TnOptions.get_tn_option_order("order_id")
|
1254
|
+
puts order
|
1255
|
+
```
|
1256
|
+
|
1257
|
+
### Get TN Option Order (error)
|
1258
|
+
|
1259
|
+
```ruby
|
1260
|
+
begin
|
1261
|
+
order = BandwidthIris::TnOptions.get_tn_option_order("error_id")
|
1262
|
+
rescue BandwidthIris::Errors::GenericError => e
|
1263
|
+
puts e
|
1264
|
+
end
|
1265
|
+
```
|
1266
|
+
|
1267
|
+
### Create PortOut Passcode
|
1268
|
+
|
1269
|
+
```ruby
|
1270
|
+
data = {
|
1271
|
+
:customer_order_id => "custom order",
|
1272
|
+
:tn_option_groups => {
|
1273
|
+
:tn_option_group => [
|
1274
|
+
{
|
1275
|
+
:port_out_passcode => "12abd38",
|
1276
|
+
:telephone_numbers => {
|
1277
|
+
:telephone_number => ["2018551020"]
|
1278
|
+
}
|
1279
|
+
}
|
1280
|
+
]
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
|
1284
|
+
|
1285
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1286
|
+
puts order
|
1287
|
+
```
|
1288
|
+
|
1289
|
+
### Create Call Forward Number
|
1290
|
+
|
1291
|
+
```ruby
|
1292
|
+
data = {
|
1293
|
+
:customer_order_id => "custom order",
|
1294
|
+
:tn_option_groups => {
|
1295
|
+
:tn_option_group => [
|
1296
|
+
{
|
1297
|
+
:call_forward => "2018551022",
|
1298
|
+
:telephone_numbers => {
|
1299
|
+
:telephone_number => ["2018551020"]
|
1300
|
+
}
|
1301
|
+
}
|
1302
|
+
]
|
1303
|
+
}
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
|
1307
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1308
|
+
puts order
|
1309
|
+
```
|
1310
|
+
### Enable SMS
|
1311
|
+
|
1312
|
+
```ruby
|
1313
|
+
data = {
|
1314
|
+
:customer_order_id => "custom order",
|
1315
|
+
:tn_option_groups => {
|
1316
|
+
:tn_option_group => [
|
1317
|
+
{
|
1318
|
+
:sms => "on",
|
1319
|
+
:telephone_numbers => {
|
1320
|
+
:telephone_number => ["2018551020"]
|
1321
|
+
}
|
1322
|
+
}
|
1323
|
+
]
|
1324
|
+
}
|
1325
|
+
}
|
1326
|
+
|
1327
|
+
|
1328
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1329
|
+
puts order
|
1330
|
+
```
|