Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Monetization #932

Merged
merged 78 commits into from
Sep 15, 2024
Merged

Implement Monetization #932

merged 78 commits into from
Sep 15, 2024

Conversation

viztea
Copy link
Contributor

@viztea viztea commented Apr 8, 2024

Docs: https://discord.com/developers/docs/monetization/overview

I've tested this code to the best of my ability, i.e., only the pagination for the list entitlements endpoint is untested and I wasn't able to get entitlement events to work, they might only work with real subscriptions 🤷🏼

@viztea
Copy link
Contributor Author

viztea commented Apr 8, 2024

forgot to implement the premium required action interaction response :')

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

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

thanks for the pr :)

i've looked at the code for common and gateway for now, i will look at rest and core later.

would be good to also add the error codes documented in this pr: discord/discord-api-docs#6499

common/src/commonMain/kotlin/entity/Entitlements.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Entitlements.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Interactions.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
gateway/src/commonMain/kotlin/Event.kt Outdated Show resolved Hide resolved
gateway/src/commonMain/kotlin/Event.kt Outdated Show resolved Hide resolved
@viztea viztea requested a review from lukellmann April 9, 2024 23:06
Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

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

looking at core will follow tmrw

gateway/src/commonMain/kotlin/Event.kt Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
common/src/commonMain/kotlin/entity/Skus.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/json/JsonErrorCode.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/json/JsonErrorCode.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/service/RestClient.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/service/SkuService.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/service/EntitlementService.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/service/SkuService.kt Outdated Show resolved Hide resolved
rest/src/commonMain/kotlin/service/EntitlementService.kt Outdated Show resolved Hide resolved
@lukellmann
Copy link
Member

also some tests fail, now that entitlements is no longer optional in the interaction object, updating the test data should be good enough

@viztea
Copy link
Contributor Author

viztea commented Apr 10, 2024

also some tests fail, now that entitlements is no longer optional in the interaction object, updating the test data should be good enough

With an empty array or should I write mock data?

@lukellmann
Copy link
Member

also some tests fail, now that entitlements is no longer optional in the interaction object, updating the test data should be good enough

With an empty array or should I write mock data?

empty should be enough, do as you see fit

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

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

first part of reviewing core, i still have some files left to review

@lukellmann
Copy link
Member

just have to add subscriptions (discord/discord-api-docs#7109) and then this will finally be done

@lukellmann
Copy link
Member

just have to add subscriptions (discord/discord-api-docs#7109) and then this will finally be done

just missing in core now

Copy link
Member

@lukellmann lukellmann left a comment

Choose a reason for hiding this comment

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

for me this is ok now, i'll merge tomorrow unless there are any objections

@lukellmann lukellmann merged commit ad59083 into kordlib:main Sep 15, 2024
2 checks passed
@lukellmann lukellmann removed the request for review from DRSchlaubi September 15, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants