Skip to content

Commit

Permalink
get sub group
Browse files Browse the repository at this point in the history
  • Loading branch information
incrementing committed Aug 30, 2023
1 parent 1d0f711 commit c0016f0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions asc/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,20 @@ type SubscriptionPriceCreateData struct {
Type string `json:"type"`
}

type SubscriptionGroupsResponse struct {
Data []SubscriptionGroup `json:"data"`
Links DocumentLinks `json:"links"`
}

// GetSubscriptionGroups gets a subscription group for an app.
//
// https://developer.apple.com/documentation/appstoreconnectapi/create_a_subscription_group
func (s *SubscriptionsService) GetSubscriptionGroups(ctx context.Context, appID, groupName string) (*SubscriptionGroupsResponse, *Response, error) {
res := new(SubscriptionGroupsResponse)
resp, err := s.client.get(ctx, "v1/apps/"+appID+"/subscriptionGroups?filter[referenceName]="+url.QueryEscape(groupName), nil, res)
return res, resp, err
}

// CreateSubscriptionGroup creates a subscription group for an app.
//
// https://developer.apple.com/documentation/appstoreconnectapi/create_a_subscription_group
Expand Down

0 comments on commit c0016f0

Please sign in to comment.