• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sgerrand / ex_teya / 38604777578
100%

Build:
DEFAULT BRANCH: main
Ran 14 Oct 2026 05:13PM UTC
Jobs 1
Files 25
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Oct 2026 05:13PM UTC coverage: 100.0%. Remained the same
38604777578

push

github

web-flow
fix(client)!: send Idempotency-Key only where Teya documents it (#66)

* fix(client): send Idempotency-Key only where Teya documents it

Every POST and PATCH got an Idempotency-Key, unless it went through
post_without_idempotency_key/2. Teya's Online Payments, Payments Gateway
and POSLink specs document the header on nine POSTs only, the ones that
already go through idempotent_post/2. Six other writes got a key their
spec does not document, which the endpoint could refuse:

- POST /v1/transactions/{id}/receipts (Receipt.create/3)
- POST /v2/reversals (Reversal.create/2)
- POST /poslink/v1/receipt-requests (POSLink.Receipt.create/2)
- PATCH /v2/payment-links/{id} (PayByLink.update/3)
- PATCH /poslink/v2/payment-requests/{id} (POSLink.Payment.cancel/2)
- POST /poslink/v1/epos/register (POSLink.Epos.register/2)

Now only idempotent_post/2 sends the key, and request/3 sends none.
post_without_idempotency_key/2 is gone: DCC offers use request/3. The
:idempotency_key option is dropped from the docs of the six functions.

* fix(client)!: never send a request without the key it needs

- idempotent_post/2 works out the key itself, the caller's or a made-up
  one, and passes it to send_request/5. Before, idempotency_key: nil sent
  no key at all, while retries still ran, so a retried POST could act
  twice.
- request/3 and request_with_token/4 raise ArgumentError when given
  :idempotency_key, instead of dropping it without a word.
- The Teya moduledoc and README describe which requests carry a key, and
  the README lists PUT and DELETE writes among those that do not.
- The retry test also checks that DCC.quote/2 is sent once, with no key.

BREAKING CHANGE: Receipt.create/3, Reversal.create/2,
POSLink.Receipt.create/2, PayByLink.update/3, POSLink.Payment.cancel/2,
POSLink.Epos.register/2 and DCC.quote/2 no longer send an
Idempotency-Key, which Teya's specs do not document for them, and raise
ArgumentError when given :idempotency_key.

* fix(client): refuse a ke... (continued)

17 of 17 new or added lines in 3 files covered. (100.0%)

507 of 507 relevant lines covered (100.0%)

57.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38604777578.1 14 Oct 2026 05:13PM UTC 25
100.0
GitHub Action Run
Source Files on build 38604777578
  • Tree
  • List 25
  • Changed 12
  • Source Changed 12
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38604777578
  • bb1c521d on github
  • Prev Build on main (#37550752413)
  • Next Build on main (#38627605913)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc