phaxio 2.1.0.pre → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -17
  3. data/lib/phaxio/client.rb +2 -6
  4. data/lib/phaxio/config.rb +6 -4
  5. data/lib/phaxio/resource.rb +11 -5
  6. data/lib/phaxio/resources/account.rb +1 -1
  7. data/lib/phaxio/resources/ata.rb +85 -19
  8. data/lib/phaxio/resources/callback.rb +10 -56
  9. data/lib/phaxio/resources/fax.rb +11 -11
  10. data/lib/phaxio/resources/phax_code.rb +2 -2
  11. data/lib/phaxio/resources/phone_number.rb +31 -5
  12. data/lib/phaxio/resources/port_number.rb +42 -0
  13. data/lib/phaxio/resources/port_number_note.rb +51 -0
  14. data/lib/phaxio/resources/port_order.rb +172 -0
  15. data/lib/phaxio/resources/public/area_code.rb +1 -1
  16. data/lib/phaxio/resources/public/country.rb +1 -1
  17. data/lib/phaxio/resources/webhook.rb +65 -0
  18. data/lib/phaxio/version.rb +1 -1
  19. data/lib/phaxio.rb +12 -3
  20. data/spec/phaxio_spec.rb +7 -1
  21. data/spec/resources/account_spec.rb +1 -7
  22. data/spec/resources/ata_spec.rb +207 -0
  23. data/spec/resources/fax_spec.rb +35 -103
  24. data/spec/resources/phax_code_spec.rb +10 -44
  25. data/spec/resources/phone_number_spec.rb +19 -30
  26. data/spec/resources/port_number_note_spec.rb +33 -0
  27. data/spec/resources/port_number_spec.rb +32 -0
  28. data/spec/resources/port_order_spec.rb +76 -0
  29. data/spec/resources/public/area_code_spec.rb +1 -1
  30. data/spec/resources/public/country_spec.rb +1 -7
  31. data/spec/resources/{callback_spec.rb → webhook_spec.rb} +8 -8
  32. data/spec/spec_helper.rb +1 -0
  33. data/spec/support/{vcr_cassettes/resources/account/status.yml → cassettes/account/get.yml} +7 -9
  34. data/spec/support/cassettes/ata/add_phone_number.yml +89 -0
  35. data/spec/support/{vcr_cassettes/resources/fax/resend.yml → cassettes/ata/create.yml} +12 -13
  36. data/spec/support/cassettes/ata/delete.yml +86 -0
  37. data/spec/support/cassettes/ata/get.yml +87 -0
  38. data/spec/support/cassettes/ata/list.yml +67 -0
  39. data/spec/support/{vcr_cassettes/resources/phax_code/get_id.yml → cassettes/ata/provisioning_urls.yml} +10 -13
  40. data/spec/support/cassettes/ata/reference.yml +87 -0
  41. data/spec/support/cassettes/ata/regenerate.yml +89 -0
  42. data/spec/support/cassettes/ata/remove_phone_number.yml +130 -0
  43. data/spec/support/cassettes/ata/update.yml +89 -0
  44. data/spec/support/{vcr_cassettes/resources/fax/create_for_cancel.yml → cassettes/fax/cancel.yml} +51 -11
  45. data/spec/support/{vcr_cassettes/resources/fax/create_for_reference.yml → cassettes/fax/create.yml} +11 -13
  46. data/spec/support/{vcr_cassettes/resources/fax/create.yml → cassettes/fax/delete.yml} +49 -11
  47. data/spec/support/{vcr_cassettes/resources/fax/create_for_delete.yml → cassettes/fax/delete_file.yml} +49 -11
  48. data/spec/support/cassettes/fax/file.yml +93 -0
  49. data/spec/support/{vcr_cassettes/resources/fax/create_for_download_file.yml → cassettes/fax/get.yml} +49 -11
  50. data/spec/support/{vcr_cassettes/resources → cassettes}/fax/list.yml +5 -7
  51. data/spec/support/cassettes/fax/reference.yml +88 -0
  52. data/spec/support/{vcr_cassettes/resources/fax/create_for_delete_file.yml → cassettes/fax/resend.yml} +51 -11
  53. data/spec/support/{vcr_cassettes/resources → cassettes}/fax/test_receive.yml +7 -9
  54. data/spec/support/{vcr_cassettes/resources → cassettes}/phax_code/create.yml +8 -10
  55. data/spec/support/{vcr_cassettes/resources → cassettes}/phax_code/create_png.yml +8 -10
  56. data/spec/support/cassettes/phax_code/get_by_id.yml +86 -0
  57. data/spec/support/{vcr_cassettes/resources/phax_code/get.yml → cassettes/phax_code/get_default.yml} +8 -10
  58. data/spec/support/{vcr_cassettes/resources/phax_code/get_png.yml → cassettes/phax_code/get_default_png.yml} +8 -10
  59. data/spec/support/cassettes/phax_code/get_png_by_id.yml +90 -0
  60. data/spec/support/{vcr_cassettes/resources → cassettes}/phone_number/create.yml +8 -10
  61. data/spec/support/{vcr_cassettes/resources → cassettes}/phone_number/get.yml +10 -12
  62. data/spec/support/cassettes/phone_number/list.yml +72 -0
  63. data/spec/support/cassettes/phone_number/reference.yml +45 -0
  64. data/spec/support/cassettes/phone_number/release.yml +86 -0
  65. data/spec/support/cassettes/port_number/get.yml +88 -0
  66. data/spec/support/cassettes/port_number_note/list.yml +88 -0
  67. data/spec/support/cassettes/port_order/create.yml +48 -0
  68. data/spec/support/cassettes/port_order/get.yml +91 -0
  69. data/spec/support/cassettes/port_order/list.yml +52 -0
  70. data/spec/support/{vcr_cassettes/resources/public/area_codes → cassettes/public/area_code}/list.yml +15 -17
  71. data/spec/support/{vcr_cassettes/resources → cassettes}/public/country/list.yml +5 -7
  72. data/spec/support/vcr.rb +24 -6
  73. metadata +115 -41
  74. data/spec/support/credentials.rb +0 -7
  75. data/spec/support/vcr_cassettes/resources/fax/cancel.yml +0 -47
  76. data/spec/support/vcr_cassettes/resources/fax/create_for_get.yml +0 -50
  77. data/spec/support/vcr_cassettes/resources/fax/create_for_resend.yml +0 -50
  78. data/spec/support/vcr_cassettes/resources/fax/delete.yml +0 -45
  79. data/spec/support/vcr_cassettes/resources/fax/delete_file.yml +0 -45
  80. data/spec/support/vcr_cassettes/resources/fax/file.yml +0 -50
  81. data/spec/support/vcr_cassettes/resources/fax/get.yml +0 -45
  82. data/spec/support/vcr_cassettes/resources/fax/reference.yml +0 -45
  83. data/spec/support/vcr_cassettes/resources/phax_code/get_id_png.yml +0 -50
  84. data/spec/support/vcr_cassettes/resources/phone_number/list.yml +0 -60
  85. data/spec/support/vcr_cassettes/resources/phone_number/release.yml +0 -45
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Test+ATA
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ cache-control:
22
+ - max-age=0, private, must-revalidate
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ date:
26
+ - Wed, 19 Jan 2022 22:12:30 GMT
27
+ etag:
28
+ - W/"82571b1034afcee79226b4fcc50a748d"
29
+ server:
30
+ - nginx
31
+ strict-transport-security:
32
+ - max-age=15768000; preload
33
+ x-request-id:
34
+ - 95982f46-ea73-4e72-9093-d01dbff82bba
35
+ x-robots-tag:
36
+ - noindex, nofollow, nosnippet, noarchive
37
+ content-length:
38
+ - '328'
39
+ connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":346,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"6y552s8hr6","password":"1scqoev0h78am502"}}'
45
+ recorded_at: Wed, 19 Jan 2022 22:13:14 GMT
46
+ - request:
47
+ method: post
48
+ uri: https://api.phaxio.com/v2.1/atas/346/phone_numbers/+15558675309
49
+ body:
50
+ encoding: UTF-8
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - Faraday v1.9.3
55
+ Authorization:
56
+ - "<AUTH_HEADER>"
57
+ Content-Type:
58
+ - application/x-www-form-urlencoded
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ cache-control:
65
+ - max-age=0, private, must-revalidate
66
+ content-type:
67
+ - application/json; charset=utf-8
68
+ date:
69
+ - Wed, 19 Jan 2022 22:12:30 GMT
70
+ etag:
71
+ - W/"45b7a68a0761a863f4ece867e2665df8"
72
+ server:
73
+ - nginx
74
+ strict-transport-security:
75
+ - max-age=15768000; preload
76
+ x-request-id:
77
+ - eaf09fe8-0544-4c6b-b7a8-2384c99a22e0
78
+ x-robots-tag:
79
+ - noindex, nofollow, nosnippet, noarchive
80
+ content-length:
81
+ - '96'
82
+ connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: UTF-8
86
+ string: '{"success":true,"message":"Phone number added to ATA","data":{"phone_number":"+1
87
+ 318-225-8808"}}'
88
+ recorded_at: Wed, 19 Jan 2022 22:13:14 GMT
89
+ recorded_with: VCR 6.0.0
@@ -2,15 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://api.phaxio.com/v2.1/faxes/253964881/resend
5
+ uri: https://api.phaxio.com/v2.1/atas
6
6
  body:
7
7
  encoding: UTF-8
8
- string: ''
8
+ string: name=Test+ATA
9
9
  headers:
10
- Authorization:
11
- - Basic dGVzdC1hcGkta2V5OnRlc3QtYXBpLXNlY3JldA==
12
10
  User-Agent:
13
- - Faraday v1.3.0
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
14
  Content-Type:
15
15
  - application/x-www-form-urlencoded
16
16
  response:
@@ -23,25 +23,24 @@ http_interactions:
23
23
  content-type:
24
24
  - application/json; charset=utf-8
25
25
  date:
26
- - Wed, 24 Feb 2021 18:56:11 GMT
26
+ - Wed, 19 Jan 2022 21:51:25 GMT
27
27
  etag:
28
- - W/"c913676c758ee5ebb4cd5c50e687d644"
28
+ - W/"2240be8a677db0228884851090387d4a"
29
29
  server:
30
30
  - nginx
31
31
  strict-transport-security:
32
32
  - max-age=15768000; preload
33
33
  x-request-id:
34
- - 456e2adb-ba4c-4aa6-8319-af3f263b6e3b
34
+ - ab1cf64f-12e5-4630-8ca6-337822616937
35
35
  x-robots-tag:
36
36
  - noindex, nofollow, nosnippet, noarchive
37
- x-runtime:
38
- - '0.417675'
39
37
  content-length:
40
- - '77'
38
+ - '328'
41
39
  connection:
42
40
  - keep-alive
43
41
  body:
44
42
  encoding: UTF-8
45
- string: '{"success":true,"message":"Fax queued for resending","data":{"id":253965118}}'
46
- recorded_at: Wed, 24 Feb 2021 18:55:24 GMT
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":332,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"s5beofdgwn","password":"y6wt3q215qsec25i"}}'
45
+ recorded_at: Wed, 19 Jan 2022 21:52:09 GMT
47
46
  recorded_with: VCR 6.0.0
@@ -0,0 +1,86 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Test+ATA
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ cache-control:
22
+ - max-age=0, private, must-revalidate
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ date:
26
+ - Wed, 19 Jan 2022 22:03:49 GMT
27
+ etag:
28
+ - W/"536d2044c4783d836261ec6017185c3f"
29
+ server:
30
+ - nginx
31
+ strict-transport-security:
32
+ - max-age=15768000; preload
33
+ x-request-id:
34
+ - 1177e98e-ce7e-461e-bed7-b8068464e9bb
35
+ x-robots-tag:
36
+ - noindex, nofollow, nosnippet, noarchive
37
+ content-length:
38
+ - '328'
39
+ connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":342,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"fd16l2dg33","password":"qsfpji7yzwn9laxn"}}'
45
+ recorded_at: Wed, 19 Jan 2022 22:04:32 GMT
46
+ - request:
47
+ method: delete
48
+ uri: https://api.phaxio.com/v2.1/atas/342
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - Faraday v1.9.3
55
+ Authorization:
56
+ - "<AUTH_HEADER>"
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ cache-control:
63
+ - max-age=0, private, must-revalidate
64
+ content-type:
65
+ - application/json; charset=utf-8
66
+ date:
67
+ - Wed, 19 Jan 2022 22:03:49 GMT
68
+ etag:
69
+ - W/"b5f064faa0e68681d9afb0081d56421d"
70
+ server:
71
+ - nginx
72
+ strict-transport-security:
73
+ - max-age=15768000; preload
74
+ x-request-id:
75
+ - c3a36e16-b27d-4b23-a1e6-bac3055b216c
76
+ x-robots-tag:
77
+ - noindex, nofollow, nosnippet, noarchive
78
+ content-length:
79
+ - '71'
80
+ connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{"success":true,"message":"ATA deleted successfully","data":{"id":342}}'
85
+ recorded_at: Wed, 19 Jan 2022 22:04:33 GMT
86
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,87 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Test+ATA
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ cache-control:
22
+ - max-age=0, private, must-revalidate
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ date:
26
+ - Wed, 19 Jan 2022 21:54:07 GMT
27
+ etag:
28
+ - W/"a3c740cf3c3bb7dc34d987d8b41c1841"
29
+ server:
30
+ - nginx
31
+ strict-transport-security:
32
+ - max-age=15768000; preload
33
+ x-request-id:
34
+ - 02a1c44f-2e79-42ad-a920-2d1d570ca5dd
35
+ x-robots-tag:
36
+ - noindex, nofollow, nosnippet, noarchive
37
+ content-length:
38
+ - '328'
39
+ connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":335,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"x8353ormng","password":"12aiz5blteavkbn8"}}'
45
+ recorded_at: Wed, 19 Jan 2022 21:54:50 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://api.phaxio.com/v2.1/atas/335
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - Faraday v1.9.3
55
+ Authorization:
56
+ - "<AUTH_HEADER>"
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ cache-control:
63
+ - max-age=0, private, must-revalidate
64
+ content-type:
65
+ - application/json; charset=utf-8
66
+ date:
67
+ - Wed, 19 Jan 2022 21:54:07 GMT
68
+ etag:
69
+ - W/"199f50771716f15604878796c84a7376"
70
+ server:
71
+ - nginx
72
+ strict-transport-security:
73
+ - max-age=15768000; preload
74
+ x-request-id:
75
+ - 91959a41-e55f-4b6d-98ef-5d7a357ccd0d
76
+ x-robots-tag:
77
+ - noindex, nofollow, nosnippet, noarchive
78
+ content-length:
79
+ - '266'
80
+ connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{"success":true,"message":"Metadata for ATA","data":{"id":335,"name":"Test
85
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null}}'
86
+ recorded_at: Wed, 19 Jan 2022 21:54:51 GMT
87
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,67 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ cache-control:
20
+ - max-age=0, private, must-revalidate
21
+ content-type:
22
+ - application/json; charset=utf-8
23
+ date:
24
+ - Wed, 19 Jan 2022 22:25:30 GMT
25
+ etag:
26
+ - W/"27973b206337bb31cc316040ad40aa86"
27
+ server:
28
+ - nginx
29
+ strict-transport-security:
30
+ - max-age=15768000; preload
31
+ x-page:
32
+ - '1'
33
+ x-per-page:
34
+ - '25'
35
+ x-request-id:
36
+ - a9eed52a-a354-4f3d-8488-f10e6aa31df6
37
+ x-robots-tag:
38
+ - noindex, nofollow, nosnippet, noarchive
39
+ x-total:
40
+ - '19'
41
+ content-length:
42
+ - '4174'
43
+ connection:
44
+ - keep-alive
45
+ body:
46
+ encoding: UTF-8
47
+ string: '{"success":true,"message":"Retrieved ATAs successfully","data":[{"id":297,"name":"asdf","description":"asdf","user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":332,"name":"Test
48
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":333,"name":"Test
49
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":334,"name":"Test
50
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":335,"name":"Test
51
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":336,"name":"Test
52
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":337,"name":"Test
53
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":338,"name":"New
54
+ Name","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":339,"name":"Test
55
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":340,"name":"Test
56
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":341,"name":"Test
57
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":343,"name":"Test
58
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":344,"name":"Test
59
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":345,"name":"Test
60
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":346,"name":"Test
61
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":347,"name":"Test
62
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":348,"name":"Test
63
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":349,"name":"Test
64
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null},{"id":350,"name":"Test
65
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null}],"paging":{"total":19,"per_page":25,"page":1}}'
66
+ recorded_at: Wed, 19 Jan 2022 22:26:14 GMT
67
+ recorded_with: VCR 6.0.0
@@ -2,15 +2,15 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://api.phaxio.com/v2.1/phax_codes/-Y3jxX
5
+ uri: https://api.phaxio.com/v2.1/atas/provisioning_urls
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
- Authorization:
11
- - Basic dGVzdC1hcGkta2V5OnRlc3QtYXBpLXNlY3JldA==
12
10
  User-Agent:
13
- - Faraday v1.3.0
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
14
  response:
15
15
  status:
16
16
  code: 200
@@ -21,26 +21,23 @@ http_interactions:
21
21
  content-type:
22
22
  - application/json; charset=utf-8
23
23
  date:
24
- - Wed, 24 Feb 2021 19:43:33 GMT
24
+ - Wed, 19 Jan 2022 22:33:14 GMT
25
25
  etag:
26
- - W/"78c920ebcae905a8a076a0af95923885"
26
+ - W/"9391d72e15448827eafbd9b139e0c6e8"
27
27
  server:
28
28
  - nginx
29
29
  strict-transport-security:
30
30
  - max-age=15768000; preload
31
31
  x-request-id:
32
- - 152a4709-21c0-4af8-a04c-edd33bfebc92
32
+ - 7a27e762-61be-49a1-a6ad-8b494c97fdd8
33
33
  x-robots-tag:
34
34
  - noindex, nofollow, nosnippet, noarchive
35
- x-runtime:
36
- - '0.015573'
37
35
  content-length:
38
- - '159'
36
+ - '311'
39
37
  connection:
40
38
  - keep-alive
41
39
  body:
42
40
  encoding: UTF-8
43
- string: '{"success":true,"message":"Info for PhaxCode","data":{"identifier":"-Y3jxX","created_at":"2017-11-06T02:57:46.000-06:00","metadata":"This
44
- is a test PhaxCode"}}'
45
- recorded_at: Wed, 24 Feb 2021 19:42:46 GMT
41
+ string: '{"success":true,"message":"Retrieved provisioning URLs","data":{"Grandstream":"provision.staging.phaxio.com/test-ata-provisioning-key","OBi":"https://provision.staging.phaxio.com/test-ata-provisioning-key/$MAC.xml","Netgen":"https://provision.staging.phaxio.com/test-ata-provisioning-key"}}'
42
+ recorded_at: Wed, 19 Jan 2022 22:33:57 GMT
46
43
  recorded_with: VCR 6.0.0
@@ -0,0 +1,87 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Test+ATA
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ cache-control:
22
+ - max-age=0, private, must-revalidate
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ date:
26
+ - Wed, 19 Jan 2022 22:21:09 GMT
27
+ etag:
28
+ - W/"5fbbd61329d6254f14db0d7215fbfa63"
29
+ server:
30
+ - nginx
31
+ strict-transport-security:
32
+ - max-age=15768000; preload
33
+ x-request-id:
34
+ - 7d49db18-0c91-4b51-bbce-daa4a222ee9c
35
+ x-robots-tag:
36
+ - noindex, nofollow, nosnippet, noarchive
37
+ content-length:
38
+ - '328'
39
+ connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":350,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"z2ihyrzia5","password":"m318wv039wpff37l"}}'
45
+ recorded_at: Wed, 19 Jan 2022 22:21:53 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://api.phaxio.com/v2.1/atas/350
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - Faraday v1.9.3
55
+ Authorization:
56
+ - "<AUTH_HEADER>"
57
+ response:
58
+ status:
59
+ code: 200
60
+ message: OK
61
+ headers:
62
+ cache-control:
63
+ - max-age=0, private, must-revalidate
64
+ content-type:
65
+ - application/json; charset=utf-8
66
+ date:
67
+ - Wed, 19 Jan 2022 22:21:09 GMT
68
+ etag:
69
+ - W/"4f8ce54369aeee5eebb19c5b3a8d70a5"
70
+ server:
71
+ - nginx
72
+ strict-transport-security:
73
+ - max-age=15768000; preload
74
+ x-request-id:
75
+ - 8bce4eb4-4764-4c44-954e-1ad3dcba47da
76
+ x-robots-tag:
77
+ - noindex, nofollow, nosnippet, noarchive
78
+ content-length:
79
+ - '266'
80
+ connection:
81
+ - keep-alive
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{"success":true,"message":"Metadata for ATA","data":{"id":350,"name":"Test
85
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null}}'
86
+ recorded_at: Wed, 19 Jan 2022 22:21:53 GMT
87
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,89 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.phaxio.com/v2.1/atas
6
+ body:
7
+ encoding: UTF-8
8
+ string: name=Test+ATA
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v1.9.3
12
+ Authorization:
13
+ - "<AUTH_HEADER>"
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ cache-control:
22
+ - max-age=0, private, must-revalidate
23
+ content-type:
24
+ - application/json; charset=utf-8
25
+ date:
26
+ - Wed, 19 Jan 2022 22:01:55 GMT
27
+ etag:
28
+ - W/"8b03eeba2207e5e23bb6a102947c32e0"
29
+ server:
30
+ - nginx
31
+ strict-transport-security:
32
+ - max-age=15768000; preload
33
+ x-request-id:
34
+ - 140fe750-4d84-419a-9fa5-3d4c30a8a78e
35
+ x-robots-tag:
36
+ - noindex, nofollow, nosnippet, noarchive
37
+ content-length:
38
+ - '328'
39
+ connection:
40
+ - keep-alive
41
+ body:
42
+ encoding: UTF-8
43
+ string: '{"success":true,"message":"ATA created successfully","data":{"id":341,"name":"Test
44
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"95yem0tpee","password":"5geixt2o45brncd4"}}'
45
+ recorded_at: Wed, 19 Jan 2022 22:02:39 GMT
46
+ - request:
47
+ method: patch
48
+ uri: https://api.phaxio.com/v2.1/atas/341/regenerate_credentials
49
+ body:
50
+ encoding: UTF-8
51
+ string: ''
52
+ headers:
53
+ User-Agent:
54
+ - Faraday v1.9.3
55
+ Authorization:
56
+ - "<AUTH_HEADER>"
57
+ Content-Type:
58
+ - application/x-www-form-urlencoded
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ cache-control:
65
+ - max-age=0, private, must-revalidate
66
+ content-type:
67
+ - application/json; charset=utf-8
68
+ date:
69
+ - Wed, 19 Jan 2022 22:01:56 GMT
70
+ etag:
71
+ - W/"b07982b93e703ce70647c0e3af411f1a"
72
+ server:
73
+ - nginx
74
+ strict-transport-security:
75
+ - max-age=15768000; preload
76
+ x-request-id:
77
+ - f128a2dc-5b9f-409b-8a80-cb6c985f3b21
78
+ x-robots-tag:
79
+ - noindex, nofollow, nosnippet, noarchive
80
+ content-length:
81
+ - '331'
82
+ connection:
83
+ - keep-alive
84
+ body:
85
+ encoding: UTF-8
86
+ string: '{"success":true,"message":"ATA credentials regenerated","data":{"id":341,"name":"Test
87
+ ATA","description":null,"user_phone_number":null,"domain":"ata.staging.phaxio.com","last_registered":null,"expiry_time":null,"user_agent":null,"sip_uri":null,"mac_address":null,"group":null,"username":"2wwg50mh2t","password":"5ilsfqujkrohjgce"}}'
88
+ recorded_at: Wed, 19 Jan 2022 22:02:40 GMT
89
+ recorded_with: VCR 6.0.0