conekta-tiempometa 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +24 -0
  3. data/.rspec +1 -0
  4. data/CHANGELOG.md +124 -0
  5. data/Dockerfile +44 -0
  6. data/Gemfile +13 -0
  7. data/LICENSE.txt +22 -0
  8. data/README.md +182 -0
  9. data/Rakefile +1 -0
  10. data/conekta.gemspec +29 -0
  11. data/lib/conekta/address.rb +5 -0
  12. data/lib/conekta/card.rb +21 -0
  13. data/lib/conekta/charge.rb +25 -0
  14. data/lib/conekta/conekta_object.rb +109 -0
  15. data/lib/conekta/customer.rb +82 -0
  16. data/lib/conekta/customer_info.rb +5 -0
  17. data/lib/conekta/destination.rb +17 -0
  18. data/lib/conekta/details.rb +5 -0
  19. data/lib/conekta/discount_line.rb +19 -0
  20. data/lib/conekta/error.rb +99 -0
  21. data/lib/conekta/error_details.rb +14 -0
  22. data/lib/conekta/event.rb +9 -0
  23. data/lib/conekta/line_item.rb +21 -0
  24. data/lib/conekta/list.rb +59 -0
  25. data/lib/conekta/log.rb +10 -0
  26. data/lib/conekta/method.rb +4 -0
  27. data/lib/conekta/operations/create.rb +19 -0
  28. data/lib/conekta/operations/create_member.rb +40 -0
  29. data/lib/conekta/operations/custom_action.rb +13 -0
  30. data/lib/conekta/operations/delete.rb +45 -0
  31. data/lib/conekta/operations/find.rb +21 -0
  32. data/lib/conekta/operations/update.rb +11 -0
  33. data/lib/conekta/operations/where.rb +30 -0
  34. data/lib/conekta/order.rb +87 -0
  35. data/lib/conekta/payee.rb +66 -0
  36. data/lib/conekta/payment_method.rb +4 -0
  37. data/lib/conekta/payment_source.rb +17 -0
  38. data/lib/conekta/payout.rb +7 -0
  39. data/lib/conekta/payout_method.rb +17 -0
  40. data/lib/conekta/plan.rb +16 -0
  41. data/lib/conekta/refund.rb +6 -0
  42. data/lib/conekta/requestor.rb +80 -0
  43. data/lib/conekta/resource.rb +54 -0
  44. data/lib/conekta/return.rb +12 -0
  45. data/lib/conekta/shipping_contact.rb +19 -0
  46. data/lib/conekta/shipping_line.rb +20 -0
  47. data/lib/conekta/subscription.rb +25 -0
  48. data/lib/conekta/tax_line.rb +19 -0
  49. data/lib/conekta/token.rb +8 -0
  50. data/lib/conekta/transfer.rb +7 -0
  51. data/lib/conekta/util.rb +136 -0
  52. data/lib/conekta/version.rb +3 -0
  53. data/lib/conekta/webhook.rb +12 -0
  54. data/lib/conekta/webhook_log.rb +4 -0
  55. data/lib/conekta.rb +101 -0
  56. data/lib/ssl_data/ca_bundle.crt +3955 -0
  57. data/locales/en.yml +9 -0
  58. data/locales/es.yml +10 -0
  59. data/readme_files/banner.png +0 -0
  60. data/readme_files/conekta-badge.png +0 -0
  61. data/readme_files/ruby-badge.png +0 -0
  62. data/spec/conekta/1.0.0/.DS_Store +0 -0
  63. data/spec/conekta/1.0.0/card_spec.rb +40 -0
  64. data/spec/conekta/1.0.0/charge_spec.rb +152 -0
  65. data/spec/conekta/1.0.0/customer_spec.rb +147 -0
  66. data/spec/conekta/1.0.0/error_spec.rb +69 -0
  67. data/spec/conekta/1.0.0/event_spec.rb +26 -0
  68. data/spec/conekta/1.0.0/log_spec.rb +20 -0
  69. data/spec/conekta/1.0.0/payout_spec.rb +60 -0
  70. data/spec/conekta/1.0.0/plan_spec.rb +53 -0
  71. data/spec/conekta/1.0.0/token_spec.rb +5 -0
  72. data/spec/conekta/1.0.0/webhook_spec.rb +36 -0
  73. data/spec/conekta/2.0.0/customer_spec.rb +77 -0
  74. data/spec/conekta/2.0.0/discount_line_spec.rb +49 -0
  75. data/spec/conekta/2.0.0/error_spec.rb +61 -0
  76. data/spec/conekta/2.0.0/line_item_spec.rb +53 -0
  77. data/spec/conekta/2.0.0/list_spec.rb +29 -0
  78. data/spec/conekta/2.0.0/order_spec.rb +291 -0
  79. data/spec/conekta/2.0.0/payee_spec.rb +55 -0
  80. data/spec/conekta/2.0.0/shipping_contact_spec.rb +60 -0
  81. data/spec/conekta/2.0.0/shipping_line_spec.rb +53 -0
  82. data/spec/conekta/2.0.0/source_spec.rb +31 -0
  83. data/spec/conekta/2.0.0/tax_line_spec.rb +44 -0
  84. data/spec/conekta/2.0.0/transfer_spec.rb +59 -0
  85. data/spec/conekta_spec.rb +29 -0
  86. data/spec/spec_helper.rb +14 -0
  87. data/spec/support/fixtures/orders.json +1127 -0
  88. data/spec/support/shared_context.rb +49 -0
  89. metadata +229 -0
@@ -0,0 +1,1127 @@
1
+ {
2
+ "next_page_url": "https://api.conekta.io/orders?next=ord_2hAEAS9sBb2D15ohV",
3
+ "has_more": true,
4
+ "total": 649,
5
+ "object": "list",
6
+ "data": [
7
+ {
8
+ "livemode": false,
9
+ "amount": 35600,
10
+ "currency": "MXN",
11
+ "amount_refunded": 0,
12
+ "customer_info": {
13
+ "email": "jul@conekta.io",
14
+ "phone": "+5215555555555",
15
+ "name": "Jul Ceballos",
16
+ "object": "customer_info"
17
+ },
18
+ "object": "order",
19
+ "id": "ord_2hAEHpZAyVkhzMFM2",
20
+ "metadata": {},
21
+ "created_at": 1504633928,
22
+ "updated_at": 1504633931,
23
+ "line_items": {
24
+ "object": "list",
25
+ "has_more": false,
26
+ "total": 1,
27
+ "data": [
28
+ {
29
+ "name": "Box of Cohiba S1s",
30
+ "unit_price": 35000,
31
+ "quantity": 1,
32
+ "object": "line_item",
33
+ "id": "line_item_2hAEHpZAyVkhzMFLz",
34
+ "parent_id": "ord_2hAEHpZAyVkhzMFM2",
35
+ "metadata": {
36
+ "random_key": "random value"
37
+ },
38
+ "antifraud_info": {}
39
+ }
40
+ ]
41
+ },
42
+ "tax_lines": {
43
+ "object": "list",
44
+ "has_more": false,
45
+ "total": 1,
46
+ "data": [
47
+ {
48
+ "description": "IVA",
49
+ "amount": 600,
50
+ "object": "tax_line",
51
+ "id": "tax_lin_2hAEHrZXjpJdQ8tvY",
52
+ "parent_id": "ord_2hAEHpZAyVkhzMFM2"
53
+ }
54
+ ]
55
+ }
56
+ },
57
+ {
58
+ "livemode": false,
59
+ "amount": 35000,
60
+ "currency": "MXN",
61
+ "amount_refunded": 0,
62
+ "customer_info": {
63
+ "email": "jul@conekta.io",
64
+ "phone": "+5215555555555",
65
+ "name": "Jul Ceballos",
66
+ "object": "customer_info"
67
+ },
68
+ "object": "order",
69
+ "id": "ord_2hAEHo2VS6gWBeAJx",
70
+ "metadata": {},
71
+ "created_at": 1504633927,
72
+ "updated_at": 1504633927,
73
+ "line_items": {
74
+ "object": "list",
75
+ "has_more": false,
76
+ "total": 1,
77
+ "data": [
78
+ {
79
+ "name": "Box of Cohiba S1s",
80
+ "unit_price": 35000,
81
+ "quantity": 1,
82
+ "object": "line_item",
83
+ "id": "line_item_2hAEHo2VS6gWBeAJv",
84
+ "parent_id": "ord_2hAEHo2VS6gWBeAJx",
85
+ "metadata": {},
86
+ "antifraud_info": {}
87
+ }
88
+ ]
89
+ },
90
+ "shipping_lines": {
91
+ "object": "list",
92
+ "has_more": false,
93
+ "total": 1,
94
+ "data": [
95
+ {
96
+ "amount": 0,
97
+ "carrier": "UPS",
98
+ "method": "Train",
99
+ "tracking_number": "TRACK123",
100
+ "object": "shipping_line",
101
+ "id": "ship_lin_2hAEHpZAyVrhmrqBR",
102
+ "parent_id": "ord_2hAEHo2VS6gWBeAJx"
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ {
108
+ "livemode": false,
109
+ "amount": 35000,
110
+ "currency": "MXN",
111
+ "amount_refunded": 0,
112
+ "customer_info": {
113
+ "email": "jul@conekta.io",
114
+ "phone": "+5215555555555",
115
+ "name": "Jul Ceballos",
116
+ "object": "customer_info"
117
+ },
118
+ "object": "order",
119
+ "id": "ord_2hAEHnsS8pXGecDro",
120
+ "metadata": {},
121
+ "created_at": 1504633926,
122
+ "updated_at": 1504633926,
123
+ "line_items": {
124
+ "object": "list",
125
+ "has_more": false,
126
+ "total": 1,
127
+ "data": [
128
+ {
129
+ "name": "Box of Cohiba S1s",
130
+ "unit_price": 35000,
131
+ "quantity": 1,
132
+ "object": "line_item",
133
+ "id": "line_item_2hAEHnsS8pXGecDrm",
134
+ "parent_id": "ord_2hAEHnsS8pXGecDro",
135
+ "metadata": {},
136
+ "antifraud_info": {}
137
+ }
138
+ ]
139
+ }
140
+ },
141
+ {
142
+ "livemode": false,
143
+ "amount": 34300,
144
+ "currency": "MXN",
145
+ "amount_refunded": 0,
146
+ "customer_info": {
147
+ "email": "jul@conekta.io",
148
+ "phone": "5575553324",
149
+ "name": "Jul Ceballos",
150
+ "object": "customer_info"
151
+ },
152
+ "object": "order",
153
+ "id": "ord_2hAEHks5NW3TeWWjG",
154
+ "metadata": {},
155
+ "created_at": 1504633923,
156
+ "updated_at": 1504633925,
157
+ "line_items": {
158
+ "object": "list",
159
+ "has_more": false,
160
+ "total": 1,
161
+ "data": [
162
+ {
163
+ "name": "Box of Cohiba S1s",
164
+ "unit_price": 35000,
165
+ "quantity": 1,
166
+ "object": "line_item",
167
+ "id": "line_item_2hAEHks5NW3TeWWjE",
168
+ "parent_id": "ord_2hAEHks5NW3TeWWjG",
169
+ "metadata": {},
170
+ "antifraud_info": {}
171
+ }
172
+ ]
173
+ },
174
+ "discount_lines": {
175
+ "object": "list",
176
+ "has_more": false,
177
+ "total": 1,
178
+ "data": [
179
+ {
180
+ "code": "567",
181
+ "amount": 700,
182
+ "type": "coupon",
183
+ "object": "discount_line",
184
+ "id": "dis_lin_2hAEHnLiQtxR5s9CR",
185
+ "parent_id": "ord_2hAEHks5NW3TeWWjG"
186
+ }
187
+ ]
188
+ }
189
+ },
190
+ {
191
+ "livemode": false,
192
+ "amount": 35000,
193
+ "currency": "USD",
194
+ "amount_refunded": 0,
195
+ "customer_info": {
196
+ "email": "jul@conekta.io",
197
+ "phone": "+5215555555555",
198
+ "name": "Jul Ceballos",
199
+ "object": "customer_info"
200
+ },
201
+ "object": "order",
202
+ "id": "ord_2hAEHibaJuAYV4EKb",
203
+ "metadata": {},
204
+ "created_at": 1504633920,
205
+ "updated_at": 1504633923,
206
+ "line_items": {
207
+ "object": "list",
208
+ "has_more": false,
209
+ "total": 1,
210
+ "data": [
211
+ {
212
+ "name": "Box of Cohiba S1s",
213
+ "unit_price": 35000,
214
+ "quantity": 1,
215
+ "object": "line_item",
216
+ "id": "line_item_2hAEHibaJuAYV4EKZ",
217
+ "parent_id": "ord_2hAEHibaJuAYV4EKb",
218
+ "metadata": {},
219
+ "antifraud_info": {}
220
+ }
221
+ ]
222
+ }
223
+ },
224
+ {
225
+ "livemode": false,
226
+ "amount": 35600,
227
+ "currency": "MXN",
228
+ "amount_refunded": 0,
229
+ "customer_info": {
230
+ "email": "jul@conekta.io",
231
+ "phone": "+5215555555555",
232
+ "name": "Jul Ceballos",
233
+ "object": "customer_info"
234
+ },
235
+ "object": "order",
236
+ "id": "ord_2hAEHiSX1d9NtzEuy",
237
+ "metadata": {},
238
+ "created_at": 1504633920,
239
+ "updated_at": 1504633920,
240
+ "line_items": {
241
+ "object": "list",
242
+ "has_more": false,
243
+ "total": 1,
244
+ "data": [
245
+ {
246
+ "name": "Box of Cohiba S1s",
247
+ "unit_price": 35000,
248
+ "quantity": 1,
249
+ "object": "line_item",
250
+ "id": "line_item_2hAEHiSX1d9NtzEuw",
251
+ "parent_id": "ord_2hAEHiSX1d9NtzEuy",
252
+ "metadata": {},
253
+ "antifraud_info": {}
254
+ }
255
+ ]
256
+ },
257
+ "tax_lines": {
258
+ "object": "list",
259
+ "has_more": false,
260
+ "total": 1,
261
+ "data": [
262
+ {
263
+ "description": "IVA",
264
+ "amount": 600,
265
+ "object": "tax_line",
266
+ "id": "tax_lin_2hAEHiSX1d6si85KU",
267
+ "parent_id": "ord_2hAEHiSX1d9NtzEuy",
268
+ "metadata": {
269
+ "random_key": "random_value"
270
+ }
271
+ }
272
+ ]
273
+ }
274
+ },
275
+ {
276
+ "livemode": false,
277
+ "amount": 35000,
278
+ "currency": "MXN",
279
+ "amount_refunded": 0,
280
+ "customer_info": {
281
+ "email": "jul@conekta.io",
282
+ "phone": "+5215555555555",
283
+ "name": "Jul Ceballos",
284
+ "object": "customer_info"
285
+ },
286
+ "object": "order",
287
+ "id": "ord_2hAEHhAymW3tbeQPt",
288
+ "metadata": {},
289
+ "created_at": 1504633918,
290
+ "updated_at": 1504633918,
291
+ "line_items": {
292
+ "object": "list",
293
+ "has_more": false,
294
+ "total": 1,
295
+ "data": [
296
+ {
297
+ "name": "Box of Cohiba S1s",
298
+ "unit_price": 35000,
299
+ "quantity": 1,
300
+ "object": "line_item",
301
+ "id": "line_item_2hAEHhAymW3tbeQPr",
302
+ "parent_id": "ord_2hAEHhAymW3tbeQPt",
303
+ "metadata": {},
304
+ "antifraud_info": {}
305
+ }
306
+ ]
307
+ },
308
+ "shipping_lines": {
309
+ "object": "list",
310
+ "has_more": false,
311
+ "total": 1,
312
+ "data": [
313
+ {
314
+ "amount": 0,
315
+ "carrier": "USPS",
316
+ "method": "Train",
317
+ "tracking_number": "TRACK123",
318
+ "object": "shipping_line",
319
+ "id": "ship_lin_2hAEHhhhVRYBJFm8x",
320
+ "parent_id": "ord_2hAEHhAymW3tbeQPt",
321
+ "metadata": {
322
+ "random_key": "random_value"
323
+ }
324
+ }
325
+ ]
326
+ }
327
+ },
328
+ {
329
+ "livemode": false,
330
+ "amount": 35000,
331
+ "currency": "MXN",
332
+ "payment_status": "paid",
333
+ "amount_refunded": 0,
334
+ "customer_info": {
335
+ "email": "jul@conekta.io",
336
+ "phone": "+5215555555555",
337
+ "name": "Jul Ceballos",
338
+ "object": "customer_info"
339
+ },
340
+ "object": "order",
341
+ "id": "ord_2hAEHgP7kJbD8MW3A",
342
+ "metadata": {},
343
+ "created_at": 1504633917,
344
+ "updated_at": 1504633953,
345
+ "line_items": {
346
+ "object": "list",
347
+ "has_more": false,
348
+ "total": 1,
349
+ "data": [
350
+ {
351
+ "name": "Box of Cohiba S1s",
352
+ "unit_price": 35000,
353
+ "quantity": 1,
354
+ "object": "line_item",
355
+ "id": "line_item_2hAEHgP7kJbD8MW38",
356
+ "parent_id": "ord_2hAEHgP7kJbD8MW3A",
357
+ "metadata": {},
358
+ "antifraud_info": {}
359
+ }
360
+ ]
361
+ },
362
+ "charges": {
363
+ "object": "list",
364
+ "has_more": false,
365
+ "total": 1,
366
+ "data": [
367
+ {
368
+ "id": "59aee43dedbb6e580e4325a5",
369
+ "livemode": false,
370
+ "created_at": 1504633917,
371
+ "currency": "MXN",
372
+ "payment_method": {
373
+ "service_name": "OxxoPay",
374
+ "object": "cash_payment",
375
+ "type": "oxxo",
376
+ "expires_at": 1513036800,
377
+ "store_name": "OXXO",
378
+ "reference": "93345678901234"
379
+ },
380
+ "object": "charge",
381
+ "description": "Payment from order",
382
+ "status": "paid",
383
+ "amount": 35000,
384
+ "paid_at": 1504633953,
385
+ "fee": 1421,
386
+ "customer_id": "",
387
+ "order_id": "ord_2hAEHgP7kJbD8MW3A"
388
+ }
389
+ ]
390
+ }
391
+ },
392
+ {
393
+ "livemode": false,
394
+ "amount": 70000,
395
+ "currency": "MXN",
396
+ "amount_refunded": 0,
397
+ "customer_info": {
398
+ "email": "jul@conekta.io",
399
+ "phone": "+5215555555555",
400
+ "name": "Jul Ceballos",
401
+ "object": "customer_info"
402
+ },
403
+ "object": "order",
404
+ "id": "ord_2hAEHfeJE745QZnps",
405
+ "metadata": {},
406
+ "created_at": 1504633916,
407
+ "updated_at": 1504633917,
408
+ "line_items": {
409
+ "object": "list",
410
+ "has_more": false,
411
+ "total": 2,
412
+ "data": [
413
+ {
414
+ "name": "Box of Cohiba S1s",
415
+ "unit_price": 35000,
416
+ "quantity": 1,
417
+ "object": "line_item",
418
+ "id": "line_item_2hAEHgP7kJaETYu1L",
419
+ "parent_id": "ord_2hAEHfeJE745QZnps",
420
+ "metadata": {},
421
+ "antifraud_info": {}
422
+ },
423
+ {
424
+ "name": "Box of Cohiba S1s",
425
+ "unit_price": 35000,
426
+ "quantity": 1,
427
+ "object": "line_item",
428
+ "id": "line_item_2hAEHfeJE745QZnpq",
429
+ "parent_id": "ord_2hAEHfeJE745QZnps",
430
+ "metadata": {},
431
+ "antifraud_info": {}
432
+ }
433
+ ]
434
+ }
435
+ },
436
+ {
437
+ "livemode": false,
438
+ "amount": 34400,
439
+ "currency": "MXN",
440
+ "amount_refunded": 0,
441
+ "customer_info": {
442
+ "email": "jul@conekta.io",
443
+ "phone": "+5215555555555",
444
+ "name": "Jul Ceballos",
445
+ "object": "customer_info"
446
+ },
447
+ "object": "order",
448
+ "id": "ord_2hAEHexXCuThSxDND",
449
+ "metadata": {},
450
+ "created_at": 1504633915,
451
+ "updated_at": 1504633916,
452
+ "line_items": {
453
+ "object": "list",
454
+ "has_more": false,
455
+ "total": 1,
456
+ "data": [
457
+ {
458
+ "name": "Box of Cohiba S1s",
459
+ "unit_price": 35000,
460
+ "quantity": 1,
461
+ "object": "line_item",
462
+ "id": "line_item_2hAEHexXCuThSxDNB",
463
+ "parent_id": "ord_2hAEHexXCuThSxDND",
464
+ "metadata": {},
465
+ "antifraud_info": {}
466
+ }
467
+ ]
468
+ },
469
+ "discount_lines": {
470
+ "object": "list",
471
+ "has_more": false,
472
+ "total": 1,
473
+ "data": [
474
+ {
475
+ "code": "123",
476
+ "amount": 600,
477
+ "type": "loyalty",
478
+ "object": "discount_line",
479
+ "id": "dis_lin_2hAEHfVEvpxGWP4jZ",
480
+ "parent_id": "ord_2hAEHexXCuThSxDND"
481
+ }
482
+ ]
483
+ }
484
+ },
485
+ {
486
+ "livemode": false,
487
+ "amount": 35000,
488
+ "currency": "MXN",
489
+ "payment_status": "refunded",
490
+ "amount_refunded": 35000,
491
+ "customer_info": {
492
+ "email": "jul@conekta.io",
493
+ "phone": "+5215555555555",
494
+ "name": "Jul Ceballos",
495
+ "object": "customer_info"
496
+ },
497
+ "object": "order",
498
+ "id": "ord_2hAEHW3eTWhLyajEp",
499
+ "metadata": {},
500
+ "created_at": 1504633903,
501
+ "updated_at": 1504633914,
502
+ "line_items": {
503
+ "object": "list",
504
+ "has_more": false,
505
+ "total": 1,
506
+ "data": [
507
+ {
508
+ "name": "Box of Cohiba S1s",
509
+ "unit_price": 35000,
510
+ "quantity": 1,
511
+ "object": "line_item",
512
+ "id": "line_item_2hAEHW3eTWhLyajEn",
513
+ "parent_id": "ord_2hAEHW3eTWhLyajEp",
514
+ "metadata": {},
515
+ "antifraud_info": {}
516
+ }
517
+ ]
518
+ },
519
+ "charges": {
520
+ "object": "list",
521
+ "has_more": false,
522
+ "total": 1,
523
+ "data": [
524
+ {
525
+ "id": "59aee430b795b0739bff75e2",
526
+ "livemode": false,
527
+ "created_at": 1504633904,
528
+ "currency": "MXN",
529
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
530
+ "payment_method": {
531
+ "name": "Jorge Lopez",
532
+ "exp_month": "12",
533
+ "exp_year": "19",
534
+ "auth_code": "061903",
535
+ "object": "card_payment",
536
+ "type": "credit",
537
+ "last4": "4242",
538
+ "brand": "visa",
539
+ "issuer": "",
540
+ "account_type": "",
541
+ "country": "US",
542
+ "fraud_score": 34,
543
+ "fraud_indicators": []
544
+ },
545
+ "object": "charge",
546
+ "description": "Payment from order",
547
+ "status": "refunded",
548
+ "amount": 35000,
549
+ "paid_at": 1504633913,
550
+ "fee": 1467,
551
+ "customer_id": "",
552
+ "order_id": "ord_2hAEHW3eTWhLyajEp",
553
+ "refunds": {
554
+ "object": "list",
555
+ "has_more": false,
556
+ "total": 1,
557
+ "data": [
558
+ {
559
+ "object": "refund",
560
+ "amount": -35000,
561
+ "auth_code": "061903",
562
+ "id": "59aee43affecf9795eb29649",
563
+ "created_at": 1504633914
564
+ }
565
+ ]
566
+ }
567
+ }
568
+ ]
569
+ }
570
+ },
571
+ {
572
+ "livemode": false,
573
+ "amount": 35000,
574
+ "currency": "MXN",
575
+ "payment_status": "refunded",
576
+ "amount_refunded": 35000,
577
+ "customer_info": {
578
+ "email": "jul@conekta.io",
579
+ "phone": "+5215555555555",
580
+ "name": "Jul Ceballos",
581
+ "object": "customer_info"
582
+ },
583
+ "object": "order",
584
+ "id": "ord_2hAEHM2kuqgTZj9oE",
585
+ "metadata": {
586
+ "yes": "nou"
587
+ },
588
+ "created_at": 1504633891,
589
+ "updated_at": 1504633901,
590
+ "line_items": {
591
+ "object": "list",
592
+ "has_more": false,
593
+ "total": 1,
594
+ "data": [
595
+ {
596
+ "name": "Box of Cohiba S1s",
597
+ "unit_price": 35000,
598
+ "quantity": 1,
599
+ "object": "line_item",
600
+ "id": "line_item_2hAEHM2kuqgTZj9oC",
601
+ "parent_id": "ord_2hAEHM2kuqgTZj9oE",
602
+ "metadata": {},
603
+ "antifraud_info": {}
604
+ }
605
+ ]
606
+ },
607
+ "charges": {
608
+ "object": "list",
609
+ "has_more": false,
610
+ "total": 1,
611
+ "data": [
612
+ {
613
+ "id": "59aee423b795b015fcfdb42e",
614
+ "livemode": false,
615
+ "created_at": 1504633891,
616
+ "currency": "MXN",
617
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
618
+ "payment_method": {
619
+ "name": "Jorge Lopez",
620
+ "exp_month": "12",
621
+ "exp_year": "19",
622
+ "auth_code": "082539",
623
+ "object": "card_payment",
624
+ "type": "credit",
625
+ "last4": "4242",
626
+ "brand": "visa",
627
+ "issuer": "",
628
+ "account_type": "",
629
+ "country": "US",
630
+ "fraud_score": 34,
631
+ "fraud_indicators": []
632
+ },
633
+ "object": "charge",
634
+ "description": "Payment from order",
635
+ "status": "refunded",
636
+ "amount": 35000,
637
+ "paid_at": 1504633900,
638
+ "fee": 1467,
639
+ "customer_id": "",
640
+ "order_id": "ord_2hAEHM2kuqgTZj9oE",
641
+ "refunds": {
642
+ "object": "list",
643
+ "has_more": false,
644
+ "total": 1,
645
+ "data": [
646
+ {
647
+ "object": "refund",
648
+ "amount": -35000,
649
+ "auth_code": "082539",
650
+ "id": "59aee42dedbb6e4f6542fab5",
651
+ "created_at": 1504633901
652
+ }
653
+ ]
654
+ }
655
+ }
656
+ ]
657
+ }
658
+ },
659
+ {
660
+ "livemode": false,
661
+ "amount": 35000,
662
+ "currency": "MXN",
663
+ "payment_status": "paid",
664
+ "amount_refunded": 0,
665
+ "customer_info": {
666
+ "email": "jul@conekta.io",
667
+ "phone": "+5215555555555",
668
+ "name": "Jul Ceballos",
669
+ "object": "customer_info"
670
+ },
671
+ "object": "order",
672
+ "id": "ord_2hAEH9xU6rEjBgCSq",
673
+ "metadata": {},
674
+ "created_at": 1504633876,
675
+ "updated_at": 1504633889,
676
+ "line_items": {
677
+ "object": "list",
678
+ "has_more": false,
679
+ "total": 1,
680
+ "data": [
681
+ {
682
+ "name": "Box of Cohiba S1s",
683
+ "unit_price": 35000,
684
+ "quantity": 1,
685
+ "object": "line_item",
686
+ "id": "line_item_2hAEH9xU6rEjBgCSo",
687
+ "parent_id": "ord_2hAEH9xU6rEjBgCSq",
688
+ "metadata": {},
689
+ "antifraud_info": {}
690
+ }
691
+ ]
692
+ },
693
+ "charges": {
694
+ "object": "list",
695
+ "has_more": false,
696
+ "total": 1,
697
+ "data": [
698
+ {
699
+ "id": "59aee415ffecf936c9b3d2b4",
700
+ "livemode": false,
701
+ "created_at": 1504633877,
702
+ "currency": "MXN",
703
+ "device_fingerprint": "123456789abcdefghijkmnopqrstuv",
704
+ "payment_method": {
705
+ "name": "Jorge Lopez",
706
+ "exp_month": "12",
707
+ "exp_year": "19",
708
+ "auth_code": "156573",
709
+ "object": "card_payment",
710
+ "type": "credit",
711
+ "last4": "4242",
712
+ "brand": "visa",
713
+ "issuer": "",
714
+ "account_type": "",
715
+ "country": "US",
716
+ "fraud_score": 34,
717
+ "fraud_indicators": []
718
+ },
719
+ "object": "charge",
720
+ "description": "Payment from order",
721
+ "status": "paid",
722
+ "amount": 35000,
723
+ "paid_at": 1504633889,
724
+ "fee": 1467,
725
+ "customer_id": "",
726
+ "order_id": "ord_2hAEH9xU6rEjBgCSq"
727
+ }
728
+ ]
729
+ }
730
+ },
731
+ {
732
+ "livemode": false,
733
+ "amount": 1175000,
734
+ "currency": "MXN",
735
+ "amount_refunded": 0,
736
+ "customer_info": {
737
+ "email": "jul@conekta.io",
738
+ "phone": "+5215555555555",
739
+ "name": "Jul Ceballos",
740
+ "object": "customer_info"
741
+ },
742
+ "object": "order",
743
+ "id": "ord_2hAEH9DeaepBkqNrt",
744
+ "metadata": {},
745
+ "created_at": 1504633875,
746
+ "updated_at": 1504633875,
747
+ "line_items": {
748
+ "next_page_url": "https://api.conekta.io/orders/ord_2hAEH9DeaepBkqNrt/line_items?next=line_item_2hAEH9DeaepBkqNrn&limit=5",
749
+ "object": "list",
750
+ "has_more": true,
751
+ "total": 25,
752
+ "data": [
753
+ {
754
+ "name": "Box of Cohiba S1s x",
755
+ "unit_price": 59000,
756
+ "quantity": 1,
757
+ "object": "line_item",
758
+ "id": "line_item_2hAEH9DeaepBkqNrr",
759
+ "parent_id": "ord_2hAEH9DeaepBkqNrt",
760
+ "metadata": {},
761
+ "antifraud_info": {}
762
+ },
763
+ {
764
+ "name": "Box of Cohiba S1s w",
765
+ "unit_price": 58000,
766
+ "quantity": 1,
767
+ "object": "line_item",
768
+ "id": "line_item_2hAEH9DeaepBkqNrq",
769
+ "parent_id": "ord_2hAEH9DeaepBkqNrt",
770
+ "metadata": {},
771
+ "antifraud_info": {}
772
+ },
773
+ {
774
+ "name": "Box of Cohiba S1s v",
775
+ "unit_price": 57000,
776
+ "quantity": 1,
777
+ "object": "line_item",
778
+ "id": "line_item_2hAEH9DeaepBkqNrp",
779
+ "parent_id": "ord_2hAEH9DeaepBkqNrt",
780
+ "metadata": {},
781
+ "antifraud_info": {}
782
+ },
783
+ {
784
+ "name": "Box of Cohiba S1s u",
785
+ "unit_price": 56000,
786
+ "quantity": 1,
787
+ "object": "line_item",
788
+ "id": "line_item_2hAEH9DeaepBkqNro",
789
+ "parent_id": "ord_2hAEH9DeaepBkqNrt",
790
+ "metadata": {},
791
+ "antifraud_info": {}
792
+ },
793
+ {
794
+ "name": "Box of Cohiba S1s t",
795
+ "unit_price": 55000,
796
+ "quantity": 1,
797
+ "object": "line_item",
798
+ "id": "line_item_2hAEH9DeaepBkqNrn",
799
+ "parent_id": "ord_2hAEH9DeaepBkqNrt",
800
+ "metadata": {},
801
+ "antifraud_info": {}
802
+ }
803
+ ]
804
+ }
805
+ },
806
+ {
807
+ "livemode": false,
808
+ "amount": 35700,
809
+ "currency": "MXN",
810
+ "amount_refunded": 0,
811
+ "object": "order",
812
+ "id": "ord_2hAEAZh7grx9s3rwb",
813
+ "metadata": {},
814
+ "created_at": 1504633358,
815
+ "updated_at": 1504633358,
816
+ "line_items": {
817
+ "object": "list",
818
+ "has_more": false,
819
+ "total": 1,
820
+ "data": [
821
+ {
822
+ "name": "Box of Cohiba S1s",
823
+ "description": "Imported From Mex.",
824
+ "unit_price": 35000,
825
+ "quantity": 1,
826
+ "tags": [
827
+ "food",
828
+ "mexican food"
829
+ ],
830
+ "object": "line_item",
831
+ "id": "line_item_2hAEAZh7grx9s3rwY",
832
+ "parent_id": "ord_2hAEAZh7grx9s3rwb",
833
+ "metadata": {},
834
+ "antifraud_info": {}
835
+ }
836
+ ]
837
+ },
838
+ "tax_lines": {
839
+ "object": "list",
840
+ "has_more": false,
841
+ "total": 2,
842
+ "data": [
843
+ {
844
+ "description": "ISR",
845
+ "amount": 100,
846
+ "object": "tax_line",
847
+ "id": "tax_lin_2hAEAZh7grx9s3rwa",
848
+ "parent_id": "ord_2hAEAZh7grx9s3rwb"
849
+ },
850
+ {
851
+ "description": "IVA",
852
+ "amount": 600,
853
+ "object": "tax_line",
854
+ "id": "tax_lin_2hAEAZh7grx9s3rwZ",
855
+ "parent_id": "ord_2hAEAZh7grx9s3rwb"
856
+ }
857
+ ]
858
+ }
859
+ },
860
+ {
861
+ "livemode": false,
862
+ "amount": 35650,
863
+ "currency": "MXN",
864
+ "amount_refunded": 0,
865
+ "object": "order",
866
+ "id": "ord_2hAEAZ1LffN8E3qcQ",
867
+ "metadata": {},
868
+ "created_at": 1504633357,
869
+ "updated_at": 1504633357,
870
+ "line_items": {
871
+ "object": "list",
872
+ "has_more": false,
873
+ "total": 1,
874
+ "data": [
875
+ {
876
+ "name": "Box of Cohiba S1s",
877
+ "description": "Imported From Mex.",
878
+ "unit_price": 35000,
879
+ "quantity": 1,
880
+ "tags": [
881
+ "food",
882
+ "mexican food"
883
+ ],
884
+ "object": "line_item",
885
+ "id": "line_item_2hAEAZ1LffN8E3qcM",
886
+ "parent_id": "ord_2hAEAZ1LffN8E3qcQ",
887
+ "metadata": {},
888
+ "antifraud_info": {}
889
+ }
890
+ ]
891
+ },
892
+ "tax_lines": {
893
+ "object": "list",
894
+ "has_more": false,
895
+ "total": 2,
896
+ "data": [
897
+ {
898
+ "description": "ISR",
899
+ "amount": 50,
900
+ "object": "tax_line",
901
+ "id": "tax_lin_2hAEAZ1LffN8E3qcP",
902
+ "parent_id": "ord_2hAEAZ1LffN8E3qcQ"
903
+ },
904
+ {
905
+ "description": "IVA",
906
+ "amount": 600,
907
+ "object": "tax_line",
908
+ "id": "tax_lin_2hAEAZ1LffN8E3qcN",
909
+ "parent_id": "ord_2hAEAZ1LffN8E3qcQ"
910
+ }
911
+ ]
912
+ }
913
+ },
914
+ {
915
+ "livemode": false,
916
+ "amount": 35600,
917
+ "currency": "MXN",
918
+ "amount_refunded": 0,
919
+ "object": "order",
920
+ "id": "ord_2hAEAY4RMBXQ1F7cu",
921
+ "metadata": {},
922
+ "created_at": 1504633356,
923
+ "updated_at": 1504633356,
924
+ "line_items": {
925
+ "object": "list",
926
+ "has_more": false,
927
+ "total": 1,
928
+ "data": [
929
+ {
930
+ "name": "Box of Cohiba S1s",
931
+ "description": "Imported From Mex.",
932
+ "unit_price": 35000,
933
+ "quantity": 1,
934
+ "tags": [
935
+ "food",
936
+ "mexican food"
937
+ ],
938
+ "object": "line_item",
939
+ "id": "line_item_2hAEAY4RMBXQ1F7cr",
940
+ "parent_id": "ord_2hAEAY4RMBXQ1F7cu",
941
+ "metadata": {},
942
+ "antifraud_info": {}
943
+ }
944
+ ]
945
+ },
946
+ "tax_lines": {
947
+ "object": "list",
948
+ "has_more": false,
949
+ "total": 1,
950
+ "data": [
951
+ {
952
+ "description": "IVA",
953
+ "amount": 600,
954
+ "object": "tax_line",
955
+ "id": "tax_lin_2hAEAY4RMBXQ1F7cs",
956
+ "parent_id": "ord_2hAEAY4RMBXQ1F7cu"
957
+ }
958
+ ]
959
+ }
960
+ },
961
+ {
962
+ "livemode": false,
963
+ "amount": 35040,
964
+ "currency": "MXN",
965
+ "amount_refunded": 0,
966
+ "object": "order",
967
+ "id": "ord_2hAEAUXP3U1Z5yqyw",
968
+ "metadata": {},
969
+ "created_at": 1504633351,
970
+ "updated_at": 1504633351,
971
+ "line_items": {
972
+ "object": "list",
973
+ "has_more": false,
974
+ "total": 1,
975
+ "data": [
976
+ {
977
+ "name": "Box of Cohiba S1s",
978
+ "description": "Imported From Mex.",
979
+ "unit_price": 35000,
980
+ "quantity": 1,
981
+ "tags": [
982
+ "food",
983
+ "mexican food"
984
+ ],
985
+ "object": "line_item",
986
+ "id": "line_item_2hAEAUXP3U1Z5yqyt",
987
+ "parent_id": "ord_2hAEAUXP3U1Z5yqyw",
988
+ "metadata": {},
989
+ "antifraud_info": {}
990
+ }
991
+ ]
992
+ },
993
+ "shipping_lines": {
994
+ "object": "list",
995
+ "has_more": false,
996
+ "total": 2,
997
+ "data": [
998
+ {
999
+ "amount": 40,
1000
+ "carrier": "USPS",
1001
+ "method": "Train",
1002
+ "tracking_number": "TRACK124",
1003
+ "object": "shipping_line",
1004
+ "id": "ship_lin_2hAEAUXP3U1Z5yqyv",
1005
+ "parent_id": "ord_2hAEAUXP3U1Z5yqyw"
1006
+ },
1007
+ {
1008
+ "amount": 0,
1009
+ "carrier": "USPS",
1010
+ "method": "Train",
1011
+ "tracking_number": "TRACK123",
1012
+ "object": "shipping_line",
1013
+ "id": "ship_lin_2hAEAUXP3U1Z5yqyu",
1014
+ "parent_id": "ord_2hAEAUXP3U1Z5yqyw"
1015
+ }
1016
+ ]
1017
+ }
1018
+ },
1019
+ {
1020
+ "livemode": false,
1021
+ "amount": 35040,
1022
+ "currency": "MXN",
1023
+ "amount_refunded": 0,
1024
+ "object": "order",
1025
+ "id": "ord_2hAEAT6nW4oiKXfYV",
1026
+ "metadata": {},
1027
+ "created_at": 1504633349,
1028
+ "updated_at": 1504633349,
1029
+ "line_items": {
1030
+ "object": "list",
1031
+ "has_more": false,
1032
+ "total": 1,
1033
+ "data": [
1034
+ {
1035
+ "name": "Box of Cohiba S1s",
1036
+ "description": "Imported From Mex.",
1037
+ "unit_price": 35000,
1038
+ "quantity": 1,
1039
+ "tags": [
1040
+ "food",
1041
+ "mexican food"
1042
+ ],
1043
+ "object": "line_item",
1044
+ "id": "line_item_2hAEAT6nW4oiKXfYS",
1045
+ "parent_id": "ord_2hAEAT6nW4oiKXfYV",
1046
+ "metadata": {},
1047
+ "antifraud_info": {}
1048
+ }
1049
+ ]
1050
+ },
1051
+ "shipping_lines": {
1052
+ "object": "list",
1053
+ "has_more": false,
1054
+ "total": 2,
1055
+ "data": [
1056
+ {
1057
+ "amount": 40,
1058
+ "carrier": "USPS",
1059
+ "method": "Air",
1060
+ "tracking_number": "TRACK124",
1061
+ "object": "shipping_line",
1062
+ "id": "ship_lin_2hAEAT6nW4oiKXfYU",
1063
+ "parent_id": "ord_2hAEAT6nW4oiKXfYV"
1064
+ },
1065
+ {
1066
+ "amount": 0,
1067
+ "carrier": "USPS",
1068
+ "method": "Train",
1069
+ "tracking_number": "TRACK123",
1070
+ "object": "shipping_line",
1071
+ "id": "ship_lin_2hAEAT6nW4oiKXfYT",
1072
+ "parent_id": "ord_2hAEAT6nW4oiKXfYV"
1073
+ }
1074
+ ]
1075
+ }
1076
+ },
1077
+ {
1078
+ "livemode": false,
1079
+ "amount": 35000,
1080
+ "currency": "MXN",
1081
+ "amount_refunded": 0,
1082
+ "object": "order",
1083
+ "id": "ord_2hAEAS9sBb2D15ohV",
1084
+ "metadata": {},
1085
+ "created_at": 1504633348,
1086
+ "updated_at": 1504633349,
1087
+ "line_items": {
1088
+ "object": "list",
1089
+ "has_more": false,
1090
+ "total": 1,
1091
+ "data": [
1092
+ {
1093
+ "name": "Box of Cohiba S1s",
1094
+ "description": "Imported From Mex.",
1095
+ "unit_price": 35000,
1096
+ "quantity": 1,
1097
+ "tags": [
1098
+ "food",
1099
+ "mexican food"
1100
+ ],
1101
+ "object": "line_item",
1102
+ "id": "line_item_2hAEAS9sBb2D15ohS",
1103
+ "parent_id": "ord_2hAEAS9sBb2D15ohV",
1104
+ "metadata": {},
1105
+ "antifraud_info": {}
1106
+ }
1107
+ ]
1108
+ },
1109
+ "shipping_lines": {
1110
+ "object": "list",
1111
+ "has_more": false,
1112
+ "total": 1,
1113
+ "data": [
1114
+ {
1115
+ "amount": 0,
1116
+ "carrier": "USPS",
1117
+ "method": "Train",
1118
+ "tracking_number": "TRACK123",
1119
+ "object": "shipping_line",
1120
+ "id": "ship_lin_2hAEAS9sBb2D15ohT",
1121
+ "parent_id": "ord_2hAEAS9sBb2D15ohV"
1122
+ }
1123
+ ]
1124
+ }
1125
+ }
1126
+ ]
1127
+ }