phaxio 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +2 -1
- data/README.md +53 -20
- data/lib/phaxio/client.rb +46 -16
- data/lib/phaxio/config.rb +7 -5
- data/lib/phaxio/resource.rb +11 -5
- data/lib/phaxio/resources/account.rb +1 -1
- data/lib/phaxio/resources/ata.rb +285 -0
- data/lib/phaxio/resources/callback.rb +10 -56
- data/lib/phaxio/resources/fax.rb +11 -11
- data/lib/phaxio/resources/phax_code.rb +2 -2
- data/lib/phaxio/resources/phone_number.rb +31 -5
- data/lib/phaxio/resources/port_number.rb +42 -0
- data/lib/phaxio/resources/port_number_note.rb +51 -0
- data/lib/phaxio/resources/port_order.rb +172 -0
- data/lib/phaxio/resources/public/area_code.rb +1 -1
- data/lib/phaxio/resources/public/country.rb +1 -1
- data/lib/phaxio/resources/webhook.rb +65 -0
- data/lib/phaxio/version.rb +1 -1
- data/lib/phaxio.rb +13 -3
- data/phaxio.gemspec +2 -1
- data/spec/client_spec.rb +38 -6
- data/spec/phaxio_spec.rb +7 -1
- data/spec/resources/account_spec.rb +1 -7
- data/spec/resources/ata_spec.rb +207 -0
- data/spec/resources/fax_spec.rb +42 -89
- data/spec/resources/phax_code_spec.rb +26 -32
- data/spec/resources/phone_number_spec.rb +19 -30
- data/spec/resources/port_number_note_spec.rb +33 -0
- data/spec/resources/port_number_spec.rb +32 -0
- data/spec/resources/port_order_spec.rb +76 -0
- data/spec/resources/public/area_code_spec.rb +1 -1
- data/spec/resources/public/country_spec.rb +1 -7
- data/spec/resources/{callback_spec.rb → webhook_spec.rb} +8 -8
- data/spec/spec_helper.rb +1 -0
- data/spec/support/{vcr_cassettes/resources/account/status.yml → cassettes/account/get.yml} +13 -14
- data/spec/support/cassettes/ata/add_phone_number.yml +89 -0
- data/spec/support/cassettes/ata/create.yml +46 -0
- data/spec/support/cassettes/ata/delete.yml +86 -0
- data/spec/support/cassettes/ata/get.yml +87 -0
- data/spec/support/cassettes/ata/list.yml +67 -0
- data/spec/support/cassettes/ata/provisioning_urls.yml +43 -0
- data/spec/support/cassettes/ata/reference.yml +87 -0
- data/spec/support/cassettes/ata/regenerate.yml +89 -0
- data/spec/support/cassettes/ata/remove_phone_number.yml +130 -0
- data/spec/support/cassettes/ata/update.yml +89 -0
- data/spec/support/cassettes/fax/cancel.yml +90 -0
- data/spec/support/cassettes/fax/create.yml +48 -0
- data/spec/support/cassettes/fax/delete.yml +88 -0
- data/spec/support/cassettes/fax/delete_file.yml +88 -0
- data/spec/support/cassettes/fax/file.yml +93 -0
- data/spec/support/cassettes/fax/get.yml +88 -0
- data/spec/support/cassettes/fax/list.yml +49 -0
- data/spec/support/cassettes/fax/reference.yml +88 -0
- data/spec/support/cassettes/fax/resend.yml +90 -0
- data/spec/support/cassettes/fax/test_receive.yml +49 -0
- data/spec/support/{vcr_cassettes/resources/fax/resend.yml → cassettes/phax_code/create.yml} +14 -15
- data/spec/support/cassettes/phax_code/create_png.yml +50 -0
- data/spec/support/cassettes/phax_code/get_by_id.yml +86 -0
- data/spec/support/{vcr_cassettes/resources/fax/delete.yml → cassettes/phax_code/get_default.yml} +14 -15
- data/spec/support/cassettes/phax_code/get_default_png.yml +48 -0
- data/spec/support/cassettes/phax_code/get_png_by_id.yml +90 -0
- data/spec/support/{vcr_cassettes/resources → cassettes}/phone_number/create.yml +15 -16
- data/spec/support/cassettes/phone_number/get.yml +44 -0
- data/spec/support/cassettes/phone_number/list.yml +72 -0
- data/spec/support/cassettes/phone_number/reference.yml +45 -0
- data/spec/support/cassettes/phone_number/release.yml +86 -0
- data/spec/support/cassettes/port_number/get.yml +88 -0
- data/spec/support/cassettes/port_number_note/list.yml +88 -0
- data/spec/support/cassettes/port_order/create.yml +48 -0
- data/spec/support/cassettes/port_order/get.yml +91 -0
- data/spec/support/cassettes/port_order/list.yml +52 -0
- data/spec/support/{vcr_cassettes/resources/public/area_codes → cassettes/public/area_code}/list.yml +18 -18
- data/spec/support/{vcr_cassettes/resources → cassettes}/public/country/list.yml +14 -15
- data/spec/support/files/test.txt +1 -0
- data/spec/support/vcr.rb +25 -8
- metadata +125 -31
- data/spec/support/credentials.rb +0 -7
- data/spec/support/vcr_cassettes/resources/fax/cancel.yml +0 -46
- data/spec/support/vcr_cassettes/resources/fax/create.yml +0 -230
- data/spec/support/vcr_cassettes/resources/fax/delete_file.yml +0 -44
- data/spec/support/vcr_cassettes/resources/fax/file.yml +0 -251
- data/spec/support/vcr_cassettes/resources/fax/get.yml +0 -44
- data/spec/support/vcr_cassettes/resources/fax/list.yml +0 -56
- data/spec/support/vcr_cassettes/resources/fax/test_receive.yml +0 -231
- data/spec/support/vcr_cassettes/resources/phax_code/create.yml +0 -100
- data/spec/support/vcr_cassettes/resources/phax_code/get.yml +0 -190
- data/spec/support/vcr_cassettes/resources/phone_number/get.yml +0 -45
- data/spec/support/vcr_cassettes/resources/phone_number/list.yml +0 -52
- data/spec/support/vcr_cassettes/resources/phone_number/release.yml +0 -44
data/spec/support/{vcr_cassettes/resources/public/area_codes → cassettes/public/area_code}/list.yml
RENAMED
@@ -2,26 +2,28 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.phaxio.com/v2/public/area_codes
|
5
|
+
uri: https://api.phaxio.com/v2.1/public/area_codes
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday
|
11
|
+
- Faraday v1.3.0
|
12
|
+
Authorization:
|
13
|
+
- "<AUTH_HEADER>"
|
12
14
|
response:
|
13
15
|
status:
|
14
16
|
code: 200
|
15
|
-
message:
|
17
|
+
message: OK
|
16
18
|
headers:
|
17
19
|
cache-control:
|
18
20
|
- max-age=0, private, must-revalidate
|
19
21
|
content-type:
|
20
22
|
- application/json; charset=utf-8
|
21
23
|
date:
|
22
|
-
- Thu,
|
24
|
+
- Thu, 04 Nov 2021 21:03:07 GMT
|
23
25
|
etag:
|
24
|
-
- W/"
|
26
|
+
- W/"75536d88c0d4a65bf21bcbf4a8687d61"
|
25
27
|
server:
|
26
28
|
- nginx
|
27
29
|
strict-transport-security:
|
@@ -31,17 +33,15 @@ http_interactions:
|
|
31
33
|
x-per-page:
|
32
34
|
- '25'
|
33
35
|
x-request-id:
|
34
|
-
-
|
36
|
+
- 78dbf2ec-987b-4e32-8eef-13000d3f57df
|
35
37
|
x-robots-tag:
|
36
38
|
- noindex, nofollow, nosnippet, noarchive
|
37
|
-
x-runtime:
|
38
|
-
- '0.047382'
|
39
39
|
x-total:
|
40
|
-
- '
|
40
|
+
- '319'
|
41
41
|
content-length:
|
42
|
-
- '
|
42
|
+
- '3548'
|
43
43
|
connection:
|
44
|
-
-
|
44
|
+
- keep-alive
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
47
|
string: '{"success":true,"message":"Data contains found available area codes","data":[{"country_code":1,"area_code":201,"city":"Bayonne,
|
@@ -56,9 +56,7 @@ http_interactions:
|
|
56
56
|
Idaho Falls, Pocatello","state":"Idaho","country":"United States of America","toll_free":false},{"country_code":1,"area_code":209,"city":"Lodi,
|
57
57
|
Merced, Modesto","state":"California","country":"United States of America","toll_free":false},{"country_code":1,"area_code":210,"city":"San
|
58
58
|
Antonio","state":"Texas","country":"United States of America","toll_free":false},{"country_code":1,"area_code":213,"city":"Los
|
59
|
-
Angeles","state":"California","country":"United States of America","toll_free":false},{"country_code":1,"area_code":
|
60
|
-
States of America","toll_free":false},{"country_code":1,"area_code":215,"city":"Levittown,
|
61
|
-
Philadelphia","state":"Pennsylvania","country":"United States of America","toll_free":false},{"country_code":1,"area_code":216,"city":"Cleveland,
|
59
|
+
Angeles","state":"California","country":"United States of America","toll_free":false},{"country_code":1,"area_code":216,"city":"Cleveland,
|
62
60
|
Euclid, Lakewood","state":"Ohio","country":"United States of America","toll_free":false},{"country_code":1,"area_code":217,"city":"Champaign,
|
63
61
|
Decatur, Springfield","state":"Illinois","country":"United States of America","toll_free":false},{"country_code":1,"area_code":218,"city":"Duluth,
|
64
62
|
Ely, Moorhead","state":"Minnesota","country":"United States of America","toll_free":false},{"country_code":1,"area_code":219,"city":"Gary,
|
@@ -71,7 +69,9 @@ http_interactions:
|
|
71
69
|
Americus, Bainbridge","state":"Georgia","country":"United States of America","toll_free":false},{"country_code":1,"area_code":231,"city":"Grant","state":"Michigan","country":"United
|
72
70
|
States of America","toll_free":false},{"country_code":1,"area_code":234,"city":"Akron,
|
73
71
|
Canton, Youngstown","state":"Ohio","country":"United States of America","toll_free":false},{"country_code":1,"area_code":236,"city":"Vancouver","state":"British
|
74
|
-
Columbia","country":"Canada","toll_free":false}
|
75
|
-
|
76
|
-
|
77
|
-
|
72
|
+
Columbia","country":"Canada","toll_free":false},{"country_code":1,"area_code":239,"city":"Cape
|
73
|
+
Coral","state":"Florida","country":"United States of America","toll_free":false},{"country_code":1,"area_code":240,"city":"Aspen
|
74
|
+
Hill, Bethesda, Frederick","state":"Maryland","country":"United States of
|
75
|
+
America","toll_free":false}],"paging":{"total":319,"per_page":25,"page":1}}'
|
76
|
+
recorded_at: Thu, 04 Nov 2021 21:03:48 GMT
|
77
|
+
recorded_with: VCR 6.0.0
|
@@ -2,26 +2,28 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://api.phaxio.com/v2/public/countries
|
5
|
+
uri: https://api.phaxio.com/v2.1/public/countries
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
9
9
|
headers:
|
10
10
|
User-Agent:
|
11
|
-
- Faraday
|
11
|
+
- Faraday v1.3.0
|
12
|
+
Authorization:
|
13
|
+
- "<AUTH_HEADER>"
|
12
14
|
response:
|
13
15
|
status:
|
14
16
|
code: 200
|
15
|
-
message:
|
17
|
+
message: OK
|
16
18
|
headers:
|
17
19
|
cache-control:
|
18
20
|
- max-age=0, private, must-revalidate
|
19
21
|
content-type:
|
20
22
|
- application/json; charset=utf-8
|
21
23
|
date:
|
22
|
-
-
|
24
|
+
- Thu, 04 Nov 2021 21:04:42 GMT
|
23
25
|
etag:
|
24
|
-
- W/"
|
26
|
+
- W/"1662637ad255ab3635318bef0bf5068b"
|
25
27
|
server:
|
26
28
|
- nginx
|
27
29
|
strict-transport-security:
|
@@ -31,24 +33,21 @@ http_interactions:
|
|
31
33
|
x-per-page:
|
32
34
|
- '25'
|
33
35
|
x-request-id:
|
34
|
-
-
|
36
|
+
- 8d9e9891-f6d1-4c07-ba3d-96efbbf0dd3f
|
35
37
|
x-robots-tag:
|
36
38
|
- noindex, nofollow, nosnippet, noarchive
|
37
|
-
x-runtime:
|
38
|
-
- '0.105774'
|
39
39
|
x-total:
|
40
|
-
- '
|
40
|
+
- '250'
|
41
41
|
content-length:
|
42
42
|
- '3128'
|
43
43
|
connection:
|
44
|
-
-
|
44
|
+
- keep-alive
|
45
45
|
body:
|
46
46
|
encoding: UTF-8
|
47
47
|
string: '{"success":true,"message":"Data contains countries info","data":[{"name":"United
|
48
48
|
States of America","alpha2":"US","country_code":1,"price_per_page":7,"send_support":"full","receive_support":"full"},{"name":"Canada","alpha2":"CA","country_code":1,"price_per_page":7,"send_support":"full","receive_support":"full"},{"name":"Puerto
|
49
|
-
Rico","alpha2":"PR","country_code":1,"price_per_page":
|
49
|
+
Rico","alpha2":"PR","country_code":1,"price_per_page":7,"send_support":"full","receive_support":"none"},{"name":"Argentina","alpha2":"AR","country_code":54,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Austria","alpha2":"AT","country_code":43,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Australia","alpha2":"AU","country_code":61,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Belgium","alpha2":"BE","country_code":32,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Brazil","alpha2":"BR","country_code":55,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Switzerland","alpha2":"CH","country_code":41,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Germany","alpha2":"DE","country_code":49,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Denmark","alpha2":"DK","country_code":45,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Spain","alpha2":"ES","country_code":34,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"France","alpha2":"FR","country_code":33,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"United
|
50
50
|
Kingdom of Great Britain and Northern Ireland","alpha2":"GB","country_code":44,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Greece","alpha2":"GR","country_code":30,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Hong
|
51
|
-
Kong","alpha2":"HK","country_code":852,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Ireland","alpha2":"IE","country_code":353,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Israel","alpha2":"IL","country_code":972,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"India","alpha2":"IN","country_code":91,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Italy","alpha2":"IT","country_code":39,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Jersey","alpha2":"JE","country_code":44,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Japan","alpha2":"JP","country_code":81,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Luxembourg","alpha2":"LU","country_code":352,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Netherlands","alpha2":"NL","country_code":31,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Norway","alpha2":"NO","country_code":47,"price_per_page":10,"send_support":"full","receive_support":"none"}],"paging":{"total":
|
52
|
-
|
53
|
-
|
54
|
-
recorded_with: VCR 3.0.3
|
51
|
+
Kong","alpha2":"HK","country_code":852,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Ireland","alpha2":"IE","country_code":353,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Israel","alpha2":"IL","country_code":972,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"India","alpha2":"IN","country_code":91,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Italy","alpha2":"IT","country_code":39,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Jersey","alpha2":"JE","country_code":44,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Japan","alpha2":"JP","country_code":81,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Luxembourg","alpha2":"LU","country_code":352,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Netherlands","alpha2":"NL","country_code":31,"price_per_page":10,"send_support":"full","receive_support":"none"},{"name":"Norway","alpha2":"NO","country_code":47,"price_per_page":10,"send_support":"full","receive_support":"none"}],"paging":{"total":250,"per_page":25,"page":1}}'
|
52
|
+
recorded_at: Thu, 04 Nov 2021 21:05:23 GMT
|
53
|
+
recorded_with: VCR 6.0.0
|
@@ -0,0 +1 @@
|
|
1
|
+
OK
|
data/spec/support/vcr.rb
CHANGED
@@ -1,9 +1,26 @@
|
|
1
|
-
ENV
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
TEST_API_KEY = ENV.fetch 'TEST_PHAXIO_API_KEY', 'test-api-key'
|
2
|
+
TEST_API_SECRET = ENV.fetch 'TEST_PHAXIO_API_SECRET', 'test-api-secret'
|
3
|
+
TEST_NUMBER = ENV.fetch 'TEST_PHAXIO_NUMBER', '+15558675309'
|
4
|
+
TEST_ATA_PROVISIONING_KEY = ENV.fetch 'TEST_ATA_PROVISIONING_KEY', 'test-ata-provisioning-key'
|
5
|
+
TEST_WEBHOOK_TOKEN = 'test-webhook-token'
|
6
|
+
|
7
|
+
VCR.configure do |vcr|
|
8
|
+
vcr.cassette_library_dir = File.join __dir__, 'cassettes'
|
9
|
+
vcr.hook_into :faraday
|
10
|
+
vcr.default_cassette_options = {record: :once, record_on_error: false}
|
11
|
+
|
12
|
+
vcr.filter_sensitive_data('+15558675309') { TEST_NUMBER }
|
13
|
+
vcr.filter_sensitive_data('<AUTH_HEADER>') { |interaction| interaction.request.headers['Authorization'].first }
|
14
|
+
vcr.filter_sensitive_data('test-ata-provisioning-key') { TEST_ATA_PROVISIONING_KEY }
|
15
|
+
|
16
|
+
vcr.configure_rspec_metadata!
|
9
17
|
end
|
18
|
+
|
19
|
+
RSpec.configure do |config|
|
20
|
+
config.before(:each) do
|
21
|
+
Phaxio.api_key = TEST_API_KEY
|
22
|
+
Phaxio.api_secret = TEST_API_SECRET
|
23
|
+
Phaxio.webhook_token = TEST_WEBHOOK_TOKEN
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phaxio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Negrotto
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.10'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.10'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: mime-types
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,53 +79,84 @@ files:
|
|
73
79
|
- lib/phaxio/resource.rb
|
74
80
|
- lib/phaxio/resources.rb
|
75
81
|
- lib/phaxio/resources/account.rb
|
82
|
+
- lib/phaxio/resources/ata.rb
|
76
83
|
- lib/phaxio/resources/callback.rb
|
77
84
|
- lib/phaxio/resources/fax.rb
|
78
85
|
- lib/phaxio/resources/fax_recipient.rb
|
79
86
|
- lib/phaxio/resources/phax_code.rb
|
80
87
|
- lib/phaxio/resources/phone_number.rb
|
88
|
+
- lib/phaxio/resources/port_number.rb
|
89
|
+
- lib/phaxio/resources/port_number_note.rb
|
90
|
+
- lib/phaxio/resources/port_order.rb
|
81
91
|
- lib/phaxio/resources/public.rb
|
82
92
|
- lib/phaxio/resources/public/area_code.rb
|
83
93
|
- lib/phaxio/resources/public/country.rb
|
94
|
+
- lib/phaxio/resources/webhook.rb
|
84
95
|
- lib/phaxio/version.rb
|
85
96
|
- phaxio.gemspec
|
86
97
|
- spec/client_spec.rb
|
87
98
|
- spec/helpers/mime_type_helper_spec.rb
|
88
99
|
- spec/phaxio_spec.rb
|
89
100
|
- spec/resources/account_spec.rb
|
90
|
-
- spec/resources/
|
101
|
+
- spec/resources/ata_spec.rb
|
91
102
|
- spec/resources/fax_spec.rb
|
92
103
|
- spec/resources/phax_code_spec.rb
|
93
104
|
- spec/resources/phone_number_spec.rb
|
105
|
+
- spec/resources/port_number_note_spec.rb
|
106
|
+
- spec/resources/port_number_spec.rb
|
107
|
+
- spec/resources/port_order_spec.rb
|
94
108
|
- spec/resources/public/area_code_spec.rb
|
95
109
|
- spec/resources/public/country_spec.rb
|
110
|
+
- spec/resources/webhook_spec.rb
|
96
111
|
- spec/spec_helper.rb
|
97
|
-
- spec/support/
|
112
|
+
- spec/support/cassettes/account/get.yml
|
113
|
+
- spec/support/cassettes/ata/add_phone_number.yml
|
114
|
+
- spec/support/cassettes/ata/create.yml
|
115
|
+
- spec/support/cassettes/ata/delete.yml
|
116
|
+
- spec/support/cassettes/ata/get.yml
|
117
|
+
- spec/support/cassettes/ata/list.yml
|
118
|
+
- spec/support/cassettes/ata/provisioning_urls.yml
|
119
|
+
- spec/support/cassettes/ata/reference.yml
|
120
|
+
- spec/support/cassettes/ata/regenerate.yml
|
121
|
+
- spec/support/cassettes/ata/remove_phone_number.yml
|
122
|
+
- spec/support/cassettes/ata/update.yml
|
123
|
+
- spec/support/cassettes/fax/cancel.yml
|
124
|
+
- spec/support/cassettes/fax/create.yml
|
125
|
+
- spec/support/cassettes/fax/delete.yml
|
126
|
+
- spec/support/cassettes/fax/delete_file.yml
|
127
|
+
- spec/support/cassettes/fax/file.yml
|
128
|
+
- spec/support/cassettes/fax/get.yml
|
129
|
+
- spec/support/cassettes/fax/list.yml
|
130
|
+
- spec/support/cassettes/fax/reference.yml
|
131
|
+
- spec/support/cassettes/fax/resend.yml
|
132
|
+
- spec/support/cassettes/fax/test_receive.yml
|
133
|
+
- spec/support/cassettes/phax_code/create.yml
|
134
|
+
- spec/support/cassettes/phax_code/create_png.yml
|
135
|
+
- spec/support/cassettes/phax_code/get_by_id.yml
|
136
|
+
- spec/support/cassettes/phax_code/get_default.yml
|
137
|
+
- spec/support/cassettes/phax_code/get_default_png.yml
|
138
|
+
- spec/support/cassettes/phax_code/get_png_by_id.yml
|
139
|
+
- spec/support/cassettes/phone_number/create.yml
|
140
|
+
- spec/support/cassettes/phone_number/get.yml
|
141
|
+
- spec/support/cassettes/phone_number/list.yml
|
142
|
+
- spec/support/cassettes/phone_number/reference.yml
|
143
|
+
- spec/support/cassettes/phone_number/release.yml
|
144
|
+
- spec/support/cassettes/port_number/get.yml
|
145
|
+
- spec/support/cassettes/port_number_note/list.yml
|
146
|
+
- spec/support/cassettes/port_order/create.yml
|
147
|
+
- spec/support/cassettes/port_order/get.yml
|
148
|
+
- spec/support/cassettes/port_order/list.yml
|
149
|
+
- spec/support/cassettes/public/area_code/list.yml
|
150
|
+
- spec/support/cassettes/public/country/list.yml
|
98
151
|
- spec/support/expectations.rb
|
99
152
|
- spec/support/files/test.pdf
|
153
|
+
- spec/support/files/test.txt
|
100
154
|
- spec/support/vcr.rb
|
101
|
-
- spec/support/vcr_cassettes/resources/account/status.yml
|
102
|
-
- spec/support/vcr_cassettes/resources/fax/cancel.yml
|
103
|
-
- spec/support/vcr_cassettes/resources/fax/create.yml
|
104
|
-
- spec/support/vcr_cassettes/resources/fax/delete.yml
|
105
|
-
- spec/support/vcr_cassettes/resources/fax/delete_file.yml
|
106
|
-
- spec/support/vcr_cassettes/resources/fax/file.yml
|
107
|
-
- spec/support/vcr_cassettes/resources/fax/get.yml
|
108
|
-
- spec/support/vcr_cassettes/resources/fax/list.yml
|
109
|
-
- spec/support/vcr_cassettes/resources/fax/resend.yml
|
110
|
-
- spec/support/vcr_cassettes/resources/fax/test_receive.yml
|
111
|
-
- spec/support/vcr_cassettes/resources/phax_code/create.yml
|
112
|
-
- spec/support/vcr_cassettes/resources/phax_code/get.yml
|
113
|
-
- spec/support/vcr_cassettes/resources/phone_number/create.yml
|
114
|
-
- spec/support/vcr_cassettes/resources/phone_number/get.yml
|
115
|
-
- spec/support/vcr_cassettes/resources/phone_number/list.yml
|
116
|
-
- spec/support/vcr_cassettes/resources/phone_number/release.yml
|
117
|
-
- spec/support/vcr_cassettes/resources/public/area_codes/list.yml
|
118
|
-
- spec/support/vcr_cassettes/resources/public/country/list.yml
|
119
155
|
homepage: https://github.com/phaxio/phaxio-ruby
|
120
|
-
licenses:
|
156
|
+
licenses:
|
157
|
+
- MIT
|
121
158
|
metadata: {}
|
122
|
-
post_install_message:
|
159
|
+
post_install_message:
|
123
160
|
rdoc_options: []
|
124
161
|
require_paths:
|
125
162
|
- lib
|
@@ -134,9 +171,66 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
171
|
- !ruby/object:Gem::Version
|
135
172
|
version: '0'
|
136
173
|
requirements: []
|
137
|
-
|
138
|
-
|
139
|
-
signing_key:
|
174
|
+
rubygems_version: 3.3.7
|
175
|
+
signing_key:
|
140
176
|
specification_version: 4
|
141
177
|
summary: Official ruby gem for interacting with Phaxio's API.
|
142
|
-
test_files:
|
178
|
+
test_files:
|
179
|
+
- spec/client_spec.rb
|
180
|
+
- spec/helpers/mime_type_helper_spec.rb
|
181
|
+
- spec/phaxio_spec.rb
|
182
|
+
- spec/resources/account_spec.rb
|
183
|
+
- spec/resources/ata_spec.rb
|
184
|
+
- spec/resources/fax_spec.rb
|
185
|
+
- spec/resources/phax_code_spec.rb
|
186
|
+
- spec/resources/phone_number_spec.rb
|
187
|
+
- spec/resources/port_number_note_spec.rb
|
188
|
+
- spec/resources/port_number_spec.rb
|
189
|
+
- spec/resources/port_order_spec.rb
|
190
|
+
- spec/resources/public/area_code_spec.rb
|
191
|
+
- spec/resources/public/country_spec.rb
|
192
|
+
- spec/resources/webhook_spec.rb
|
193
|
+
- spec/spec_helper.rb
|
194
|
+
- spec/support/cassettes/account/get.yml
|
195
|
+
- spec/support/cassettes/ata/add_phone_number.yml
|
196
|
+
- spec/support/cassettes/ata/create.yml
|
197
|
+
- spec/support/cassettes/ata/delete.yml
|
198
|
+
- spec/support/cassettes/ata/get.yml
|
199
|
+
- spec/support/cassettes/ata/list.yml
|
200
|
+
- spec/support/cassettes/ata/provisioning_urls.yml
|
201
|
+
- spec/support/cassettes/ata/reference.yml
|
202
|
+
- spec/support/cassettes/ata/regenerate.yml
|
203
|
+
- spec/support/cassettes/ata/remove_phone_number.yml
|
204
|
+
- spec/support/cassettes/ata/update.yml
|
205
|
+
- spec/support/cassettes/fax/cancel.yml
|
206
|
+
- spec/support/cassettes/fax/create.yml
|
207
|
+
- spec/support/cassettes/fax/delete.yml
|
208
|
+
- spec/support/cassettes/fax/delete_file.yml
|
209
|
+
- spec/support/cassettes/fax/file.yml
|
210
|
+
- spec/support/cassettes/fax/get.yml
|
211
|
+
- spec/support/cassettes/fax/list.yml
|
212
|
+
- spec/support/cassettes/fax/reference.yml
|
213
|
+
- spec/support/cassettes/fax/resend.yml
|
214
|
+
- spec/support/cassettes/fax/test_receive.yml
|
215
|
+
- spec/support/cassettes/phax_code/create.yml
|
216
|
+
- spec/support/cassettes/phax_code/create_png.yml
|
217
|
+
- spec/support/cassettes/phax_code/get_by_id.yml
|
218
|
+
- spec/support/cassettes/phax_code/get_default.yml
|
219
|
+
- spec/support/cassettes/phax_code/get_default_png.yml
|
220
|
+
- spec/support/cassettes/phax_code/get_png_by_id.yml
|
221
|
+
- spec/support/cassettes/phone_number/create.yml
|
222
|
+
- spec/support/cassettes/phone_number/get.yml
|
223
|
+
- spec/support/cassettes/phone_number/list.yml
|
224
|
+
- spec/support/cassettes/phone_number/reference.yml
|
225
|
+
- spec/support/cassettes/phone_number/release.yml
|
226
|
+
- spec/support/cassettes/port_number/get.yml
|
227
|
+
- spec/support/cassettes/port_number_note/list.yml
|
228
|
+
- spec/support/cassettes/port_order/create.yml
|
229
|
+
- spec/support/cassettes/port_order/get.yml
|
230
|
+
- spec/support/cassettes/port_order/list.yml
|
231
|
+
- spec/support/cassettes/public/area_code/list.yml
|
232
|
+
- spec/support/cassettes/public/country/list.yml
|
233
|
+
- spec/support/expectations.rb
|
234
|
+
- spec/support/files/test.pdf
|
235
|
+
- spec/support/files/test.txt
|
236
|
+
- spec/support/vcr.rb
|
data/spec/support/credentials.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
RSpec.configure do |config|
|
2
|
-
config.before(:each) do
|
3
|
-
Phaxio.api_key = ENV['PHAXIO_API_KEY'] || 'test-api-key'
|
4
|
-
Phaxio.api_secret = ENV['PHAXIO_API_SECRET'] || 'test-api-secret'
|
5
|
-
Phaxio.callback_token = ENV['PHAXIO_CALLBACK_TOKEN'] || 'test-callback-token'
|
6
|
-
end
|
7
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: https://api.phaxio.com/v2/faxes/55405187/cancel
|
6
|
-
body:
|
7
|
-
encoding: UTF-8
|
8
|
-
string: api_key=<API_KEY>&api_secret=<API_SECRET>
|
9
|
-
headers:
|
10
|
-
User-Agent:
|
11
|
-
- Faraday v0.13.1
|
12
|
-
Content-Type:
|
13
|
-
- application/x-www-form-urlencoded
|
14
|
-
response:
|
15
|
-
status:
|
16
|
-
code: 200
|
17
|
-
message:
|
18
|
-
headers:
|
19
|
-
cache-control:
|
20
|
-
- max-age=0, private, must-revalidate
|
21
|
-
content-type:
|
22
|
-
- application/json; charset=utf-8
|
23
|
-
date:
|
24
|
-
- Fri, 27 Oct 2017 19:41:31 GMT
|
25
|
-
etag:
|
26
|
-
- W/"5f351f3a724adbfc0b22effe1c96a1ad"
|
27
|
-
server:
|
28
|
-
- nginx
|
29
|
-
strict-transport-security:
|
30
|
-
- max-age=15768000; preload
|
31
|
-
x-request-id:
|
32
|
-
- 806f7432-f21b-459d-90fd-2a4c823e654a
|
33
|
-
x-robots-tag:
|
34
|
-
- noindex, nofollow, nosnippet, noarchive
|
35
|
-
x-runtime:
|
36
|
-
- '0.026048'
|
37
|
-
content-length:
|
38
|
-
- '92'
|
39
|
-
connection:
|
40
|
-
- Close
|
41
|
-
body:
|
42
|
-
encoding: UTF-8
|
43
|
-
string: '{"success":true,"message":"Fax cancellation scheduled successfully.","data":{"id":55405187}}'
|
44
|
-
http_version:
|
45
|
-
recorded_at: Fri, 27 Oct 2017 19:41:31 GMT
|
46
|
-
recorded_with: VCR 3.0.3
|