Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

feat: add code and shipping costs cutoff to Market #113

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

Jonne
Copy link
Contributor

@Jonne Jonne commented Oct 31, 2024

This PR should partly fix #108 and adds some fields that were recently introduced to the Market.

  • code
  • shipping_cost_cutoff

https://docs.commercelayer.io/core/api-reference/markets/object

@Jonne Jonne changed the title feat: Add code and shipping costs cutoff to Market feat: add code and shipping costs cutoff to Market Oct 31, 2024
demeyerthom
demeyerthom previously approved these changes Nov 1, 2024
Copy link
Collaborator

@demeyerthom demeyerthom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@demeyerthom
Copy link
Collaborator

demeyerthom commented Nov 1, 2024

@Jonne looks like the acceptance tests have failed. I think the mocks need to be updated to reflect your changes. If I read it correctly the mock file to be updated is mock/mappings/api_markets_xjbdyhlyol-2329486c-1492-47cc-a608-519ef1c30e58.json. You can add the new field values to the request and responses there.

You can then test this out by running docker compose up -d (which will start the mock service), set the following as .env file:

TF_ACC='1'
COMMERCELAYER_CLIENT_ID=client-id
COMMERCELAYER_CLIENT_SECRET=client-secret
COMMERCELAYER_API_ENDPOINT=http://localhost:8080/api
COMMERCELAYER_AUTH_ENDPOINT=http://localhost:8080/oauth/token

And finally go test ./...

It is a bit cluncky, this is my attempt of 2 years ago and I have not come around to improving it :)

@Jonne
Copy link
Contributor Author

Jonne commented Nov 4, 2024

@demeyerthom Thank you for the explanation! I was running the acceptance tests to my own CL environment and didn't realize there also was a mock environment. I've updated the mocks and am able to run the tests agains my local environment 🙏

@Jonne Jonne requested a review from demeyerthom November 5, 2024 13:25
@demeyerthom demeyerthom enabled auto-merge (squash) November 12, 2024 09:57
@demeyerthom demeyerthom merged commit 1115341 into incentro-ecx:main Nov 12, 2024
5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handling code property
2 participants