SpendOwlConfiguration
Configuration struct for customizing SDK behavior.Initializer
Parameters
URL
default:"https://spendowl.io/api"
The API base URL. Only change for testing or if instructed by support.
TimeInterval
default:"10"
Network request timeout in seconds.
Int
default:"3"
Total attempts per request, including the first — not a retry count. The default of
3 means one request plus two retries. Values below 1 are raised to 1. Client errors (4xx) are not retried.Properties
apiKey
baseURL
https://spendowl.io/api
timeoutInterval
10
maxRetries
3 — one initial request plus two retries.
Retry Behavior:
- Network errors are retried with exponential backoff
- Server errors (5xx) are retried
- Client errors (4xx) are not retried
Usage Examples
Basic Configuration
For most apps, use the simple API key initializer:Custom Timeout
For apps used on slower networks:Aggressive Retries
For critical attribution tracking — five attempts, so four retries:Testing Configuration
For integration tests:Sendable Conformance
SpendOwlConfiguration conforms to Sendable, making it safe to pass across concurrency boundaries:
Related
SpendOwl
Main SDK class
Configuration Guide
Configuration guide