Files
purchases-ios/Sources/Networking/HTTPClient
Antonio Pallares b0292f2ee7 [Diagnostics] add missing parameter to http_request_performed event (#4857)
* refactor: create `DiagnosticsEvent.Properties` struct with all possible fields in a diagnostics event

* chore: remove unnecessary `CodingKeys` and values as `JSONEncoder.KeyEncodingStrategy.convertToSnakeCase` is used in the diagnostics requests

* tests: WIP: adapt unit tests to new `DiagnosticsEvent.Properties`

* fix: have values in Diagnostics events be snake case

* tests: adapt unit tests to Diagnostics events changes

* fix: `name` parameter in DiagnosticsEvent

* tests: fix snapshot testing of JSON to use `.iso8601` date format

* tests: have `JSONEncoder` of snapshot tests be a copy of the encoder user in the SDK

* tests: update the dates in the `CustomerInfo` snapshots for decoding tests to have ISO 8601 format

* fix: remove duplicated import

* refactor: centralize some info transformations in `DiagnosticsEvent.Properties`' init

* tests: add snapshot tests for `DiagnosticsEvents` object

* feat: add `is_retry` parameter to Diagnostics `http_request_performed` event

* tests: consider new `isRetry` parameter in existing `DiagnosticsEvent` tests

* fix: make sure that the `http_request_performed` event is always called

The previous implementation would skip sending the event in the case of getting a `networkError`
2025-03-07 11:26:32 +01:00
..