emites-client 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +31 -0
- data/.rspec +2 -0
- data/.travis.yml +11 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +366 -0
- data/Rakefile +9 -0
- data/emites-client.gemspec +37 -0
- data/lib/emites.rb +44 -0
- data/lib/emites/client.rb +30 -0
- data/lib/emites/configuration.rb +12 -0
- data/lib/emites/entities/account.rb +8 -0
- data/lib/emites/entities/base.rb +9 -0
- data/lib/emites/entities/emitter.rb +31 -0
- data/lib/emites/entities/nfse.rb +29 -0
- data/lib/emites/entities/nfse_status.rb +15 -0
- data/lib/emites/entities/nfse_status_transition.rb +14 -0
- data/lib/emites/entities/nfse_values.rb +28 -0
- data/lib/emites/entities/rps.rb +9 -0
- data/lib/emites/entities/taker.rb +20 -0
- data/lib/emites/entities/taker_address.rb +21 -0
- data/lib/emites/entities/taker_contact.rb +9 -0
- data/lib/emites/entities/webhook.rb +9 -0
- data/lib/emites/exception.rb +11 -0
- data/lib/emites/http.rb +34 -0
- data/lib/emites/request.rb +53 -0
- data/lib/emites/resources/base.rb +45 -0
- data/lib/emites/resources/emitter.rb +98 -0
- data/lib/emites/resources/hooks.rb +25 -0
- data/lib/emites/resources/nfse.rb +173 -0
- data/lib/emites/resources/webhook.rb +84 -0
- data/lib/emites/response.rb +38 -0
- data/lib/emites/version.rb +3 -0
- data/spec/emites/client_spec.rb +45 -0
- data/spec/emites/configuration_spec.rb +13 -0
- data/spec/emites/entities/account_spec.rb +14 -0
- data/spec/emites/entities/base_spec.rb +28 -0
- data/spec/emites/entities/emitter_spec.rb +20 -0
- data/spec/emites/entities/nfse_spec.rb +148 -0
- data/spec/emites/entities/nfse_status_spec.rb +16 -0
- data/spec/emites/entities/nfse_status_transition_spec.rb +23 -0
- data/spec/emites/entities/nfse_values_spec.rb +19 -0
- data/spec/emites/entities/rps_spec.rb +15 -0
- data/spec/emites/entities/taker_address_spec.rb +18 -0
- data/spec/emites/entities/taker_contact_spec.rb +13 -0
- data/spec/emites/entities/taker_spec.rb +18 -0
- data/spec/emites/entities/webhook_spec.rb +14 -0
- data/spec/emites/exception_spec.rb +21 -0
- data/spec/emites/http_spec.rb +62 -0
- data/spec/emites/resources/base_spec.rb +96 -0
- data/spec/emites/resources/emitter_spec.rb +119 -0
- data/spec/emites/resources/nfse_spec.rb +214 -0
- data/spec/emites/resources/webhook_spec.rb +62 -0
- data/spec/emites_spec.rb +63 -0
- data/spec/fixtures/certificate.pfx +0 -0
- data/spec/shared_examples/bound_notifiers.rb +8 -0
- data/spec/shared_examples/entity_attributes.rb +9 -0
- data/spec/spec_helper.rb +38 -0
- data/spec/support/matchers/have_attr_accessor.rb +18 -0
- data/spec/vcr_cassettes/client/authenticated/false.yml +48 -0
- data/spec/vcr_cassettes/client/authenticated/true.yml +259 -0
- data/spec/vcr_cassettes/emitters/create/error.yml +57 -0
- data/spec/vcr_cassettes/emitters/create/success.yml +80 -0
- data/spec/vcr_cassettes/emitters/destroy/error.yml +47 -0
- data/spec/vcr_cassettes/emitters/destroy/success.yml +44 -0
- data/spec/vcr_cassettes/emitters/info/error.yml +47 -0
- data/spec/vcr_cassettes/emitters/info/success.yml +77 -0
- data/spec/vcr_cassettes/emitters/list/success.yml +135 -0
- data/spec/vcr_cassettes/emitters/partial_update/success.yml +90 -0
- data/spec/vcr_cassettes/emitters/search/returns_empty.yml +47 -0
- data/spec/vcr_cassettes/emitters/search/success.yml +76 -0
- data/spec/vcr_cassettes/nfse/cancel/success.yml +49 -0
- data/spec/vcr_cassettes/nfse/create/given_taker.yml +109 -0
- data/spec/vcr_cassettes/nfse/create/incomplete.yml +73 -0
- data/spec/vcr_cassettes/nfse/create/success.yml +112 -0
- data/spec/vcr_cassettes/nfse/create/without_taker.yml +73 -0
- data/spec/vcr_cassettes/nfse/destroy/success.yml +46 -0
- data/spec/vcr_cassettes/nfse/history/success.yml +83 -0
- data/spec/vcr_cassettes/nfse/info/success.yml +113 -0
- data/spec/vcr_cassettes/nfse/list/success.yml +1353 -0
- data/spec/vcr_cassettes/nfse/pdf/success.yml +48 -0
- data/spec/vcr_cassettes/nfse/status/success.yml +51 -0
- data/spec/vcr_cassettes/nfse/update/success.yml +113 -0
- data/spec/vcr_cassettes/nfse/xml/success.yml +48 -0
- data/spec/vcr_cassettes/webhooks/create/success.yml +53 -0
- data/spec/vcr_cassettes/webhooks/destroy/success.yml +46 -0
- data/spec/vcr_cassettes/webhooks/list/success.yml +53 -0
- data/spec/vcr_cassettes/webhooks/update/success.yml +52 -0
- metadata +390 -0
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/nfse/456/pdf
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 302
|
19
|
+
message: FOUND
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- text/html; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Tue, 17 Mar 2015 19:37:13 GMT
|
27
|
+
Location:
|
28
|
+
- https://homologacao.notacarioca.rio.gov.br/nfse.aspx?ccm=05725984&nf=527&cod=NDLXWEVS
|
29
|
+
Server:
|
30
|
+
- nginx/1.6.2
|
31
|
+
User-Agent:
|
32
|
+
- emites-sandbox-v1
|
33
|
+
Vary:
|
34
|
+
- Cookie
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Content-Length:
|
38
|
+
- '0'
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: ''
|
44
|
+
http_version: '1.1'
|
45
|
+
adapter_metadata:
|
46
|
+
effective_url: https://sandbox.emites.com.br/api/v1/nfse/456/pdf
|
47
|
+
recorded_at: Tue, 17 Mar 2015 19:37:13 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,51 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/nfse/456/status
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Date:
|
26
|
+
- Mon, 16 Mar 2015 22:58:26 GMT
|
27
|
+
Server:
|
28
|
+
- nginx/1.6.2
|
29
|
+
User-Agent:
|
30
|
+
- emites-sandbox-v1
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
- Cookie
|
34
|
+
X-Frame-Options:
|
35
|
+
- SAMEORIGIN
|
36
|
+
Content-Length:
|
37
|
+
- '327'
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"id": 456, "status": "accepted", "description": "Processado pela Sefaz",
|
43
|
+
"nfse_key": "NDLX-WEVS", "nfse_number": "527", "number": 10, "mirror_url":
|
44
|
+
null, "xml_url": "https://sandbox.emites.com.br/api/v1/nfse/456/xml", "pdf_url":
|
45
|
+
"https://sandbox.emites.com.br/api/v1/nfse/456/pdf", "environment": "sandbox",
|
46
|
+
"nfse_errors": []}'
|
47
|
+
http_version: '1.1'
|
48
|
+
adapter_metadata:
|
49
|
+
effective_url: https://sandbox.emites.com.br/api/v1/nfse/456/status
|
50
|
+
recorded_at: Mon, 16 Mar 2015 22:58:26 GMT
|
51
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,113 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/nfse/564
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"emitter_id":4,"rps_type":1,"serie":"a","emission_date":"2015-03-23T13:48:53Z","operation_nature":1,"rps_situation":1,"service_values":{"service_amount":1000.0,"deduction_amount":0,"retained_iss":false,"calculation_base":1000.0,"iss_percentage":5.0,"iss_amount":50.0,"pis_amount":0,"cofins_amount":0,"inss_amount":0,"ir_amount":0,"csll_amount":0,"service_item_code":"0105","city_tax_code":"010501","description":"RSPEC
|
9
|
+
Servicos de informatica","city_code":3304557,"nfse_liquid_amount":1000.0,"discount_conditioning_amount":0},"taker":{"cpf":"83051507121","city_inscription":"92708711","social_reason":"Tomador
|
10
|
+
RSPEC","address":{"street":"Feijó Júnior","number":"535","neighborhood":"São
|
11
|
+
Pelegrino","neighborhood_type":"COM","city_code":4305108,"state":"RS","zip_code":95110550,"city":"Caxias
|
12
|
+
do Sul"},"contact":{"phone":"32272144","ddd":54}}}'
|
13
|
+
headers:
|
14
|
+
User-Agent:
|
15
|
+
- Emites Ruby Client v0.0.2
|
16
|
+
Accept:
|
17
|
+
- application/json
|
18
|
+
Content-Type:
|
19
|
+
- application/json
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Allow:
|
26
|
+
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS
|
27
|
+
Content-Encoding:
|
28
|
+
- gzip
|
29
|
+
Content-Type:
|
30
|
+
- application/json
|
31
|
+
Date:
|
32
|
+
- Mon, 23 Mar 2015 13:48:56 GMT
|
33
|
+
Server:
|
34
|
+
- nginx/1.6.2
|
35
|
+
User-Agent:
|
36
|
+
- emites-sandbox-v1
|
37
|
+
Vary:
|
38
|
+
- Accept-Encoding
|
39
|
+
- Cookie
|
40
|
+
X-Frame-Options:
|
41
|
+
- SAMEORIGIN
|
42
|
+
Content-Length:
|
43
|
+
- '1046'
|
44
|
+
Connection:
|
45
|
+
- keep-alive
|
46
|
+
body:
|
47
|
+
encoding: ASCII-8BIT
|
48
|
+
string: !binary |-
|
49
|
+
eyJfbGlua3MiOiBbeyJocmVmIjogImh0dHBzOi8vc2FuZGJveC5lbWl0ZXMu
|
50
|
+
Y29tLmJyL2FwaS92MS9uZnNlLzU2NCIsICJtZXRob2QiOiAiR0VUIiwgInJl
|
51
|
+
bCI6ICJzZWxmIn0sIHsiaHJlZiI6ICJodHRwczovL3NhbmRib3guZW1pdGVz
|
52
|
+
LmNvbS5ici9hcGkvdjEvbmZzZS81NjQiLCAibWV0aG9kIjogIkRFTEVURSIs
|
53
|
+
ICJyZWwiOiAiZGVzdHJveSJ9LCB7ImhyZWYiOiAiaHR0cHM6Ly9zYW5kYm94
|
54
|
+
LmVtaXRlcy5jb20uYnIvYXBpL3YxL25mc2UvNTY0L3N0YXR1cyIsICJtZXRo
|
55
|
+
b2QiOiAiR0VUIiwgInJlbCI6ICJzdGF0dXMifSwgeyJocmVmIjogImh0dHBz
|
56
|
+
Oi8vc2FuZGJveC5lbWl0ZXMuY29tLmJyL2FwaS92MS9uZnNlLzU2NC9jYW5j
|
57
|
+
ZWwiLCAibWV0aG9kIjogIlBPU1QiLCAicmVsIjogImNhbmNlbCJ9LCB7Imhy
|
58
|
+
ZWYiOiAiaHR0cHM6Ly9zYW5kYm94LmVtaXRlcy5jb20uYnIvYXBpL3YxL25m
|
59
|
+
c2UvNTY0L3htbCIsICJtZXRob2QiOiAiR0VUIiwgInJlbCI6ICJ4bWwifSwg
|
60
|
+
eyJocmVmI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ZW1pdHRlcl9jdWx0dXJhbF9wcm9t
|
108
|
+
b3RlciI6IGZhbHNlfQ==
|
109
|
+
http_version: '1.1'
|
110
|
+
adapter_metadata:
|
111
|
+
effective_url: https://sandbox.emites.com.br/api/v1/nfse/564
|
112
|
+
recorded_at: Mon, 23 Mar 2015 13:48:56 GMT
|
113
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,48 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/nfse/456/xml
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 302
|
19
|
+
message: FOUND
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- text/html; charset=utf-8
|
25
|
+
Date:
|
26
|
+
- Tue, 17 Mar 2015 19:46:41 GMT
|
27
|
+
Location:
|
28
|
+
- https://emites-media-sandbox.s3.amazonaws.com/nfse/xmls/4/17799377000155/nfse_10.xml?Signature=lWkMAg2D1E%2FOdyLe%2FLwhMYr9zUE%3D&Expires=1426625201&AWSAccessKeyId=AKIAISRVLVSA5XJKPNTQ
|
29
|
+
Server:
|
30
|
+
- nginx/1.6.2
|
31
|
+
User-Agent:
|
32
|
+
- emites-sandbox-v1
|
33
|
+
Vary:
|
34
|
+
- Cookie
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Content-Length:
|
38
|
+
- '0'
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: ''
|
44
|
+
http_version: '1.1'
|
45
|
+
adapter_metadata:
|
46
|
+
effective_url: https://sandbox.emites.com.br/api/v1/nfse/456/xml
|
47
|
+
recorded_at: Tue, 17 Mar 2015 19:46:41 GMT
|
48
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/webhooks
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"url":"http://requestb.in/1knsteq1","name":"My Fake Webhook"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 201
|
19
|
+
message: CREATED
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, POST, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Date:
|
26
|
+
- Mon, 16 Mar 2015 19:54:36 GMT
|
27
|
+
Location:
|
28
|
+
- https://sandbox.emites.com.br/api/v1/webhooks/16
|
29
|
+
Server:
|
30
|
+
- nginx/1.6.2
|
31
|
+
User-Agent:
|
32
|
+
- emites-sandbox-v1
|
33
|
+
Vary:
|
34
|
+
- Cookie
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Content-Length:
|
38
|
+
- '525'
|
39
|
+
Connection:
|
40
|
+
- keep-alive
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"_links": [{"href": "https://sandbox.emites.com.br/api/v1/webhooks/16",
|
44
|
+
"method": "GET", "rel": "self"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/16",
|
45
|
+
"method": "PUT", "rel": "update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/16",
|
46
|
+
"method": "PATCH", "rel": "partial_update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/16",
|
47
|
+
"method": "DELETE", "rel": "destroy"}], "id": 16, "name": "My Fake Webhook",
|
48
|
+
"url": "http://requestb.in/1knsteq1", "created_at": "2015-03-16T19:54:36.065Z"}'
|
49
|
+
http_version: '1.1'
|
50
|
+
adapter_metadata:
|
51
|
+
effective_url: https://sandbox.emites.com.br/api/v1/webhooks
|
52
|
+
recorded_at: Mon, 16 Mar 2015 19:54:36 GMT
|
53
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: delete
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/webhooks/14
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 204
|
19
|
+
message: NO CONTENT
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS
|
23
|
+
Content-Length:
|
24
|
+
- '0'
|
25
|
+
Content-Type:
|
26
|
+
- text/html; charset=UTF-8
|
27
|
+
Date:
|
28
|
+
- Thu, 12 Mar 2015 15:51:11 GMT
|
29
|
+
Server:
|
30
|
+
- nginx/1.6.2
|
31
|
+
User-Agent:
|
32
|
+
- emites-sandbox-v1
|
33
|
+
Vary:
|
34
|
+
- Cookie
|
35
|
+
X-Frame-Options:
|
36
|
+
- SAMEORIGIN
|
37
|
+
Connection:
|
38
|
+
- keep-alive
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: ''
|
42
|
+
http_version: '1.1'
|
43
|
+
adapter_metadata:
|
44
|
+
effective_url: https://sandbox.emites.com.br/api/v1/webhooks/14
|
45
|
+
recorded_at: Thu, 12 Mar 2015 15:51:10 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/webhooks
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, POST, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Date:
|
26
|
+
- Thu, 12 Mar 2015 17:19:47 GMT
|
27
|
+
Server:
|
28
|
+
- nginx/1.6.2
|
29
|
+
User-Agent:
|
30
|
+
- emites-sandbox-v1
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
- Cookie
|
34
|
+
X-Frame-Options:
|
35
|
+
- SAMEORIGIN
|
36
|
+
Content-Length:
|
37
|
+
- '589'
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"count": 1, "next": null, "previous": null, "collection": [{"_links":
|
43
|
+
[{"href": "https://sandbox.emites.com.br/api/v1/webhooks/15", "method": "GET",
|
44
|
+
"rel": "self"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
45
|
+
"method": "PUT", "rel": "update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
46
|
+
"method": "PATCH", "rel": "partial_update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
47
|
+
"method": "DELETE", "rel": "destroy"}], "id": 15, "name": "RSpec integration",
|
48
|
+
"url": "http://requestb.in/1mayrfq1", "created_at": "2015-03-12T15:54:56.934Z"}]}'
|
49
|
+
http_version: '1.1'
|
50
|
+
adapter_metadata:
|
51
|
+
effective_url: https://sandbox.emites.com.br/api/v1/webhooks
|
52
|
+
recorded_at: Thu, 12 Mar 2015 17:19:47 GMT
|
53
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,52 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://sandbox.emites.com.br/api/v1/webhooks/15
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"name":"RSpec integration"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Emites Ruby Client v0.0.2
|
12
|
+
Accept:
|
13
|
+
- application/json
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 200
|
19
|
+
message: OK
|
20
|
+
headers:
|
21
|
+
Allow:
|
22
|
+
- GET, PUT, PATCH, DELETE, HEAD, OPTIONS
|
23
|
+
Content-Type:
|
24
|
+
- application/json
|
25
|
+
Date:
|
26
|
+
- Thu, 12 Mar 2015 15:55:22 GMT
|
27
|
+
Server:
|
28
|
+
- nginx/1.6.2
|
29
|
+
User-Agent:
|
30
|
+
- emites-sandbox-v1
|
31
|
+
Vary:
|
32
|
+
- Accept-Encoding
|
33
|
+
- Cookie
|
34
|
+
X-Frame-Options:
|
35
|
+
- SAMEORIGIN
|
36
|
+
Content-Length:
|
37
|
+
- '544'
|
38
|
+
Connection:
|
39
|
+
- keep-alive
|
40
|
+
body:
|
41
|
+
encoding: UTF-8
|
42
|
+
string: '{"_links": [{"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
43
|
+
"method": "GET", "rel": "self"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
44
|
+
"method": "PUT", "rel": "update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
45
|
+
"method": "PATCH", "rel": "partial_update"}, {"href": "https://sandbox.emites.com.br/api/v1/webhooks/15",
|
46
|
+
"method": "DELETE", "rel": "destroy"}], "id": 15, "account_id": 4, "name":
|
47
|
+
"RSpec integration", "url": "http://requestb.in/1mayrfq1", "created_at": "2015-03-12T15:54:56.934Z"}'
|
48
|
+
http_version: '1.1'
|
49
|
+
adapter_metadata:
|
50
|
+
effective_url: https://sandbox.emites.com.br/api/v1/webhooks/15
|
51
|
+
recorded_at: Thu, 12 Mar 2015 15:55:22 GMT
|
52
|
+
recorded_with: VCR 2.9.3
|