Commit Graph
7 Commits
Author SHA1 Message Date
Cesar de la VegaandAndy Boedo 658782b68d Adds subscriptions to CustomerInfo (#4508)
* adds SubscriptionInfo

* fix nullabilities

* purchaseDate is not nullable

* add isActive

* add store

* add the product identifier

* add willRenew

* private extension

* made storeTransactionId nil

* fix tests and docs

* fix tests

* fix more tests

* fix compilation

* fix test

* API tests and other fixes

* Update Sources/Purchasing/NonSubscriptionTransaction.swift

Co-authored-by: Andy Boedo <andresboedo@gmail.com>

* use ProductIdentifier and subscriptionsByProductIdentifier

* fix lint

* disable file_length

---------

Co-authored-by: Andy Boedo <andresboedo@gmail.com>
2024-12-04 12:00:27 +01:00
NachoSoto 51fd49e8f1 NonSubscriptionTransaction: expose storeTransactionIdentifier (#3639)
Fixes #3636.

This was added in #3009.
It was not made `public` because it was only used for #2841, but as
explained in #3636 it can be useful as `public`.
2024-02-06 12:46:00 -08:00
NachoSoto 82435936d9 Xcode 13: remove conditional code (#3147)
Clean up thanks to #2421
2023-09-06 10:59:22 -07:00
NachoSoto 022cdead1d Added internal NonSubscriptionTransaction.storeTransactionIdentifier (#3009)
This will be used for #2841.
2023-08-14 16:13:54 -07:00
NachoSoto a31743aaea Integration Tests: added tests for non-renewing and non-consumable packages (#3008)
There were some questions about these in #2841, and realized we had no
test coverage for them.
This also improves the documentation of `CustomerInfo.nonSubscriptions`
and `NonSubscriptionTransaction`.
2023-08-14 15:09:32 -07:00
NachoSoto 8d88328d92 CustomerInfo: Sendable conformance (#1824)
The type is now immutable, so the compiler ensures it's thread-safe.

For [CSDK-379].
Extracted from #1795 to make it easier to review this in isolation.

[CSDK-379]: https://revenuecats.atlassian.net/browse/CSDK-379?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2022-08-22 16:00:59 -07:00
NachoSoto 01c46c41bb Replaced CustomerInfo.nonSubscriptionsTransactions with a new non-StoreTransaction type (#1733)
Fixes [CF-781]

Making `CustomerInfo.nonSubscriptionTransactions` return type a `StoreTransaction` was my mistake from an earlier refactor. I saw the two types were similar, so I made them conform to the same interface.
However, they represent different concepts.

### Changes:

- Added new `NonSubscriptionTransaction` type
- Deprecated `CustomerInfo.nonSubscriptionTransactions` with a `renamed` for a new `nonSubscriptions`
- Made the old `BackendParsedTransaction` initialization depend on the new type to avoid duplicating code
- Add new test to cover the new method, and left the existing one
- Added more checks in `CustomerInfoTest` for missing properties
- Updated all APITesters

[CF-781]: https://revenuecats.atlassian.net/browse/CF-781?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2022-06-30 08:59:16 -07:00