ruby-bandwidth-iris 2.7.2 → 3.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70340caae21b6e4b0d8319b786077325096b6b04f1ac5a622767fe96ad7bb09e
4
- data.tar.gz: 5623576c45b222f71baeed210d3f0094e9375bf12b9d0607830ee62e5e4d8904
3
+ metadata.gz: db4758fe28b5dcf53dcd12d522a9651035201dd476ddb18a33d673196d8c2caf
4
+ data.tar.gz: '0285dd547fec9376e78974da0459869bb74860a2d4fef43f9d768994136e3a4e'
5
5
  SHA512:
6
- metadata.gz: e673d3832365eb1a292d8d09aad332be7c176bc2f92c4689cc396358514ac492df8d7de01596c98b6c681fdc1db21d2772f624acfec4383a76f7a023465682e4
7
- data.tar.gz: e26f1478b92be1d4637286fb6f2f4d45e4cea86349627fef0b36aca5fea491d55ee4205b91439a9e661bd4a69ede0e6e3336a80815bf641d34a4395447eafe59
6
+ metadata.gz: 3e91ce595f504a53cffecba1af770bba9ecd43849c9a5b9564f64d041d00c2352d86f405097d520cd56a672394c4f800972fa9fcfd75b06a46bcb59fba897588
7
+ data.tar.gz: 0dda080c2137fc733e5f1c338a2de61807cc569fe4ef474e7bcc1910b03437ddc81e35a39f95149d47425e2249c48d0a0de41179bb89585f245aff4c43dc1830
data/.gitignore CHANGED
@@ -10,4 +10,3 @@ coverage
10
10
  *.swo
11
11
  .yardoc
12
12
  examples/config.yml
13
- .idea/*
data/README.md CHANGED
@@ -6,18 +6,38 @@ Ruby Client library for IRIS / BBS API
6
6
 
7
7
  ## Release Notes
8
8
 
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 |
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
+ | 3.0.0.pre | 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
+
18
+ ### 3.x.x release
19
+
20
+ ```ruby
21
+ failed_import_tn_order = "some_id"
22
+ begin
23
+ response = BandwidthIris::ImportTnOrders.get_import_tn_order(failed_import_tn_order)
24
+ puts response[0]
25
+ rescue BandwidthIris::Errors::GenericError => e
26
+ puts e
27
+ end
28
+ ```
29
+
30
+ #### 2.x.x result
31
+
32
+ ```
33
+ Messaging route of External Third Party TNs is not configured.
34
+ ```
35
+
36
+ #### 3.x.x result
37
+
38
+ ```
39
+ {:customer_order_id=>"custom_id", :order_create_date=>Mon, 02 Mar 2020 20:56:48 +0000, :account_id=>123, :created_by_user=>"user", :order_id=>"0f2", :last_modified_date=>Mon, 02 Mar 2020 20:56:48 +0000, :site_id=>123, :subscriber=>{:name=>"Company INC", :service_address=>{:house_number=>123, :street_name=>"Street", :city=>"City", :state_code=>"XY", :zip=>12345, :county=>"County", :country=>"Country", :address_type=>"Service"}}, :loa_authorizing_person=>"Person", :telephone_numbers=>{:telephone_number=>"5554443333"}, :processing_status=>"FAILED", :errors=>{:error=>{:code=>19005, :description=>"Messaging route of External Third Party TNs is not configured.", :telephone_numbers=>{:telephone_number=>"5554443333"}}}, :sip_peer_id=>123}
40
+ ```
21
41
 
22
42
  ## Install
23
43
 
@@ -81,7 +101,6 @@ When fetching objects from the API, it will always return an object that has the
81
101
  instantiated so that you can call dependent methods as well as update, delete.
82
102
 
83
103
  Example:
84
-
85
104
  ```ruby
86
105
  site = BandwidthIris::Site.create({siteObject})
87
106
 
@@ -316,16 +335,6 @@ BandwidthIris::Order.create(order_data)
316
335
  ```ruby
317
336
  order = BandwidthIris::Order.get("order_id")
318
337
  ```
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
-
329
338
  ### List Orders
330
339
  ```ruby
331
340
  BandwidthIris::Order.list(query)
@@ -347,8 +356,6 @@ order.get_totals()
347
356
 
348
357
  // get all Tns for an order
349
358
  order.get_tns()
350
- ##Use the below method to grab TNs via an already existing Order ID##
351
- BandwidthIris::Order.get_tns_by_order_id("id")
352
359
 
353
360
  // get order history
354
361
  order.get_history()
@@ -478,7 +485,7 @@ sipPeer.delete()
478
485
  ### SipPeer TN Methods
479
486
  ```ruby
480
487
  # get TN for this peer
481
- sipPeer.get_tns(number)
488
+ sipPeer.get_tns(number)
482
489
 
483
490
  # get all TNs for this peer
484
491
  sipPeer.get_tns()
@@ -548,7 +555,7 @@ site.create_sip_peer(sipPeer)
548
555
  ```ruby
549
556
  subscription = {
550
557
  :order_type => "orders",
551
- :callback_subscription => {
558
+ :callback_subcription => {
552
559
  :URL => "http://mycallbackurl.com",
553
560
  :user => "userid",
554
561
  :expiry => 12000
@@ -603,7 +610,7 @@ tn.get_rate_center()
603
610
 
604
611
  ### Create TN Reservation
605
612
  ```ruby
606
- BandwidthIris::TnReservation.create("9195551212")
613
+ BandwidthIris::TnReservation.create({:reserved_tn => "9195551212"})
607
614
  ```
608
615
 
609
616
  ### Get TN Reservation
@@ -771,7 +778,7 @@ puts response[0][:file_name]
771
778
  ```ruby
772
779
  metadata = {
773
780
  :document_name => "file_name",
774
- :document_type => "LOA"
781
+ :document_type => "LOA"
775
782
  }
776
783
  BandwidthIris::ImportTnOrders.update_loa_file_metadata("order_id", "file_id", metadata)
777
784
  ```
@@ -842,489 +849,3 @@ note_data = {
842
849
 
843
850
  BandwidthIris::Csr.update_note("csr_id", "note_id", note_data)
844
851
  ```
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
- ```