Files
Joren 25410749db Initial Marktplaats SDK scaffold
Clone the twdehands SDK into mrktplaats and retarget naming and defaults for app.marktplaats.nl while keeping the same request/response bodies and endpoint behavior.
2026-04-15 23:45:49 +02:00

24 lines
677 B
Go

package mrktplaats
import "context"
// PaymentService handles payment cart operations.
type PaymentService struct {
t *transport
}
// PaymentCartCountResponse contains the number of items in the payment cart.
type PaymentCartCountResponse struct {
UserID string `json:"userId"`
NumberOfItems int `json:"numberOfItems"`
}
// CartItemCount returns the number of items in the payment cart.
func (s *PaymentService) CartItemCount(ctx context.Context) (*PaymentCartCountResponse, error) {
var resp PaymentCartCountResponse
if err := s.t.get(ctx, "/app/payments/v3/payment-cart/number-of-items", nil, &resp); err != nil {
return nil, err
}
return &resp, nil
}