Versions in this module Expand all Collapse all v0 v0.0.1 Jun 21, 2023 Changes in this version + type Card struct + BillingAddress map[string]interface{} + CardBrand string + CreatedAt time.Time + CustomerId string + ExpMonth int64 + ExpYear int64 + Id string + IsDefault bool + Last4 string + ThirdPartyCardId string + UpdatedAt time.Time + type CardThirdParty struct + CardId string + CreatedAt time.Time + CustomerId string + ThirdPartyCardId string + ThirdPartyName string + UpdatedAt time.Time + type Customer struct + Avatar string + CreatedAt time.Time + DisplayName string + Email string + FirstName string + Gender string + Id string + LastName string + MerchantId string + Mobile string + UpdatedAt time.Time + type CustomerThirdParty struct + CreatedAt time.Time + CustomerId string + ThirdPartyCustomerId string + ThirdPartyName string + UpdatedAt time.Time + type Repository struct + func (r *Repository) CreateCustomer(ctx context.Context, item *Customer) (*Customer, error) + func (r *Repository) CreateCustomerCard(ctx context.Context, item *Card) (*Card, error) + func (r *Repository) CreateCustomerThirdParty(ctx context.Context, item *CustomerThirdParty) (*CustomerThirdParty, error) + func (r *Repository) DeleteCustomer(ctx context.Context, Id string) error + func (r *Repository) DeleteCustomerCard(ctx context.Context, id string) error + func (r *Repository) DeleteCustomerThirdParty(ctx context.Context, customerId string) error + func (r *Repository) GetCustomer(ctx context.Context, Id string) (*Customer, error) + func (r *Repository) GetCustomerCard(ctx context.Context, cardId string) (*Card, error) + func (r *Repository) GetCustomerCardList(ctx context.Context, customerId string) ([]*Card, error) + func (r *Repository) GetCustomerList(ctx context.Context, merchantId string) ([]*Customer, error) + func (r *Repository) GetCustomerThirdParty(ctx context.Context, customerId string) (*CustomerThirdParty, error) + func (r *Repository) UpdateCustomer(ctx context.Context, item *Customer) (*Customer, error) + func (r *Repository) UpdateCustomerCard(ctx context.Context, item *Card) (*Card, error) + func (r *Repository) UpdateCustomerThirdParty(ctx context.Context, item *CustomerThirdParty) (*CustomerThirdParty, error) + type Service struct + func New() *Service + func (s *Service) CreateCustomer(ctx context.Context, item *Customer) (*Customer, error) + func (s *Service) CreateCustomerCard(ctx context.Context, customerId string, thirdPartyCardId string, ...) (*Card, error) + func (s *Service) DeleteCustomer(ctx context.Context, id string) error + func (s *Service) DeleteCustomerCard(ctx context.Context, id string) error + func (s *Service) GetCustomer(ctx context.Context, id string) (*Customer, error) + func (s *Service) GetCustomerCard(ctx context.Context, id string) (*Card, error) + func (s *Service) GetCustomerCardList(ctx context.Context, customerId string) ([]*Card, error) + func (s *Service) GetCustomerList(ctx context.Context, merchantID string) ([]*Customer, error) + func (s *Service) UpdateCustomer(ctx context.Context, item *Customer) (*Customer, error) + func (s *Service) UpdateCustomerCard(ctx context.Context, item *Card) (*Card, error)