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

sgerrand / ex_teya / 36337388883
100%

Build:
DEFAULT BRANCH: main
Ran 27 Sep 2026 05:33PM UTC
Jobs 1
Files 24
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

27 Sep 2026 05:33PM UTC coverage: 100.0%. Remained the same
36337388883

push

github

web-flow
fix(dcc)!: create DCC offers on the endpoint Teya documents (#51)

* fix(dcc)!: create DCC offers on the endpoint Teya documents

Teya.DCC.quote posted to /fx/v3/dcc without a token. Teya's FX spec gives
POST /fx/v1/dcc/offers, which needs an OAuth token with the fx/dcc/create
scope and returns an offer holding a quote_id, and no quoted_at. quote
now goes through Teya.Client like every other call, so it sends the
token, uses :req_options, and takes an options list.

The docs pass the offer's quote_id on in the card-present dcc field, which
the Payments Gateway spec accepts. Teya.Error also reads the FX API's
invalid_params list into invalid_parameters.

BREAKING CHANGE: Teya.DCC.quote now calls POST /fx/v1/dcc/offers with the
library's access token, whose scopes must include fx/dcc/create. The
offer has no quoted_at; pass quote_id on instead. :dcc_req_options is no
longer read; DCC calls use :req_options.

* fix(dcc): send DCC offers without an Idempotency-Key

Client.request/3 adds an Idempotency-Key to every POST, but the FX spec
documents none for DCC offers. The endpoint could refuse it, and callers
could not rely on a reused key to deduplicate offers. DCC offers now go
through a new Client.post_without_idempotency_key/2, a separate function
so the key cannot be dropped from an endpoint that honours it. A key set
by the caller or in :req_options is not sent either.

Review fixes too: the DCC examples fall back to a payment without DCC on
any error, not only two codes; the docs say DCC needs the library's
credentials with fx/dcc/create among its scopes; Teya.Error takes
whichever of invalid_parameters and invalid_params is a list, and its
docs mention the FX API's path key; the card-present dcc doc says plainly
that it needs quote_id or quoted_at.

* fix(dcc): warn before the DCC scope, and log a missing offer

Adding fx/dcc/create to :scopes before Teya grants it can fail the one
token request with invalid_scope, stopping every call. The DCC docs ... (continued)

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

363 of 363 relevant lines covered (100.0%)

37.07 hits per line

Jobs
ID Job ID Ran Files Coverage
1 36337388883.1 27 Sep 2026 05:33PM UTC 24
100.0
GitHub Action Run
Source Files on build 36337388883
  • Tree
  • List 24
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #36337388883
  • 85fa6253 on github
  • Prev Build on main (#36301247155)
  • Next Build on main (#36339958017)
  • 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