Resolves client configuration.
All values are plain data and every one of them can be overridden through
Picnic.Client.new/1, so an API change on Picnic's side — a bumped path
version, a new required header — is a configuration change for users of this
library, never a code change.
Resolution order for each setting:
- options passed to
Picnic.Client.new/1 - application environment for
:ex_picnic(defaults only — the core never reads app env at request time) - the built-in defaults below
The default base URL is
https://storefront-prod.<country>.picnicinternational.com/api/<version>;
pass :base_url to replace it wholesale (the :api_version and :country
settings are then ignored for URL building).
Summary
Functions
Builds the default base URL for a country and API version.
Resolves the full configuration map from the given options, the :ex_picnic
application environment, and built-in defaults — in that order of precedence.
Types
Functions
Builds the default base URL for a country and API version.
Resolves the full configuration map from the given options, the :ex_picnic
application environment, and built-in defaults — in that order of precedence.