emites-client 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,7 @@ describe Emites::Resources::Emitter do
71
71
  it "returns an array of emitters" do
72
72
  VCR.use_cassette("emitters/list/success") do
73
73
  entities = subject.list
74
- expect(entities).to be_a(Array)
74
+ expect(entities).to be_a(Emites::Entities::Collection)
75
75
  entities.each do |e|
76
76
  expect(e).to be_a(entity_klass)
77
77
  end
@@ -83,7 +83,7 @@ describe Emites::Resources::Emitter do
83
83
  it "returns an array of emitters where CNPJ is '17799377000155'" do
84
84
  VCR.use_cassette("emitters/search/success") do
85
85
  entities = subject.search({ cnpj: "17799377000155" })
86
- expect(entities).to be_a(Array)
86
+ expect(entities).to be_a(Emites::Entities::Collection)
87
87
  expect(entities.count).to eq(1)
88
88
  entities.each do |e|
89
89
  expect(e).to be_a(entity_klass)
@@ -94,7 +94,7 @@ describe Emites::Resources::Emitter do
94
94
  it "returns empty" do
95
95
  VCR.use_cassette("emitters/search/returns_empty") do
96
96
  entities = subject.search({ cnpj: "1775" })
97
- expect(entities).to be_a(Array)
97
+ expect(entities).to be_a(Emites::Entities::Collection)
98
98
  expect(entities).to be_empty
99
99
  end
100
100
  end
@@ -65,7 +65,7 @@ describe Emites::Resources::Nfse do
65
65
  it "returns an array of Nfse" do
66
66
  VCR.use_cassette("nfse/list/success") do
67
67
  nfses = subject.list
68
- expect(nfses).to be_a(Array)
68
+ expect(nfses).to be_a(Emites::Entities::Collection)
69
69
  nfses.each do |e|
70
70
  expect(e).to be_a(entity_klass)
71
71
  end
@@ -73,6 +73,20 @@ describe Emites::Resources::Nfse do
73
73
  end
74
74
  end
75
75
 
76
+ describe "#search" do
77
+ it "filters nfse's by status" do
78
+ VCR.use_cassette("nfse/search/success") do
79
+ nfses = subject.search({ status: 'accepted' })
80
+ expect(nfses).to be_a(Emites::Entities::Collection)
81
+ expect(nfses.count).not_to be(0)
82
+ nfses.each do |e|
83
+ expect(e).to be_a(entity_klass)
84
+ expect(e.status).to eq('accepted')
85
+ end
86
+ end
87
+ end
88
+ end
89
+
76
90
  describe "#info" do
77
91
  it "returns a Nfse instance where id is 456" do
78
92
  VCR.use_cassette("nfse/info/success") do
@@ -99,7 +113,7 @@ describe Emites::Resources::Nfse do
99
113
  it "returns a Nfse instance status history" do
100
114
  VCR.use_cassette("nfse/history/success") do
101
115
  nfse_status_history = subject.history(456)
102
- expect(nfse_status_history).to be_a(Array)
116
+ expect(nfse_status_history).to be_a(Emites::Entities::Collection)
103
117
  nfse_status_history.each do |e|
104
118
  expect(e).to be_a(Emites::Entities::NfseStatusTransition)
105
119
  end
@@ -211,4 +225,4 @@ describe Emites::Resources::Nfse do
211
225
  end
212
226
  end
213
227
 
214
- end
228
+ end
@@ -59,7 +59,7 @@ describe Emites::Resources::Service do
59
59
  it "returns an array of services" do
60
60
  VCR.use_cassette("services/list/success") do
61
61
  entities = subject.list
62
- expect(entities).to be_a(Array)
62
+ expect(entities).to be_a(Emites::Entities::Collection)
63
63
  entities.each do |e|
64
64
  expect(e).to be_a(entity_klass)
65
65
  end
@@ -71,7 +71,7 @@ describe Emites::Resources::Service do
71
71
  it "returns an array of services where name is 'Serviços de informática'" do
72
72
  VCR.use_cassette("services/search/success") do
73
73
  entities = subject.search({ name: "Serviços de informática" })
74
- expect(entities).to be_a(Array)
74
+ expect(entities).to be_a(Emites::Entities::Collection)
75
75
  expect(entities.count).to eq(1)
76
76
  entities.each do |e|
77
77
  expect(e).to be_a(entity_klass)
@@ -82,7 +82,7 @@ describe Emites::Resources::Service do
82
82
  it "returns empty" do
83
83
  VCR.use_cassette("services/search/returns_empty") do
84
84
  entities = subject.search({ name: "abc" })
85
- expect(entities).to be_a(Array)
85
+ expect(entities).to be_a(Emites::Entities::Collection)
86
86
  expect(entities).to be_empty
87
87
  end
88
88
  end
@@ -69,7 +69,7 @@ describe Emites::Resources::Taker do
69
69
  it "returns an array of takers" do
70
70
  VCR.use_cassette("takers/list/success") do
71
71
  entities = subject.list
72
- expect(entities).to be_a(Array)
72
+ expect(entities).to be_a(Emites::Entities::Collection)
73
73
  entities.each do |e|
74
74
  expect(e).to be_a(entity_klass)
75
75
  end
@@ -81,7 +81,7 @@ describe Emites::Resources::Taker do
81
81
  it "returns an array of takers where CNPJ is '01001001000113'" do
82
82
  VCR.use_cassette("takers/search/success") do
83
83
  entities = subject.search({ cnpj: "01001001000113" })
84
- expect(entities).to be_a(Array)
84
+ expect(entities).to be_a(Emites::Entities::Collection)
85
85
  expect(entities.count).to eq(1)
86
86
  entities.each do |e|
87
87
  expect(e).to be_a(entity_klass)
@@ -92,7 +92,7 @@ describe Emites::Resources::Taker do
92
92
  it "returns empty" do
93
93
  VCR.use_cassette("takers/search/returns_empty") do
94
94
  entities = subject.search({ cnpj: "1775" })
95
- expect(entities).to be_a(Array)
95
+ expect(entities).to be_a(Emites::Entities::Collection)
96
96
  expect(entities).to be_empty
97
97
  end
98
98
  end
@@ -22,7 +22,7 @@ describe Emites::Resources::Webhook do
22
22
  it "returns an array of Webhooks" do
23
23
  VCR.use_cassette("webhooks/list/success") do
24
24
  webhooks = subject.list
25
- expect(webhooks).to be_a(Array)
25
+ expect(webhooks).to be_a(Emites::Entities::Collection)
26
26
  webhooks.each do |e|
27
27
  expect(e).to be_a(entity_klass)
28
28
  end
@@ -59,4 +59,4 @@ describe Emites::Resources::Webhook do
59
59
  end
60
60
  end
61
61
 
62
- end
62
+ end
@@ -0,0 +1,100 @@
1
+ require "spec_helper"
2
+
3
+ describe Emites::Response do
4
+
5
+ subject { described_class.new(response) }
6
+
7
+ describe "#resolve!" do
8
+ context 'when successful' do
9
+ let(:response) { double(success?: true, timed_out?: false) }
10
+
11
+ it 'returns self' do
12
+ expect(subject.resolve!).to eq(response)
13
+ end
14
+
15
+ context 'when block given' do
16
+ it 'returns block' do
17
+ expect(subject.resolve!{ response }).to eq(response)
18
+ end
19
+ end
20
+ end
21
+
22
+ context 'when redirected' do
23
+ let(:response) { double(success?: false, timed_out?: false, code: 301) }
24
+
25
+ it 'returns self' do
26
+ expect(subject.resolve!).to eq(response)
27
+ end
28
+
29
+ context 'when block given' do
30
+ it 'returns block' do
31
+ expect(subject.resolve!{ response }).to eq(response)
32
+ end
33
+ end
34
+ end
35
+
36
+ context 'when timed out' do
37
+ let(:response) { double(success?: false, timed_out?: true) }
38
+
39
+ it 'raises RequestTimeout' do
40
+ expect { subject.resolve! }.to raise_error(Emites::RequestTimeout)
41
+ end
42
+ end
43
+
44
+ context 'when in error' do
45
+ let(:response) { double(success?: false, timed_out?: false, code: 418, status_message: "I'm a teapot",
46
+ body: %Q({"error": "Unable to comply with brew coffee request"})) }
47
+
48
+ it 'raises RequestError' do
49
+ expect { subject.resolve! }.to raise_error do |error|
50
+ expect(error).to be_a(Emites::RequestError)
51
+ expect(error.code).to eq(418)
52
+ expect(error.message).to eq("I'm a teapot")
53
+ expect(error.body).to eq({ "error" => "Unable to comply with brew coffee request" })
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ describe '#redirected?' do
60
+ let(:response) { double(success?: false, timed_out?: false, code: 301) }
61
+
62
+ context 'when http status is 3xx' do
63
+ it 'is true' do
64
+ expect(subject.redirected?).to be_truthy
65
+ end
66
+ end
67
+
68
+ context 'when http status is 2xx' do
69
+ before { allow(response).to receive(:code).and_return(200) }
70
+ it 'is false' do
71
+ expect(subject.redirected?).to be_falsy
72
+ end
73
+ end
74
+
75
+ context 'when http status is 4xx' do
76
+ before { allow(response).to receive(:code).and_return(422) }
77
+ it 'is false' do
78
+ expect(subject.redirected?).to be_falsy
79
+ end
80
+ end
81
+ end
82
+
83
+ describe "#parsed_body" do
84
+ let(:response) { double(success?: true) }
85
+
86
+ context "when JSON is invalid" do
87
+ it "returns empty hash" do
88
+ allow(subject).to receive(:body).and_return(%Q({"key": ))
89
+ expect(subject.parsed_body).to eq({})
90
+ end
91
+ end
92
+
93
+ context "when JSON is valid" do
94
+ it "returns empty hash" do
95
+ allow(subject).to receive(:body).and_return(%Q({"key": "value"}))
96
+ expect(subject.parsed_body).to eq({ "key" => "value" })
97
+ end
98
+ end
99
+ end
100
+ end
@@ -0,0 +1,424 @@
1
+ {
2
+ "count": 1000,
3
+ "next": "https://sandbox.emites.com.br/api/v1/nfse?emitter_id=4&status=accepted&page=3",
4
+ "previous": "https://sandbox.emites.com.br/api/v1/nfse?emitter_id=4&status=accepted&page=1",
5
+ "collection": [
6
+ {
7
+ "_links": [
8
+ {
9
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836",
10
+ "method": "GET",
11
+ "rel": "self"
12
+ },
13
+ {
14
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836",
15
+ "method": "DELETE",
16
+ "rel": "destroy"
17
+ },
18
+ {
19
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836/status",
20
+ "method": "GET",
21
+ "rel": "status"
22
+ },
23
+ {
24
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836/cancel",
25
+ "method": "POST",
26
+ "rel": "cancel"
27
+ },
28
+ {
29
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836/xml",
30
+ "method": "GET",
31
+ "rel": "xml"
32
+ },
33
+ {
34
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836/pdf",
35
+ "method": "GET",
36
+ "rel": "pdf"
37
+ },
38
+ {
39
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1836/history",
40
+ "method": "GET",
41
+ "rel": "history"
42
+ },
43
+ {
44
+ "href": "https://sandbox.emites.com.br/nfse/show/1836",
45
+ "method": "GET",
46
+ "rel": "html"
47
+ }
48
+ ],
49
+ "nfse_errors": [],
50
+ "service_values": {
51
+ "city_tax_code": "010501",
52
+ "service_amount": "100.00",
53
+ "pis_amount": "0.65",
54
+ "inss_amount": "0.00",
55
+ "nfse_liquid_amount": "93.85",
56
+ "iss_amount": "5.00",
57
+ "cnae_code": null,
58
+ "deduction_amount": "0.00",
59
+ "retained_iss_amount": null,
60
+ "tax_burden_amount": null,
61
+ "unconditioned_discount": "0.00",
62
+ "tax_burden_source": null,
63
+ "city_code": 3304557,
64
+ "tax_burden_percentage": null,
65
+ "description": "OK",
66
+ "ir_amount": "1.50",
67
+ "other_retentions": "0.00",
68
+ "discount_conditioning_amount": "0.00",
69
+ "iss_percentage": "5.00",
70
+ "calculation_base": "100.00",
71
+ "csll_amount": "1.00",
72
+ "retained_iss": false,
73
+ "service_item_code": "0105",
74
+ "cofins_amount": "3.00"
75
+ },
76
+ "substitute_rps": null,
77
+ "environment": "sandbox",
78
+ "taker": {
79
+ "cnpj": "45349838000123",
80
+ "fancy_name": null,
81
+ "city_inscription": null,
82
+ "substitute_state_inscription": null,
83
+ "address": {
84
+ "neighborhood": "Sé",
85
+ "country_abbreviation": "BR",
86
+ "reference_point": null,
87
+ "complement": "Igreja",
88
+ "number": "12",
89
+ "neighborhood_type": null,
90
+ "street": "Praça da Sé",
91
+ "country_code": "01058",
92
+ "city": "São Paulo",
93
+ "country": "BR",
94
+ "state": "SP",
95
+ "street_type": null,
96
+ "city_code": 3550308,
97
+ "zip_code": "01001000"
98
+ },
99
+ "state_inscription": null,
100
+ "social_reason": "A Empresa com Endereço ",
101
+ "cpf": null,
102
+ "contact": {
103
+ "phone": "",
104
+ "email": null
105
+ },
106
+ "special_situation": null,
107
+ "foreign_taker": false
108
+ },
109
+ "emitter_id": 4,
110
+ "batch_id": null,
111
+ "service_values_rps_operation": null,
112
+ "service_values_rps_taxation": null,
113
+ "service_values_tipo_recolhimento": null,
114
+ "service_values_highlight_retentions": null,
115
+ "xml_url": "https://sandbox.emites.com.br/api/v1/nfse/1836/xml",
116
+ "pdf_url": "https://sandbox.emites.com.br/api/v1/nfse/1836/pdf",
117
+ "rps_situation": "1",
118
+ "operation_nature": "1",
119
+ "special_regime": null,
120
+ "rps_type": "1",
121
+ "serie": "6",
122
+ "id": 1836,
123
+ "is_complete": true,
124
+ "allow_incomplete": false,
125
+ "status": "accepted",
126
+ "description": "Processado pela Sefaz",
127
+ "nfse_key": "MYNF-B34Y",
128
+ "nfse_number": 1454,
129
+ "protocol": null,
130
+ "send_nfse_taker": false,
131
+ "is_api": true,
132
+ "user_id": null,
133
+ "pdf_emissor": null,
134
+ "number": 530,
135
+ "emission_date": "2015-12-14T10:47:00",
136
+ "emission_date_nfse": "2015-12-14T10:47:49",
137
+ "other_informations": "Criado pelo Billimatic, contrato CONTRATO, faturamento #4744.",
138
+ "competence": "2015-12-14T10:47:00",
139
+ "emitter_national_simple_optant": false,
140
+ "emitter_cultural_promoter": false,
141
+ "service_values_item_description": null,
142
+ "service_values_tax_burden_highlight": false,
143
+ "already_added": false
144
+ },
145
+ {
146
+ "_links": [
147
+ {
148
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107",
149
+ "method": "GET",
150
+ "rel": "self"
151
+ },
152
+ {
153
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107",
154
+ "method": "DELETE",
155
+ "rel": "destroy"
156
+ },
157
+ {
158
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107/status",
159
+ "method": "GET",
160
+ "rel": "status"
161
+ },
162
+ {
163
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107/cancel",
164
+ "method": "POST",
165
+ "rel": "cancel"
166
+ },
167
+ {
168
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107/xml",
169
+ "method": "GET",
170
+ "rel": "xml"
171
+ },
172
+ {
173
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107/pdf",
174
+ "method": "GET",
175
+ "rel": "pdf"
176
+ },
177
+ {
178
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/1107/history",
179
+ "method": "GET",
180
+ "rel": "history"
181
+ },
182
+ {
183
+ "href": "https://sandbox.emites.com.br/nfse/show/1107",
184
+ "method": "GET",
185
+ "rel": "html"
186
+ }
187
+ ],
188
+ "nfse_errors": [],
189
+ "service_values": {
190
+ "city_tax_code": "010501",
191
+ "service_amount": "3500.00",
192
+ "pis_amount": "22.75",
193
+ "inss_amount": "0.00",
194
+ "nfse_liquid_amount": "3284.75",
195
+ "iss_amount": "175.00",
196
+ "cnae_code": null,
197
+ "deduction_amount": "0.00",
198
+ "retained_iss_amount": null,
199
+ "tax_burden_amount": null,
200
+ "unconditioned_discount": "0.00",
201
+ "tax_burden_source": null,
202
+ "city_code": 3304557,
203
+ "tax_burden_percentage": null,
204
+ "description": "ALuguel do rexpense",
205
+ "ir_amount": "52.50",
206
+ "other_retentions": "0.00",
207
+ "discount_conditioning_amount": "0.00",
208
+ "iss_percentage": "5.00",
209
+ "calculation_base": "3500.00",
210
+ "csll_amount": "35.00",
211
+ "retained_iss": false,
212
+ "service_item_code": "0105",
213
+ "cofins_amount": "105.00"
214
+ },
215
+ "substitute_rps": null,
216
+ "environment": "sandbox",
217
+ "taker": {
218
+ "cnpj": "58153377000160",
219
+ "fancy_name": "ACME",
220
+ "city_inscription": "lalal",
221
+ "substitute_state_inscription": "opa oapo poapo ",
222
+ "address": {
223
+ "neighborhood": "Ipanema",
224
+ "country_abbreviation": "BR",
225
+ "reference_point": "",
226
+ "complement": "apto 898989",
227
+ "number": "213",
228
+ "neighborhood_type": "RED",
229
+ "street": "Rua Barão da Torre",
230
+ "country_code": "01058",
231
+ "city": "Rio de Janeiro",
232
+ "country": "BR",
233
+ "state": "RJ",
234
+ "street_type": "RUA",
235
+ "city_code": 3304557,
236
+ "zip_code": "22411001"
237
+ },
238
+ "state_inscription": "ISENTO",
239
+ "social_reason": "Acme Inc.",
240
+ "cpf": "",
241
+ "contact": {
242
+ "phone": "21212121212",
243
+ "email": ""
244
+ },
245
+ "special_situation": 0,
246
+ "foreign_taker": false
247
+ },
248
+ "emitter_id": 4,
249
+ "batch_id": null,
250
+ "service_values_rps_operation": null,
251
+ "service_values_rps_taxation": null,
252
+ "service_values_tipo_recolhimento": null,
253
+ "service_values_highlight_retentions": null,
254
+ "xml_url": "https://sandbox.emites.com.br/api/v1/nfse/1107/xml",
255
+ "pdf_url": "https://sandbox.emites.com.br/api/v1/nfse/1107/pdf",
256
+ "rps_situation": "1",
257
+ "operation_nature": "1",
258
+ "special_regime": null,
259
+ "rps_type": "1",
260
+ "serie": "3",
261
+ "id": 1107,
262
+ "is_complete": true,
263
+ "allow_incomplete": false,
264
+ "status": "accepted",
265
+ "description": "Processado pela Sefaz",
266
+ "nfse_key": "GBZK-4YZM",
267
+ "nfse_number": 2859,
268
+ "protocol": null,
269
+ "send_nfse_taker": false,
270
+ "is_api": true,
271
+ "user_id": null,
272
+ "pdf_emissor": null,
273
+ "number": 39,
274
+ "emission_date": "2015-10-19T15:53:00",
275
+ "emission_date_nfse": "2015-10-19T17:53:21",
276
+ "other_informations": "Criado pelo Dom Contrato, contrato Aluguel do Rexpense para ACME Inc., faturamento #3859.",
277
+ "competence": "2015-10-19T15:53:00",
278
+ "emitter_national_simple_optant": false,
279
+ "emitter_cultural_promoter": false,
280
+ "service_values_item_description": null,
281
+ "service_values_tax_burden_highlight": false,
282
+ "already_added": false
283
+ },
284
+ {
285
+ "_links": [
286
+ {
287
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963",
288
+ "method": "GET",
289
+ "rel": "self"
290
+ },
291
+ {
292
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963",
293
+ "method": "DELETE",
294
+ "rel": "destroy"
295
+ },
296
+ {
297
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963/status",
298
+ "method": "GET",
299
+ "rel": "status"
300
+ },
301
+ {
302
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963/cancel",
303
+ "method": "POST",
304
+ "rel": "cancel"
305
+ },
306
+ {
307
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963/xml",
308
+ "method": "GET",
309
+ "rel": "xml"
310
+ },
311
+ {
312
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963/pdf",
313
+ "method": "GET",
314
+ "rel": "pdf"
315
+ },
316
+ {
317
+ "href": "https://sandbox.emites.com.br/api/v1/nfse/963/history",
318
+ "method": "GET",
319
+ "rel": "history"
320
+ },
321
+ {
322
+ "href": "https://sandbox.emites.com.br/nfse/show/963",
323
+ "method": "GET",
324
+ "rel": "html"
325
+ }
326
+ ],
327
+ "nfse_errors": [],
328
+ "service_values": {
329
+ "city_tax_code": "010501",
330
+ "service_amount": "2000.00",
331
+ "pis_amount": "13.00",
332
+ "inss_amount": "0.00",
333
+ "nfse_liquid_amount": "1877.00",
334
+ "iss_amount": "100.00",
335
+ "cnae_code": null,
336
+ "deduction_amount": "0.00",
337
+ "retained_iss_amount": null,
338
+ "tax_burden_amount": null,
339
+ "unconditioned_discount": "0.00",
340
+ "tax_burden_source": null,
341
+ "city_code": 3304557,
342
+ "tax_burden_percentage": null,
343
+ "description": "Prestação de serviços",
344
+ "ir_amount": "30.00",
345
+ "other_retentions": "0.00",
346
+ "discount_conditioning_amount": "0.00",
347
+ "iss_percentage": "5.00",
348
+ "calculation_base": "2000.00",
349
+ "csll_amount": "20.00",
350
+ "retained_iss": false,
351
+ "service_item_code": "0105",
352
+ "cofins_amount": "60.00"
353
+ },
354
+ "substitute_rps": null,
355
+ "environment": "sandbox",
356
+ "taker": {
357
+ "cnpj": "58153377000160",
358
+ "fancy_name": "ACME",
359
+ "city_inscription": "lalal",
360
+ "substitute_state_inscription": "opa oapo poapo ",
361
+ "address": {
362
+ "neighborhood": "Ipanema",
363
+ "country_abbreviation": "BR",
364
+ "reference_point": "",
365
+ "complement": "apto 898989",
366
+ "number": "213",
367
+ "neighborhood_type": "RED",
368
+ "street": "Rua Barão da Torre",
369
+ "country_code": "01058",
370
+ "city": "Rio de Janeiro",
371
+ "country": "BR",
372
+ "state": "RJ",
373
+ "street_type": "RUA",
374
+ "city_code": 3304557,
375
+ "zip_code": "22411001"
376
+ },
377
+ "state_inscription": "ISENTO",
378
+ "social_reason": "Acme Inc.",
379
+ "cpf": "",
380
+ "contact": {
381
+ "phone": "21212121212",
382
+ "email": ""
383
+ },
384
+ "special_situation": 0,
385
+ "foreign_taker": false
386
+ },
387
+ "emitter_id": 4,
388
+ "batch_id": null,
389
+ "service_values_rps_operation": null,
390
+ "service_values_rps_taxation": null,
391
+ "service_values_tipo_recolhimento": null,
392
+ "service_values_highlight_retentions": null,
393
+ "xml_url": "https://sandbox.emites.com.br/api/v1/nfse/963/xml",
394
+ "pdf_url": "https://sandbox.emites.com.br/api/v1/nfse/963/pdf",
395
+ "rps_situation": null,
396
+ "operation_nature": "1",
397
+ "special_regime": null,
398
+ "rps_type": null,
399
+ "serie": "contr",
400
+ "id": 963,
401
+ "is_complete": true,
402
+ "allow_incomplete": false,
403
+ "status": "accepted",
404
+ "description": "Processado pela Sefaz",
405
+ "nfse_key": "TCER-VBCB",
406
+ "nfse_number": 1074,
407
+ "protocol": null,
408
+ "send_nfse_taker": false,
409
+ "is_api": true,
410
+ "user_id": null,
411
+ "pdf_emissor": null,
412
+ "number": 19,
413
+ "emission_date": "2015-08-21T06:57:00",
414
+ "emission_date_nfse": null,
415
+ "other_informations": "Criado pelo Dom Contrato, contrato Aluguel do PSOffice para ACME, faturamento #2948.",
416
+ "competence": "2015-08-21T06:57:00",
417
+ "emitter_national_simple_optant": false,
418
+ "emitter_cultural_promoter": false,
419
+ "service_values_item_description": null,
420
+ "service_values_tax_burden_highlight": false,
421
+ "already_added": false
422
+ }
423
+ ]
424
+ }