ruby-bandwidth-iris 3.0.0.pre → 3.0.0
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 +510 -5
- 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 +15 -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 +27 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38c4a5c4376a7f3d8ae7cd6be021bb6eba4aa4d96b58b8261070d33e4a40c6c3
|
4
|
+
data.tar.gz: 5d4eadf2dfe738a20d375fb2ca0a28a6d68f7af0f596324c15635e8e3981bfec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eef3948e858359ecfcd5242d847ce337b1c56c697c989d4d6364553fe4c533c8729826e8879d3dac70ba51a9cce282f39a1861265adaa7c3faa05f28dcb609da
|
7
|
+
data.tar.gz: 1e747a0019511bdd0c6eebb2b2366d40819cce1a17caff39d1bf73abe3c1928e00cfe4690c5cb088c84386153b255068b36e27575a654ab9dcaa0c97b08a06e8
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -13,7 +13,13 @@ Ruby Client library for IRIS / BBS API
|
|
13
13
|
| 2.0.1 | Updated gem dependencies to be less restrictive |
|
14
14
|
| 2.1.0 | Added `csrs` endpoints |
|
15
15
|
| 2.2.0 | Added `loas` endpoints to `importTnOrders` |
|
16
|
-
|
|
16
|
+
| 2.2.0 | Added `loas` endpoints to `importTnOrders` |
|
17
|
+
| 2.3.0 | Added `get_tns_by_order_id` to the Orders class |
|
18
|
+
| 2.4.0.pre | Added application management and sippeer products endpoints |
|
19
|
+
| 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 |
|
20
|
+
| 2.6.0 | Added Emergency Calling Notification, Emergeny Notification Group, Emergency Notification Endpoint, and Alternate End User Identity methods |
|
21
|
+
| 2.7.0 | Added TNOptions endpoints |
|
22
|
+
| 3.0.0 | Removed functionality that causes an error to be raised when some type of `error` field is returned in the XML body response. This change reduces the situations that cause an error to be thrown to simply be 4XX and 5XX http responses. This change was made to improve communication when an error is found. Please update your code to handle this change. |
|
17
23
|
|
18
24
|
### 3.x.x release
|
19
25
|
|
@@ -101,6 +107,7 @@ When fetching objects from the API, it will always return an object that has the
|
|
101
107
|
instantiated so that you can call dependent methods as well as update, delete.
|
102
108
|
|
103
109
|
Example:
|
110
|
+
|
104
111
|
```ruby
|
105
112
|
site = BandwidthIris::Site.create({siteObject})
|
106
113
|
|
@@ -335,6 +342,16 @@ BandwidthIris::Order.create(order_data)
|
|
335
342
|
```ruby
|
336
343
|
order = BandwidthIris::Order.get("order_id")
|
337
344
|
```
|
345
|
+
|
346
|
+
### Get Order Response
|
347
|
+
|
348
|
+
The order response object contains more details returned in the `GET` `/orders/order-id` API.
|
349
|
+
|
350
|
+
```ruby
|
351
|
+
order = BandwidthIris::Order.get_order_response(client, "101")
|
352
|
+
completed_number = order.completed_numbers[:telephone_number][:full_number]
|
353
|
+
```
|
354
|
+
|
338
355
|
### List Orders
|
339
356
|
```ruby
|
340
357
|
BandwidthIris::Order.list(query)
|
@@ -356,6 +373,8 @@ order.get_totals()
|
|
356
373
|
|
357
374
|
// get all Tns for an order
|
358
375
|
order.get_tns()
|
376
|
+
##Use the below method to grab TNs via an already existing Order ID##
|
377
|
+
BandwidthIris::Order.get_tns_by_order_id("id")
|
359
378
|
|
360
379
|
// get order history
|
361
380
|
order.get_history()
|
@@ -485,7 +504,7 @@ sipPeer.delete()
|
|
485
504
|
### SipPeer TN Methods
|
486
505
|
```ruby
|
487
506
|
# get TN for this peer
|
488
|
-
sipPeer.get_tns(number)
|
507
|
+
sipPeer.get_tns(number)
|
489
508
|
|
490
509
|
# get all TNs for this peer
|
491
510
|
sipPeer.get_tns()
|
@@ -555,7 +574,7 @@ site.create_sip_peer(sipPeer)
|
|
555
574
|
```ruby
|
556
575
|
subscription = {
|
557
576
|
:order_type => "orders",
|
558
|
-
:
|
577
|
+
:callback_subscription => {
|
559
578
|
:URL => "http://mycallbackurl.com",
|
560
579
|
:user => "userid",
|
561
580
|
:expiry => 12000
|
@@ -610,7 +629,7 @@ tn.get_rate_center()
|
|
610
629
|
|
611
630
|
### Create TN Reservation
|
612
631
|
```ruby
|
613
|
-
BandwidthIris::TnReservation.create(
|
632
|
+
BandwidthIris::TnReservation.create("9195551212")
|
614
633
|
```
|
615
634
|
|
616
635
|
### Get TN Reservation
|
@@ -778,7 +797,7 @@ puts response[0][:file_name]
|
|
778
797
|
```ruby
|
779
798
|
metadata = {
|
780
799
|
:document_name => "file_name",
|
781
|
-
:document_type => "LOA"
|
800
|
+
:document_type => "LOA"
|
782
801
|
}
|
783
802
|
BandwidthIris::ImportTnOrders.update_loa_file_metadata("order_id", "file_id", metadata)
|
784
803
|
```
|
@@ -849,3 +868,489 @@ note_data = {
|
|
849
868
|
|
850
869
|
BandwidthIris::Csr.update_note("csr_id", "note_id", note_data)
|
851
870
|
```
|
871
|
+
|
872
|
+
## Application Management
|
873
|
+
|
874
|
+
### Create Application
|
875
|
+
|
876
|
+
```ruby
|
877
|
+
data = {
|
878
|
+
:service_type => "Messaging-V2",
|
879
|
+
:app_name => "Name",
|
880
|
+
:msg_callback_url => "https://test.com"
|
881
|
+
}
|
882
|
+
application = BandwidthIris::Applications.create_application(data)
|
883
|
+
puts application
|
884
|
+
```
|
885
|
+
|
886
|
+
### Get Applications
|
887
|
+
|
888
|
+
```ruby
|
889
|
+
applications = BandwidthIris::Applications.get_applications()
|
890
|
+
puts applications[0]
|
891
|
+
```
|
892
|
+
|
893
|
+
### Get An Application
|
894
|
+
|
895
|
+
```ruby
|
896
|
+
application = BandwidthIris::Applications.get_application("id")
|
897
|
+
puts application
|
898
|
+
```
|
899
|
+
|
900
|
+
### Partially Update An Application
|
901
|
+
|
902
|
+
```ruby
|
903
|
+
data = {
|
904
|
+
:app_name => "Name2"
|
905
|
+
}
|
906
|
+
application = BandwidthIris::Applications.partial_update_application("id", data)
|
907
|
+
puts application
|
908
|
+
```
|
909
|
+
|
910
|
+
### Completely Update An Application
|
911
|
+
|
912
|
+
```ruby
|
913
|
+
data = {
|
914
|
+
:service_type => "Messaging-V2",
|
915
|
+
:app_name => "Name2",
|
916
|
+
:msg_callback_url => "https://test2.com"
|
917
|
+
}
|
918
|
+
application = BandwidthIris::Applications.complete_update_application("id", data)
|
919
|
+
puts application
|
920
|
+
```
|
921
|
+
|
922
|
+
### Remove An Application
|
923
|
+
|
924
|
+
```ruby
|
925
|
+
BandwidthIris::Applications.delete_application("id")
|
926
|
+
```
|
927
|
+
|
928
|
+
### List Application Sippeers
|
929
|
+
|
930
|
+
```ruby
|
931
|
+
sippeers = BandwidthIris::Applications.get_application_sippeers("id")
|
932
|
+
puts sippeers[0]
|
933
|
+
```
|
934
|
+
|
935
|
+
## SipPeer Products
|
936
|
+
|
937
|
+
### Get Origination Settings
|
938
|
+
|
939
|
+
```ruby
|
940
|
+
puts BandwidthIris::SipPeerProducts.get_origination_settings("site_id", "sippeer_id")
|
941
|
+
```
|
942
|
+
|
943
|
+
### Create Origination Settings
|
944
|
+
|
945
|
+
```ruby
|
946
|
+
data = {
|
947
|
+
:voice_protocol => "HTTP"
|
948
|
+
}
|
949
|
+
puts BandwidthIris::SipPeerProducts.create_origination_settings("site_id", "sippeer_id", data)
|
950
|
+
```
|
951
|
+
|
952
|
+
### Update Origination Settings
|
953
|
+
|
954
|
+
```ruby
|
955
|
+
data = {
|
956
|
+
:voice_protocol => "HTTP"
|
957
|
+
}
|
958
|
+
BandwidthIris::SipPeerProducts.update_origination_settings("site_id", "sippeer_id", data)
|
959
|
+
```
|
960
|
+
|
961
|
+
### Get Termination Settings
|
962
|
+
|
963
|
+
```ruby
|
964
|
+
puts BandwidthIris::SipPeerProducts.get_termination_settings("site_id", "sippeer_id")
|
965
|
+
```
|
966
|
+
|
967
|
+
### Create Termination Settings
|
968
|
+
|
969
|
+
```ruby
|
970
|
+
data = {
|
971
|
+
:voice_protocol => "HTTP"
|
972
|
+
}
|
973
|
+
puts BandwidthIris::SipPeerProducts.create_termination_settings("site_id", "sippeer_id", data)
|
974
|
+
```
|
975
|
+
|
976
|
+
### Update Termination Settings
|
977
|
+
|
978
|
+
```ruby
|
979
|
+
data = {
|
980
|
+
:voice_protocol => "HTTP"
|
981
|
+
}
|
982
|
+
BandwidthIris::SipPeerProducts.update_termination_settings("site_id", "sippeer_id", data)
|
983
|
+
```
|
984
|
+
|
985
|
+
### Get Sms Feature Settings
|
986
|
+
|
987
|
+
```ruby
|
988
|
+
puts BandwidthIris::SipPeerProducts.get_sms_feature_settings("site_id", "sippeer_id")
|
989
|
+
```
|
990
|
+
|
991
|
+
### Create Sms Feature Settings
|
992
|
+
|
993
|
+
```ruby
|
994
|
+
data = {
|
995
|
+
:sip_peer_sms_feature_settings => {
|
996
|
+
:toll_free => true,
|
997
|
+
:protocol => "HTTP",
|
998
|
+
:zone_1 => true,
|
999
|
+
:zone_2 => false,
|
1000
|
+
:zone_3 => false,
|
1001
|
+
:zone_4 => false,
|
1002
|
+
:zone_5 => false
|
1003
|
+
},
|
1004
|
+
:http_settings => {}
|
1005
|
+
}
|
1006
|
+
|
1007
|
+
puts BandwidthIris::SipPeerProducts.create_sms_feature_settings("site_id", "sippeer_id", data)
|
1008
|
+
```
|
1009
|
+
|
1010
|
+
### Update Sms Feature Settings
|
1011
|
+
|
1012
|
+
```ruby
|
1013
|
+
data = {
|
1014
|
+
:sip_peer_sms_feature_settings => {
|
1015
|
+
:toll_free => true,
|
1016
|
+
:protocol => "HTTP",
|
1017
|
+
:zone_1 => true,
|
1018
|
+
:zone_2 => false,
|
1019
|
+
:zone_3 => false,
|
1020
|
+
:zone_4 => false,
|
1021
|
+
:zone_5 => false
|
1022
|
+
},
|
1023
|
+
:http_settings => {}
|
1024
|
+
}
|
1025
|
+
|
1026
|
+
puts BandwidthIris::SipPeerProducts.update_sms_feature_settings("site_id", "sippeer_id", data)
|
1027
|
+
```
|
1028
|
+
|
1029
|
+
### Delete Sms Feature Settings
|
1030
|
+
|
1031
|
+
```ruby
|
1032
|
+
BandwidthIris::SipPeerProducts.delete_sms_feature_settings("site_id", "sippeer_id")
|
1033
|
+
```
|
1034
|
+
|
1035
|
+
### Get Mms Feature Settings
|
1036
|
+
|
1037
|
+
```ruby
|
1038
|
+
puts BandwidthIris::SipPeerProducts.get_mms_feature_settings("site_id", "sippeer_id")
|
1039
|
+
```
|
1040
|
+
|
1041
|
+
### Create Mms Feature Settings
|
1042
|
+
|
1043
|
+
```ruby
|
1044
|
+
data = {
|
1045
|
+
:mms_settings => {
|
1046
|
+
:protocol => "HTTP"
|
1047
|
+
},
|
1048
|
+
:protocols => {
|
1049
|
+
:HTTP => {
|
1050
|
+
:http_settings => {}
|
1051
|
+
}
|
1052
|
+
}
|
1053
|
+
}
|
1054
|
+
|
1055
|
+
puts BandwidthIris::SipPeerProducts.create_mms_feature_settings("site_id", "sippeer_id", data)
|
1056
|
+
```
|
1057
|
+
|
1058
|
+
### Update Mms Feature Settings
|
1059
|
+
|
1060
|
+
```ruby
|
1061
|
+
data = {
|
1062
|
+
:mms_settings => {
|
1063
|
+
:protocol => "HTTP"
|
1064
|
+
},
|
1065
|
+
:protocols => {
|
1066
|
+
:HTTP => {
|
1067
|
+
:http_settings => {}
|
1068
|
+
}
|
1069
|
+
}
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
BandwidthIris::SipPeerProducts.update_mms_feature_settings("site_id", "sippeer_id", data)
|
1073
|
+
```
|
1074
|
+
|
1075
|
+
### Delete Mms Feature Settings
|
1076
|
+
|
1077
|
+
```ruby
|
1078
|
+
BandwidthIris::SipPeerProducts.delete_mms_feature_settings("site_id", "sippeer_id")
|
1079
|
+
```
|
1080
|
+
|
1081
|
+
### Get Mms Feature Mms Settings
|
1082
|
+
|
1083
|
+
```ruby
|
1084
|
+
puts BandwidthIris::SipPeerProducts.get_mms_feature_mms_settings("site_id", "sippeer_id")
|
1085
|
+
```
|
1086
|
+
|
1087
|
+
### Get Messaging Application Settings
|
1088
|
+
|
1089
|
+
```ruby
|
1090
|
+
puts BandwidthIris::SipPeerProducts.get_messaging_application_settings("site_id", "sippeer_id")
|
1091
|
+
```
|
1092
|
+
|
1093
|
+
### Update Messaging Application Settings
|
1094
|
+
|
1095
|
+
```ruby
|
1096
|
+
data = {
|
1097
|
+
:http_messaging_v2_app_id => "4-d-4-8-5"
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
puts BandwidthIris::SipPeerProducts.update_messaging_application_settings("site_id", "sippeer_id", data)
|
1101
|
+
```
|
1102
|
+
|
1103
|
+
### Get Messaging Settings
|
1104
|
+
|
1105
|
+
```ruby
|
1106
|
+
puts BandwidthIris::SipPeerProducts.get_messaging_settings("site_id", "sippeer_id")
|
1107
|
+
```
|
1108
|
+
|
1109
|
+
### Update Messaging Settings
|
1110
|
+
|
1111
|
+
```ruby
|
1112
|
+
data = {
|
1113
|
+
:break_out_countries => {
|
1114
|
+
:country => "CAN"
|
1115
|
+
}
|
1116
|
+
}
|
1117
|
+
|
1118
|
+
puts BandwidthIris::SipPeerProducts.update_messaging_settings("site_id", "sippeer_id", data)
|
1119
|
+
```
|
1120
|
+
|
1121
|
+
## Emergency Notification Recipients
|
1122
|
+
|
1123
|
+
### Create 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.create_emergency_notification_recipient(data)
|
1133
|
+
puts enr
|
1134
|
+
```
|
1135
|
+
### Get Emergency Notification Recipients
|
1136
|
+
|
1137
|
+
```ruby
|
1138
|
+
enrs = BandwidthIris::EmergencyNotificationRecipients.get_emergency_notification_recipients()
|
1139
|
+
puts enrs
|
1140
|
+
```
|
1141
|
+
|
1142
|
+
### Get Emergency Notification Recipient
|
1143
|
+
|
1144
|
+
```ruby
|
1145
|
+
enr = BandwidthIris::EmergencyNotificationRecipients.get_emergency_notification_recipient("id")
|
1146
|
+
puts enr
|
1147
|
+
```
|
1148
|
+
|
1149
|
+
### Replace Emergency Notification Recipient
|
1150
|
+
|
1151
|
+
```ruby
|
1152
|
+
data = {
|
1153
|
+
:description => "Email to Bldg. 3 Front Desk",
|
1154
|
+
:type => "EMAIL",
|
1155
|
+
:email_address => "foo@bar.com"
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
enr = BandwidthIris::EmergencyNotificationRecipients.replace_emergency_notification_recipient("id", data)
|
1159
|
+
puts enr
|
1160
|
+
```
|
1161
|
+
|
1162
|
+
### Delete Emergency Notification Recipient
|
1163
|
+
|
1164
|
+
```ruby
|
1165
|
+
BandwidthIris::EmergencyNotificationRecipients.delete_emergency_notification_recipient("id")
|
1166
|
+
```
|
1167
|
+
|
1168
|
+
## Emergeny Notification Group
|
1169
|
+
|
1170
|
+
### Create Emergency Notification Group Order
|
1171
|
+
|
1172
|
+
```ruby
|
1173
|
+
data = {
|
1174
|
+
:customer_order_id => "value",
|
1175
|
+
:added_emergency_notification_group => {
|
1176
|
+
:description => "description",
|
1177
|
+
:added_emergency_notification_recipients => {
|
1178
|
+
:emergency_notification_recipient => [
|
1179
|
+
{
|
1180
|
+
:identifier => "123"
|
1181
|
+
}
|
1182
|
+
]
|
1183
|
+
}
|
1184
|
+
}
|
1185
|
+
}
|
1186
|
+
|
1187
|
+
order = BandwidthIris::EmergencyNotificationGroups.create_emergency_notification_group_order(data)
|
1188
|
+
puts order
|
1189
|
+
```
|
1190
|
+
|
1191
|
+
### Get Emergency Notification Group Orders
|
1192
|
+
|
1193
|
+
```ruby
|
1194
|
+
orders = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group_orders()
|
1195
|
+
puts orders
|
1196
|
+
```
|
1197
|
+
|
1198
|
+
### Get Emergency Notification Group Order
|
1199
|
+
|
1200
|
+
```ruby
|
1201
|
+
order = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group_order("id")
|
1202
|
+
puts order
|
1203
|
+
```
|
1204
|
+
|
1205
|
+
### Get Emergency Notification Groups
|
1206
|
+
|
1207
|
+
```ruby
|
1208
|
+
groups = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_groups()
|
1209
|
+
puts groups
|
1210
|
+
```
|
1211
|
+
|
1212
|
+
### Get Emergency Notification Group
|
1213
|
+
|
1214
|
+
```ruby
|
1215
|
+
group = BandwidthIris::EmergencyNotificationGroups.get_emergency_notification_group("id")
|
1216
|
+
puts group
|
1217
|
+
```
|
1218
|
+
|
1219
|
+
## Emergency Notification Endpoint
|
1220
|
+
|
1221
|
+
### Create Emergency Notification Endpoint Order
|
1222
|
+
|
1223
|
+
```ruby
|
1224
|
+
data = {
|
1225
|
+
:customer_order_id => "123",
|
1226
|
+
:emergency_notification_endpoint_associations => {
|
1227
|
+
:emergency_notification_group => {
|
1228
|
+
:identifier => "456"
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
order = BandwidthIris::EmergencyNotificationEndpoints.create_emergency_notification_endpoint_order(data)
|
1234
|
+
puts order
|
1235
|
+
```
|
1236
|
+
|
1237
|
+
### Get Emergency Notification Endpoint Orders
|
1238
|
+
|
1239
|
+
```ruby
|
1240
|
+
orders = BandwidthIris::EmergencyNotificationEndpoints.get_emergency_notification_endpoint_orders()
|
1241
|
+
puts orders
|
1242
|
+
```
|
1243
|
+
|
1244
|
+
### Get Emergency Notification Endpoint Order
|
1245
|
+
|
1246
|
+
```ruby
|
1247
|
+
order = BandwidthIris::EmergencyNotificationEndpoints.get_emergency_notification_endpoint_order("id")
|
1248
|
+
puts order
|
1249
|
+
```
|
1250
|
+
|
1251
|
+
## Alternate End User Identiy
|
1252
|
+
|
1253
|
+
### Get Alternate End User Information
|
1254
|
+
|
1255
|
+
```ruby
|
1256
|
+
aeuis = BandwidthIris::AlternateEndUserIdentity.get_alternate_end_user_information()
|
1257
|
+
puts aeuis
|
1258
|
+
```
|
1259
|
+
|
1260
|
+
### Get Alternate Caller Information
|
1261
|
+
|
1262
|
+
```ruby
|
1263
|
+
aeui = AlternateEndUserIdentity.get_alternate_caller_information("id")
|
1264
|
+
puts aeui
|
1265
|
+
```
|
1266
|
+
|
1267
|
+
## TN Option Orders
|
1268
|
+
|
1269
|
+
### Get TN Option Orders
|
1270
|
+
|
1271
|
+
```ruby
|
1272
|
+
orders = BandwidthIris::TnOptions.get_tn_option_orders()
|
1273
|
+
puts orders
|
1274
|
+
```
|
1275
|
+
|
1276
|
+
### Get TN Option Order
|
1277
|
+
|
1278
|
+
```ruby
|
1279
|
+
order = BandwidthIris::TnOptions.get_tn_option_order("order_id")
|
1280
|
+
puts order
|
1281
|
+
```
|
1282
|
+
|
1283
|
+
### Get TN Option Order (error)
|
1284
|
+
|
1285
|
+
```ruby
|
1286
|
+
begin
|
1287
|
+
order = BandwidthIris::TnOptions.get_tn_option_order("error_id")
|
1288
|
+
rescue BandwidthIris::Errors::GenericError => e
|
1289
|
+
puts e
|
1290
|
+
end
|
1291
|
+
```
|
1292
|
+
|
1293
|
+
### Create PortOut Passcode
|
1294
|
+
|
1295
|
+
```ruby
|
1296
|
+
data = {
|
1297
|
+
:customer_order_id => "custom order",
|
1298
|
+
:tn_option_groups => {
|
1299
|
+
:tn_option_group => [
|
1300
|
+
{
|
1301
|
+
:port_out_passcode => "12abd38",
|
1302
|
+
:telephone_numbers => {
|
1303
|
+
:telephone_number => ["2018551020"]
|
1304
|
+
}
|
1305
|
+
}
|
1306
|
+
]
|
1307
|
+
}
|
1308
|
+
}
|
1309
|
+
|
1310
|
+
|
1311
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1312
|
+
puts order
|
1313
|
+
```
|
1314
|
+
|
1315
|
+
### Create Call Forward Number
|
1316
|
+
|
1317
|
+
```ruby
|
1318
|
+
data = {
|
1319
|
+
:customer_order_id => "custom order",
|
1320
|
+
:tn_option_groups => {
|
1321
|
+
:tn_option_group => [
|
1322
|
+
{
|
1323
|
+
:call_forward => "2018551022",
|
1324
|
+
:telephone_numbers => {
|
1325
|
+
:telephone_number => ["2018551020"]
|
1326
|
+
}
|
1327
|
+
}
|
1328
|
+
]
|
1329
|
+
}
|
1330
|
+
}
|
1331
|
+
|
1332
|
+
|
1333
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1334
|
+
puts order
|
1335
|
+
```
|
1336
|
+
### Enable SMS
|
1337
|
+
|
1338
|
+
```ruby
|
1339
|
+
data = {
|
1340
|
+
:customer_order_id => "custom order",
|
1341
|
+
:tn_option_groups => {
|
1342
|
+
:tn_option_group => [
|
1343
|
+
{
|
1344
|
+
:sms => "on",
|
1345
|
+
:telephone_numbers => {
|
1346
|
+
:telephone_number => ["2018551020"]
|
1347
|
+
}
|
1348
|
+
}
|
1349
|
+
]
|
1350
|
+
}
|
1351
|
+
}
|
1352
|
+
|
1353
|
+
|
1354
|
+
order = BandwidthIris::TnOptions.create_tn_option_order(data)
|
1355
|
+
puts order
|
1356
|
+
```
|