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

Align types for DeferSubscription method. #262

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

folone
Copy link
Contributor

@folone folone commented Jan 30, 2024

Getting the following error in my codebase:

cannot use client (variable of type *playstore.Client) as playstore.IABSubscription value in assignment: *playstore.Client does not implement playstore.IABSubscription (wrong type for method DeferSubscription)
		have DeferSubscription("context".Context, string, string, string, *androidpublisher.SubscriptionPurchasesDeferRequest) (*androidpublisher.SubscriptionPurchasesDeferResponse, error)
		want DeferSubscription("context".Context, string, string, string, *androidpublisher.SubscriptionPurchasesDeferRequest) error

@folone folone changed the title Align types for DeferSubscription method. Align types for DeferSubscription method. Jan 30, 2024
@@ -34,7 +34,7 @@ type IABSubscription interface {
CancelSubscription(context.Context, string, string, string) error
RefundSubscription(context.Context, string, string, string) error
RevokeSubscription(context.Context, string, string, string) error
DeferSubscription(context.Context, string, string, string, *androidpublisher.SubscriptionPurchasesDeferRequest) error
DeferSubscription(context.Context, string, string, string, *androidpublisher.SubscriptionPurchasesDeferRequest) (*androidpublisher.SubscriptionPurchasesDeferResponse, error)
Copy link
Contributor Author

@folone folone Jan 30, 2024

Choose a reason for hiding this comment

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

Aligning this method definition with

func (c *Client) DeferSubscription(ctx context.Context, packageName string, subscriptionID string, token string,
req *androidpublisher.SubscriptionPurchasesDeferRequest) (*androidpublisher.SubscriptionPurchasesDeferResponse, error) {

Copy link
Member

@takecy takecy 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 your help.
LGTM 👍

@takecy takecy merged commit 16d472d into awa:master Jan 31, 2024
2 checks passed
@folone folone deleted the gl/defer-subscription-fix branch January 31, 2024 20:32
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.

None yet

3 participants