Documentation ¶
Index ¶
- Constants
- type AllocationMapOptions
- type AnalyticsConfigService
- func (s *AnalyticsConfigService) Create(userId uuid.UUID, data *types.CreateAnalyticsConfig) (*models.AnalyticsConfig, *utils.ApplictaionError)
- func (s *AnalyticsConfigService) Delete(userId uuid.UUID) *utils.ApplictaionError
- func (s *AnalyticsConfigService) Retrive(userId uuid.UUID) (*models.AnalyticsConfig, *utils.ApplictaionError)
- func (s *AnalyticsConfigService) SetContext(context context.Context) *AnalyticsConfigService
- func (s *AnalyticsConfigService) Update(userId uuid.UUID, data *types.UpdateAnalyticsConfig) (*models.AnalyticsConfig, *utils.ApplictaionError)
- type AuthService
- func (s *AuthService) Authenticate(email string, password string) types.AuthenticateResult
- func (s *AuthService) AuthenticateAPIToken(token string) types.AuthenticateResult
- func (s *AuthService) AuthenticateCustomer(email string, password string) types.AuthenticateResult
- func (s *AuthService) ComparePassword(password string, hash string) bool
- func (s *AuthService) SetContext(context context.Context) *AuthService
- type AvailabilityContext
- type BatchJobService
- func (s *BatchJobService) Cancel(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) Complete(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) Confirm(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) Create(data *types.BatchJobCreateProps) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) ListAndCount(selector *types.FilterableBatchJob, config *sql.Options) ([]models.BatchJob, *int64, *utils.ApplictaionError)
- func (s *BatchJobService) PrepareBatchJobForProcessing(data *types.CreateBatchJobInput) (*types.CreateBatchJobInput, *utils.ApplictaionError)
- func (s *BatchJobService) ResolveBatchJobByType(batchtype string) interfaces.IBatchJobStrategy
- func (s *BatchJobService) Retrive(batchJobId uuid.UUID) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) SetContext(context context.Context) *BatchJobService
- func (s *BatchJobService) SetFailed(batchJobId uuid.UUID, model *models.BatchJob, ...) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) SetPreProcessingDone(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) SetProcessing(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) Update(batchJobId uuid.UUID, model *models.BatchJob, data *types.BatchJobUpdateProps) (*models.BatchJob, *utils.ApplictaionError)
- func (s *BatchJobService) UpdateStatus(batchJobId uuid.UUID, model *models.BatchJob, status models.BatchJobStatus) (*models.BatchJob, *utils.ApplictaionError)
- type Bus
- type BusController
- type BusPublisher
- type BusSubscriber
- type CalculationContextOptions
- type CartService
- func (s *CartService) AddLineItem(cartId uuid.UUID, lineItem models.LineItem, validateSalesChannels bool) *utils.ApplictaionError
- func (s *CartService) AddOrUpdateLineItems(cartId uuid.UUID, lineItems []models.LineItem, validateSalesChannels bool) *utils.ApplictaionError
- func (s *CartService) AddShippingMethod(id uuid.UUID, cart *models.Cart, optionId uuid.UUID, ...) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) ApplyDiscount(cart *models.Cart, discountCode string) *utils.ApplictaionError
- func (s *CartService) ApplyDiscounts(cart *models.Cart, discountCodes []string) *utils.ApplictaionError
- func (s *CartService) AuthorizePayment(id uuid.UUID, cart *models.Cart, context map[string]interface{}) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) Create(data *types.CartCreateProps) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) CreateTaxLines(id uuid.UUID, cart *models.Cart) *utils.ApplictaionError
- func (s *CartService) DecorateTotals(cart *models.Cart, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) Delete(id uuid.UUID) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) DeletePaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
- func (s *CartService) DeleteTaxLines(id uuid.UUID) *utils.ApplictaionError
- func (s *CartService) List(selector types.FilterableCartProps, config *sql.Options) ([]models.Cart, *utils.ApplictaionError)
- func (s *CartService) RefreshPaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
- func (s *CartService) RemoveDiscount(cartId uuid.UUID, discountCode string) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) RemoveLineItem(id uuid.UUID, lineItemIds uuid.UUIDs) *utils.ApplictaionError
- func (s *CartService) Retrieve(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) RetrieveLegacy(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) RetrieveWithTotals(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) SetContext(context context.Context) *CartService
- func (s *CartService) SetMetadata(id uuid.UUID, key string, value string) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) SetPaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
- func (s *CartService) SetPaymentSessions(id uuid.UUID, cart *models.Cart) *utils.ApplictaionError
- func (s *CartService) Update(id uuid.UUID, cart *models.Cart, data *types.CartUpdateProps) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) UpdateLineItem(cartId uuid.UUID, lineItemId uuid.UUID, update *types.LineItemUpdate) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) UpdatePaymentSession(cartId uuid.UUID, update map[string]interface{}) (*models.Cart, *utils.ApplictaionError)
- func (s *CartService) ValidateLineItem(salesChannelId uuid.UUID, lineItem types.LineItemValidateData) (bool, *utils.ApplictaionError)
- type ClaimItemService
- func (s *ClaimItemService) Create(data *types.CreateClaimItemInput) (*models.ClaimItem, *utils.ApplictaionError)
- func (s *ClaimItemService) List(selector models.ClaimItem, config *sql.Options) ([]models.ClaimItem, *utils.ApplictaionError)
- func (s *ClaimItemService) Retrieve(claimItemId uuid.UUID, config *sql.Options) (*models.ClaimItem, *utils.ApplictaionError)
- func (s *ClaimItemService) SetContext(context context.Context) *ClaimItemService
- func (s *ClaimItemService) Update(id uuid.UUID, data *types.UpdateClaimItemInput) (*models.ClaimItem, *utils.ApplictaionError)
- type ClaimService
- func (s *ClaimService) Cancel(id uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) Create(data *types.CreateClaimInput) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) CreateFulfillment(id uuid.UUID, noNotification bool, locationId uuid.UUID, ...) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) CreateShipment(id uuid.UUID, fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, ...) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) GetRefundTotalForClaimLinesOnOrder(order *models.Order, claimItems []types.CreateClaimItemInput) (*float64, *utils.ApplictaionError)
- func (s *ClaimService) List(selector *models.ClaimOrder, config *sql.Options) ([]models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) ProcessRefund(id uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) SetContext(context context.Context) *ClaimService
- func (s *ClaimService) Update(id uuid.UUID, data *types.UpdateClaimInput) (*models.ClaimOrder, *utils.ApplictaionError)
- func (s *ClaimService) ValidateCreateClaimInput(data *types.CreateClaimInput) *utils.ApplictaionError
- type CsvColumn
- type CsvParserService
- type CsvReader
- type CsvSchema
- type CurrencyService
- func (s *CurrencyService) ListAndCount(selector *types.FilterableCurrencyProps, config *sql.Options) ([]models.Currency, *int64, *utils.ApplictaionError)
- func (s *CurrencyService) RetrieveByCode(code string) (*models.Currency, *utils.ApplictaionError)
- func (s *CurrencyService) SetContext(context context.Context) *CurrencyService
- func (s *CurrencyService) Update(code string, data *types.UpdateCurrencyInput) (*models.Currency, *utils.ApplictaionError)
- type CustomShippingOptionService
- func (s *CustomShippingOptionService) Create(data []types.CreateCustomShippingOptionInput) ([]models.CustomShippingOption, *utils.ApplictaionError)
- func (s *CustomShippingOptionService) List(selector models.CustomShippingOption, config *sql.Options) ([]models.CustomShippingOption, *utils.ApplictaionError)
- func (s *CustomShippingOptionService) Retrieve(id uuid.UUID, config *sql.Options) (*models.CustomShippingOption, *utils.ApplictaionError)
- func (s *CustomShippingOptionService) SetContext(context context.Context) *CustomShippingOptionService
- type CustomerGroupService
- func (s *CustomerGroupService) AddCustomers(id uuid.UUID, customerIds uuid.UUIDs) (*models.CustomerGroup, *utils.ApplictaionError)
- func (s *CustomerGroupService) Create(data *types.CreateCustomerGroup) (*models.CustomerGroup, *utils.ApplictaionError)
- func (s *CustomerGroupService) Delete(groupId uuid.UUID) *utils.ApplictaionError
- func (s *CustomerGroupService) List(selector *types.FilterableCustomerGroup, config *sql.Options) ([]models.CustomerGroup, *utils.ApplictaionError)
- func (s *CustomerGroupService) ListAndCount(selector *types.FilterableCustomerGroup, config *sql.Options) ([]models.CustomerGroup, *int64, *utils.ApplictaionError)
- func (s *CustomerGroupService) RemoveCustomer(id uuid.UUID, customerIds uuid.UUIDs) (*models.CustomerGroup, *utils.ApplictaionError)
- func (s *CustomerGroupService) Retrieve(customerGroupId uuid.UUID, config *sql.Options) (*models.CustomerGroup, *utils.ApplictaionError)
- func (s *CustomerGroupService) SetContext(context context.Context) *CustomerGroupService
- func (s *CustomerGroupService) Update(customerGroupId uuid.UUID, data *types.UpdateCustomerGroup) (*models.CustomerGroup, *utils.ApplictaionError)
- type CustomerService
- func (s *CustomerService) AddAddress(customerId uuid.UUID, address *models.Address) (*models.Customer, *models.Address, *utils.ApplictaionError)
- func (s *CustomerService) Count() (*int64, *utils.ApplictaionError)
- func (s *CustomerService) Create(data *types.CreateCustomerInput) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) Delete(customerId uuid.UUID) *utils.ApplictaionError
- func (s *CustomerService) GenerateResetPasswordToken(customerId uuid.UUID) (*string, *utils.ApplictaionError)
- func (s *CustomerService) HashPassword(password string) (string, error)
- func (s *CustomerService) List(selector *types.FilterableCustomer, config *sql.Options) ([]models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) ListAndCount(selector *types.FilterableCustomer, config *sql.Options) ([]models.Customer, *int64, *utils.ApplictaionError)
- func (s *CustomerService) ListByEmail(email string, config *sql.Options) ([]models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RemoveAddress(customerId uuid.UUID, addressId uuid.UUID) (err *utils.ApplictaionError)
- func (s *CustomerService) Retrieve(selector models.Customer, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RetrieveByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RetrieveByPhone(phone string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RetrieveRegisteredByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) RetrieveUnregisteredByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) SetContext(context context.Context) *CustomerService
- func (s *CustomerService) Update(userId uuid.UUID, data *types.UpdateCustomerInput) (*models.Customer, *utils.ApplictaionError)
- func (s *CustomerService) UpdateAddress(customerId uuid.UUID, addressId uuid.UUID, model *models.Address) (*models.Address, *utils.ApplictaionError)
- func (s *CustomerService) UpdateBillingAddress(model *models.Customer, id uuid.UUID, address *models.Address) *utils.ApplictaionError
- type DefaultFileService
- func (s *DefaultFileService) Delete(fileData map[string]interface{}) error
- func (s *DefaultFileService) GetDownloadStream(fileData interfaces.GetUploadedFileType) (io.Reader, error)
- func (s *DefaultFileService) GetPresignedDownloadUrl(fileData interfaces.GetUploadedFileType) (string, error)
- func (s *DefaultFileService) GetUploadStreamDescriptor(fileData interfaces.UploadStreamDescriptorType) (*interfaces.FileServiceGetUploadStreamResult, error)
- func (s *DefaultFileService) SetContext(context context.Context) *DefaultFileService
- func (s *DefaultFileService) Upload(fileData io.Reader) (*interfaces.FileServiceUploadResult, error)
- func (s *DefaultFileService) UploadProtected(fileData io.Reader) (*interfaces.FileServiceUploadResult, error)
- type DefaultSearchService
- func (s *DefaultSearchService) AddDocuments(indexName string, documents interface{}, types string)
- func (s *DefaultSearchService) CreateIndex(indexName string, options interface{})
- func (s *DefaultSearchService) DeleteAllDocuments(indexName string)
- func (s *DefaultSearchService) DeleteDocument(indexName string, document_id interface{})
- func (s *DefaultSearchService) GetIndex(indexName string)
- func (s *DefaultSearchService) ReplaceDocuments(indexName string, documents interface{}, types string)
- func (s *DefaultSearchService) Search(indexName string, query interface{}, options map[string]interface{}) map[string]interface{}
- func (s *DefaultSearchService) SetContext(context context.Context) *DefaultSearchService
- func (s *DefaultSearchService) UpdateSettings(indexName string, settings interface{})
- type DiscountConditionService
- func (s *DiscountConditionService) Delete(conditionId uuid.UUID) *utils.ApplictaionError
- func (s *DiscountConditionService) RemoveResources(data *types.DiscountConditionInput) *utils.ApplictaionError
- func (s *DiscountConditionService) ResolveConditionType(data *types.DiscountConditionInput) (*models.DiscountCondition, *utils.ApplictaionError)
- func (s *DiscountConditionService) Retrieve(conditionId uuid.UUID, config *sql.Options) (*models.DiscountCondition, *utils.ApplictaionError)
- func (s *DiscountConditionService) SetContext(context context.Context) *DiscountConditionService
- func (s *DiscountConditionService) UpsertCondition(data *types.DiscountConditionInput, overrideExisting bool) ([]models.DiscountCondition, *utils.ApplictaionError)
- type DiscountService
- func (s *DiscountService) AddRegion(discountId uuid.UUID, regionId uuid.UUID) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) CalculateDiscountForLineItem(discountId uuid.UUID, lineItem *models.LineItem, ...) (float64, *utils.ApplictaionError)
- func (s *DiscountService) Create(data *types.CreateDiscountInput) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) CreateDynamicCode(discountId uuid.UUID, data *types.CreateDynamicDiscountInput) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) Delete(discountId uuid.UUID) *utils.ApplictaionError
- func (s *DiscountService) DeleteDynamicCode(discountId uuid.UUID, code string) *utils.ApplictaionError
- func (s *DiscountService) List(selector types.FilterableDiscount, config *sql.Options) ([]models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) ListAndCount(selector *types.FilterableDiscount, config *sql.Options) ([]models.Discount, *int64, *utils.ApplictaionError)
- func (s *DiscountService) ListByCodes(discountCodes []string, config sql.Query) ([]models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) RemoveRegion(discountId uuid.UUID, regionId uuid.UUID) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) Retrieve(discountId uuid.UUID, config *sql.Options) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) RetrieveByCode(discountCode string, config *sql.Options) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) SetContext(context context.Context) *DiscountService
- func (s *DiscountService) Update(discountId uuid.UUID, data *types.UpdateDiscountInput) (*models.Discount, *utils.ApplictaionError)
- func (s *DiscountService) ValidateDiscountForProduct(discountRuleId uuid.UUID, productId uuid.UUID) (bool, *utils.ApplictaionError)
- func (s *DiscountService) ValidateDiscountRule(discountRule *types.CreateDiscountRuleInput) (*types.CreateDiscountRuleInput, *utils.ApplictaionError)
- type DraftOrderService
- func (s *DraftOrderService) Create(data *types.DraftOrderCreate) (*models.DraftOrder, *utils.ApplictaionError)
- func (s *DraftOrderService) Delete(draftOrderId uuid.UUID) *utils.ApplictaionError
- func (s *DraftOrderService) List(selector *models.DraftOrder, config *sql.Options) ([]models.DraftOrder, *utils.ApplictaionError)
- func (s *DraftOrderService) ListAndCount(selector *types.FilterableDraftOrder, config *sql.Options) ([]models.DraftOrder, *int64, *utils.ApplictaionError)
- func (s *DraftOrderService) RegisterCartCompletion(id uuid.UUID, orderId uuid.UUID) (*models.DraftOrder, *utils.ApplictaionError)
- func (s *DraftOrderService) Retrieve(draftOrderId uuid.UUID, config *sql.Options) (*models.DraftOrder, *utils.ApplictaionError)
- func (s *DraftOrderService) RetrieveByCartId(cartId uuid.UUID, config *sql.Options) (*models.DraftOrder, *utils.ApplictaionError)
- func (s *DraftOrderService) SetContext(context context.Context) *DraftOrderService
- func (s *DraftOrderService) Update(id uuid.UUID, data *models.DraftOrder) (*models.DraftOrder, *utils.ApplictaionError)
- type EventBus
- func (bus *EventBus) HasCallback(topic string) bool
- func (bus *EventBus) Publish(topic string, args ...interface{})
- func (bus *EventBus) Subscribe(topic string, fn interface{}) error
- func (bus *EventBus) SubscribeAsync(topic string, fn interface{}, transactional bool) error
- func (bus *EventBus) SubscribeOnce(topic string, fn interface{}) error
- func (bus *EventBus) SubscribeOnceAsync(topic string, fn interface{}) error
- func (bus *EventBus) Unsubscribe(topic string, handler interface{}) error
- func (bus *EventBus) WaitAsync()
- type FlagRouter
- type FulfillmentProviderService
- func (s *FulfillmentProviderService) CalculatePrice(option *models.ShippingOption, data map[string]interface{}, cart *models.Cart) (float64, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) CanCalculate(option types.FulfillmentOptions) (bool, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) CancelFulfillment(fulfillment *models.Fulfillment) (*models.Fulfillment, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) CreateFulfillment(method *models.ShippingMethod, items []models.LineItem, ...) (core.JSONB, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) CreateReturn(returnOrder *models.Return) (core.JSONB, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) List() ([]models.FulfillmentProvider, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) ListFulfillmentOptions(providerIDs uuid.UUIDs) ([]types.FulfillmentOptions, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
- func (s *FulfillmentProviderService) RetrieveDocuments(providerId uuid.UUID, fulfillmentData map[string]interface{}, ...) (map[string]interface{}, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) RetrieveProvider(providerID uuid.UUID) interfaces.IFulfillmentService
- func (s *FulfillmentProviderService) SetContext(context context.Context) *FulfillmentProviderService
- func (s *FulfillmentProviderService) ValidateFulfillmentData(option *models.ShippingOption, data map[string]interface{}, cart *models.Cart) (map[string]interface{}, *utils.ApplictaionError)
- func (s *FulfillmentProviderService) ValidateOption(option models.ShippingOption) (bool, *utils.ApplictaionError)
- type FulfillmentService
- func (s *FulfillmentService) CancelFulfillment(fulfillmentId uuid.UUID, fulfillment *models.Fulfillment) (*models.Fulfillment, *utils.ApplictaionError)
- func (s *FulfillmentService) CreateFulfillment(order *types.CreateFulfillmentOrder, ...) ([]models.Fulfillment, *utils.ApplictaionError)
- func (s *FulfillmentService) CreateShipment(fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, ...) (*models.Fulfillment, *utils.ApplictaionError)
- func (s *FulfillmentService) GetFulfillmentItems(order *types.CreateFulfillmentOrder, items []types.FulFillmentItemType) ([]models.LineItem, *utils.ApplictaionError)
- func (s *FulfillmentService) PartitionItems(shippingMethods []models.ShippingMethod, items []models.LineItem) []types.FulfillmentItemPartition
- func (s *FulfillmentService) Retrieve(fulfillmentId uuid.UUID, config *sql.Options) (*models.Fulfillment, *utils.ApplictaionError)
- func (s *FulfillmentService) SetContext(context context.Context) *FulfillmentService
- func (s *FulfillmentService) ValidateFulfillmentLineItem(item *models.LineItem, quantity int) (*models.LineItem, *utils.ApplictaionError)
- type GenerateLineItemContext
- type GetLineItemTotalOptions
- type GetShippingMethodTotalsOptions
- type GetTotalsOptions
- type GiftCardService
- func (s *GiftCardService) Create(data *types.CreateGiftCardInput) (*models.GiftCard, *utils.ApplictaionError)
- func (s *GiftCardService) CreateTransaction(data *types.CreateGiftCardTransactionInput) (uuid.UUID, *utils.ApplictaionError)
- func (s *GiftCardService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *GiftCardService) GenerateCode() string
- func (s *GiftCardService) List(selector *types.FilterableGiftCard, config *sql.Options) ([]models.GiftCard, *utils.ApplictaionError)
- func (s *GiftCardService) ListAndCount(selector *types.FilterableGiftCard, config *sql.Options) ([]models.GiftCard, *int64, *utils.ApplictaionError)
- func (s *GiftCardService) ResolveTaxRate(giftCardTaxRate float64, region *models.Region) float64
- func (s *GiftCardService) Retrieve(selector *models.GiftCard, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
- func (s *GiftCardService) RetrieveByCode(code string, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
- func (s *GiftCardService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
- func (s *GiftCardService) SetContext(context context.Context) *GiftCardService
- func (s *GiftCardService) Update(id uuid.UUID, data *types.UpdateGiftCardInput) (*models.GiftCard, *utils.ApplictaionError)
- type IdempotencyKeyService
- func (s *IdempotencyKeyService) Create(payload *types.CreateIdempotencyKeyInput) (*models.IdempotencyKey, *utils.ApplictaionError)
- func (s *IdempotencyKeyService) InitializeRequest(headerKey string, reqMethod string, reqParams core.JSONB, reqPath string) (*models.IdempotencyKey, *utils.ApplictaionError)
- func (s *IdempotencyKeyService) Lock(idempotencyKey string) (*models.IdempotencyKey, *utils.ApplictaionError)
- func (s *IdempotencyKeyService) Retrieve(idempotencyKey string) (*models.IdempotencyKey, *utils.ApplictaionError)
- func (s *IdempotencyKeyService) SetContext(context context.Context) *IdempotencyKeyService
- func (s *IdempotencyKeyService) Update(idempotencyKey string, data *models.IdempotencyKey) (*models.IdempotencyKey, *utils.ApplictaionError)
- func (s *IdempotencyKeyService) WorkStage(idempotencyKey string, ...) (*models.IdempotencyKey, *utils.ApplictaionError)
- type InviteService
- func (s *InviteService) Accept(token string, user *types.AcceptCustomer) (*models.User, *utils.ApplictaionError)
- func (s *InviteService) Create(data *types.CreateInviteInput, validDuration time.Duration) *utils.ApplictaionError
- func (s *InviteService) Delete(inviteId uuid.UUID) *utils.ApplictaionError
- func (s *InviteService) List(selector *types.FilterableInvite, config *sql.Options) ([]models.Invite, *utils.ApplictaionError)
- func (s *InviteService) Resend(id uuid.UUID) *utils.ApplictaionError
- func (s *InviteService) SetContext(context context.Context) *InviteService
- type LineItemAdjustmentService
- func (s *LineItemAdjustmentService) Create(data *models.LineItemAdjustment) (*models.LineItemAdjustment, *utils.ApplictaionError)
- func (s *LineItemAdjustmentService) CreateAdjustmentForLineItem(cart *models.Cart, lineItem *models.LineItem) ([]models.LineItemAdjustment, *utils.ApplictaionError)
- func (s *LineItemAdjustmentService) CreateAdjustments(cart *models.Cart, lineItem *models.LineItem) ([]models.LineItemAdjustment, [][]models.LineItemAdjustment, ...)
- func (s *LineItemAdjustmentService) Delete(id uuid.UUID, selector *models.LineItemAdjustment, config *sql.Options) *utils.ApplictaionError
- func (s *LineItemAdjustmentService) DeleteSlice(ids uuid.UUIDs, selector []models.LineItemAdjustment) *utils.ApplictaionError
- func (s *LineItemAdjustmentService) GenerateAdjustments(calculationContextData types.CalculationContextData, ...) ([]models.LineItemAdjustment, *utils.ApplictaionError)
- func (s *LineItemAdjustmentService) List(selector types.FilterableLineItemAdjustmentProps, config *sql.Options) ([]models.LineItemAdjustment, *utils.ApplictaionError)
- func (s *LineItemAdjustmentService) Retrieve(id uuid.UUID, config *sql.Options) (*models.LineItemAdjustment, *utils.ApplictaionError)
- func (s *LineItemAdjustmentService) SetContext(context context.Context) *LineItemAdjustmentService
- func (s *LineItemAdjustmentService) Update(id uuid.UUID, Update *models.LineItemAdjustment) (*models.LineItemAdjustment, *utils.ApplictaionError)
- type LineItemService
- func (s *LineItemService) CloneTo(ids uuid.UUIDs, data *models.LineItem, options map[string]interface{}) ([]models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) Create(data []models.LineItem) ([]models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) CreateReturnLines(returnId uuid.UUID, cartId uuid.UUID) (*models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) CreateTaxLine(data *models.LineItemTaxLine) (*models.LineItemTaxLine, *utils.ApplictaionError)
- func (s *LineItemService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *LineItemService) DeleteWithTaxLines(id uuid.UUID) *utils.ApplictaionError
- func (s *LineItemService) Generate(variantId uuid.UUID, variant []types.GenerateInputData, regionId uuid.UUID, ...) ([]models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) List(selector models.LineItem, config *sql.Options) ([]models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) Retrieve(lineItemId uuid.UUID, config *sql.Options) (*models.LineItem, *utils.ApplictaionError)
- func (s *LineItemService) SetContext(context context.Context) *LineItemService
- func (s *LineItemService) Update(id uuid.UUID, selector *models.LineItem, Update *models.LineItem, ...) (*models.LineItem, *utils.ApplictaionError)
- type LineItemTotalsOptions
- type NewTotalsService
- func (s *NewTotalsService) GetGiftCardTotals(giftCardableAmount float64, giftCardTransactions []models.GiftCardTransaction, ...) (*Total, *utils.ApplictaionError)
- func (s *NewTotalsService) GetGiftCardTransactionsTotals(giftCardTransactions []models.GiftCardTransaction, region *models.Region) *Total
- func (s *NewTotalsService) GetGiftCardableAmount(giftCardsTaxable bool, ...) float64
- func (s *NewTotalsService) GetLineItemRefund(lineItem models.LineItem, calculationContext *interfaces.TaxCalculationContext, ...) (float64, *utils.ApplictaionError)
- func (s *NewTotalsService) GetLineItemTotals(items []models.LineItem, includeTax bool, ...) (map[uuid.UUID]models.LineItem, *utils.ApplictaionError)
- func (s *NewTotalsService) GetShippingMethodTotals(shippingMethods []models.ShippingMethod, includeTax bool, ...) (map[uuid.UUID]models.ShippingMethod, *utils.ApplictaionError)
- func (s *NewTotalsService) SetContext(context context.Context) *NewTotalsService
- type NoteService
- func (s *NoteService) Create(data *types.CreateNoteInput, config map[string]interface{}) (*models.Note, *utils.ApplictaionError)
- func (s *NoteService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *NoteService) List(selector *types.FilterableNote, config *sql.Options) ([]models.Note, *utils.ApplictaionError)
- func (s *NoteService) ListAndCount(selector *types.FilterableNote, config *sql.Options) ([]models.Note, *int64, *utils.ApplictaionError)
- func (s *NoteService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Note, *utils.ApplictaionError)
- func (s *NoteService) SetContext(context context.Context) *NoteService
- func (s *NoteService) Update(id uuid.UUID, data *types.UpdateNoteInput) (*models.Note, *utils.ApplictaionError)
- type NotificationService
- func (s *NotificationService) HandleEvent(eventName string, data map[string]interface{}) *utils.ApplictaionError
- func (s *NotificationService) List(selector *types.FilterableNotification, config *sql.Options) ([]models.Notification, *utils.ApplictaionError)
- func (s *NotificationService) ListAndCount(selector *types.FilterableNotification, config *sql.Options) ([]models.Notification, *int64, *utils.ApplictaionError)
- func (s *NotificationService) RegisterAttachmentGenerator(service interface{})
- func (s *NotificationService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
- func (s *NotificationService) Resend(id uuid.UUID, config *sql.Options) (*models.Notification, *utils.ApplictaionError)
- func (s *NotificationService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Notification, *utils.ApplictaionError)
- func (s *NotificationService) RetrieveProvider(id uuid.UUID) (interfaces.INotificationService, *utils.ApplictaionError)
- func (s *NotificationService) Send(event string, eventData map[string]interface{}, providerId uuid.UUID) (*models.Notification, *utils.ApplictaionError)
- func (s *NotificationService) SetContext(context context.Context) *NotificationService
- func (s *NotificationService) Subscribe(eventName string, providerId uuid.UUID) *utils.ApplictaionError
- type OAuthService
- func (s *OAuthService) Create(data *types.CreateOauthInput) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) GenerateToken(appName string, code string, state string) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) List(selector *models.OAuth, config *sql.Options) ([]models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) RefreshToken(appName string) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) RegisterOauthApp(appDetails *types.CreateOauthInput) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) RetrieveByName(appName string, config *sql.Options) (*models.OAuth, *utils.ApplictaionError)
- func (s *OAuthService) SetContext(context context.Context) *OAuthService
- func (s *OAuthService) Update(id uuid.UUID, data *types.UpdateOauthInput) (*models.OAuth, *utils.ApplictaionError)
- type OrderEditService
- func (s *OrderEditService) AddLineItem(id uuid.UUID, data *types.AddOrderEditLineItemInput) *utils.ApplictaionError
- func (s *OrderEditService) Cancel(id uuid.UUID, canceledBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) Confirm(id uuid.UUID, confirmedBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) Create(data *types.CreateOrderEditInput, createdBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) Decline(id uuid.UUID, declinedBy uuid.UUID, declinedReason string) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) DecorateTotals(orderEdit *models.OrderEdit) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *OrderEditService) DeleteClonedItems(id uuid.UUID) *utils.ApplictaionError
- func (s *OrderEditService) DeleteItemChange(id uuid.UUID, itemChangeId uuid.UUID) *utils.ApplictaionError
- func (s *OrderEditService) List(selector *types.FilterableOrderEdit, config *sql.Options) ([]models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) ListAndCount(selector *types.FilterableOrderEdit, config *sql.Options) ([]models.OrderEdit, *int64, *utils.ApplictaionError)
- func (s *OrderEditService) RefreshAdjustments(id uuid.UUID, preserveCustomAdjustments bool) *utils.ApplictaionError
- func (s *OrderEditService) RemoveLineItem(id uuid.UUID, lineItemId uuid.UUID) *utils.ApplictaionError
- func (s *OrderEditService) RequestConfirmation(id uuid.UUID, requestedBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) RetrieveActive(orderId uuid.UUID, config *sql.Options) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) SetContext(context context.Context) *OrderEditService
- func (s *OrderEditService) Update(id uuid.UUID, data *models.OrderEdit) (*models.OrderEdit, *utils.ApplictaionError)
- func (s *OrderEditService) UpdateLineItem(id uuid.UUID, itemId uuid.UUID, quantity int) *utils.ApplictaionError
- type OrderItemChangeService
- func (s *OrderItemChangeService) Create(data *types.CreateOrderEditItemChangeInput) (*models.OrderItemChange, *utils.ApplictaionError)
- func (s *OrderItemChangeService) Delete(itemChangeIds uuid.UUIDs) *utils.ApplictaionError
- func (s *OrderItemChangeService) List(selector models.OrderItemChange, config *sql.Options) ([]models.OrderItemChange, *utils.ApplictaionError)
- func (s *OrderItemChangeService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OrderItemChange, *utils.ApplictaionError)
- func (s *OrderItemChangeService) SetContext(context context.Context) *OrderItemChangeService
- type OrderService
- func (s *OrderService) AddShippingMethod(orderId uuid.UUID, optionId uuid.UUID, data map[string]interface{}, ...) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) Archive(id uuid.UUID) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) Cancel(orderId uuid.UUID) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CapturePayment(orderId uuid.UUID) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CompleteOrder(id uuid.UUID) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CreateFromCart(id uuid.UUID, data *models.Cart) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CreateFulfillment(id uuid.UUID, itemsToFulfill []types.FulFillmentItemType, ...) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CreateRefund(id uuid.UUID, refundAmount float64, reason models.RefundReason, note *string, ...) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) CreateShipment(orderId uuid.UUID, fulfillmentId uuid.UUID, ...) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) GetFulfillmentItems(order models.Order, items []types.FulFillmentItemType, ...) ([]models.LineItem, *utils.ApplictaionError)
- func (s *OrderService) GetTotalsRelations(config *sql.Options) []string
- func (s *OrderService) List(selector *types.FilterableOrder, config *sql.Options) ([]models.Order, *utils.ApplictaionError)
- func (s *OrderService) ListAndCount(selector *types.FilterableOrder, config *sql.Options) ([]models.Order, *int64, *utils.ApplictaionError)
- func (s *OrderService) RegisterReturnReceived(id uuid.UUID, receivedReturn *models.Return, customRefundAmount *float64) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) Retrieve(selector models.Order, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveByCartId(cartId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveByCartIdWithTotals(cartId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveByExternalId(externalId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveByIdWithTotals(id uuid.UUID, config *sql.Options, context types.TotalsContext) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveLegacy(id uuid.UUID, selector models.Order, config *sql.Options) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) RetrieveWithTotals(selector models.Order, config *sql.Options, context types.TotalsContext) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) SetContext(context context.Context) *OrderService
- func (s *OrderService) Update(orderId uuid.UUID, update *types.UpdateOrderInput) (*models.Order, *utils.ApplictaionError)
- func (s *OrderService) UpdateBillingAddress(order *models.Order, address *models.Address) *utils.ApplictaionError
- func (s *OrderService) UpdateShippingAddress(order *models.Order, address *models.Address) *utils.ApplictaionError
- func (s *OrderService) ValidateFulfillmentLineItem(item *models.LineItem, quantity int) *models.LineItem
- type PaymentCollectionService
- func (s *PaymentCollectionService) AuthorizePaymentSessions(id uuid.UUID, sessionIds uuid.UUIDs, context map[string]interface{}) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) Create(data *types.CreatePaymentCollectionInput) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *PaymentCollectionService) IsValidTotalAmount(total float64, sessionsInput []types.PaymentCollectionsSessionsBatchInput) bool
- func (s *PaymentCollectionService) MarkAsAuthorized(id uuid.UUID) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) RefreshPaymentSession(id uuid.UUID, sessionId uuid.UUID, customerId uuid.UUID) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentCollectionService) Retrieve(id uuid.UUID, config *sql.Options) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) SetContext(context context.Context) *PaymentCollectionService
- func (s *PaymentCollectionService) SetPaymentSession(id uuid.UUID, sessionInput *types.SessionsInput, customerId uuid.UUID) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) SetPaymentSessionsBatch(id uuid.UUID, paymentCollection *models.PaymentCollection, ...) (*models.PaymentCollection, *utils.ApplictaionError)
- func (s *PaymentCollectionService) Update(id uuid.UUID, Update *models.PaymentCollection) (*models.PaymentCollection, *utils.ApplictaionError)
- type PaymentProviderService
- func (s *PaymentProviderService) AuthorizePayment(paymentSession *models.PaymentSession, context map[string]interface{}) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) CancelPayment(data *models.Payment) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) CapturePayment(data *models.Payment) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) CreatePayment(data *types.CreatePaymentInput) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) CreateSession(providerId uuid.UUID, session *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) DeleteSession(paymentSession *models.PaymentSession) *utils.ApplictaionError
- func (s *PaymentProviderService) GetStatus(payment *models.Payment) (*models.PaymentSessionStatus, *utils.ApplictaionError)
- func (s *PaymentProviderService) List() ([]models.PaymentProvider, *utils.ApplictaionError)
- func (s *PaymentProviderService) ListPayments(selector models.Payment, config *sql.Options) ([]models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) RefreshSession(paymentSession *models.PaymentSession, sessionInput *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) RefundFromPayment(payment *models.Payment, amount float64, reason models.RefundReason, ...) (*models.Refund, *utils.ApplictaionError)
- func (s *PaymentProviderService) RefundPayments(data []models.Payment, amount float64, reason models.RefundReason, ...) (*models.Refund, *utils.ApplictaionError)
- func (s *PaymentProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
- func (s *PaymentProviderService) RetrievePayment(id uuid.UUID, relations []string) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) RetrieveProvider(providerId uuid.UUID) (interfaces.IPaymentProcessor, *utils.ApplictaionError)
- func (s *PaymentProviderService) RetrieveRefund(id uuid.UUID, config *sql.Options) (*models.Refund, *utils.ApplictaionError)
- func (s *PaymentProviderService) RetrieveSession(id uuid.UUID, relations []string) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) SaveSession(id uuid.UUID, providerId uuid.UUID, data *models.PaymentSession) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) SetContext(context context.Context) *PaymentProviderService
- func (s *PaymentProviderService) UpdatePayment(id uuid.UUID, data *types.UpdatePaymentInput) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentProviderService) UpdateSession(paymentSession *models.PaymentSession, sessionInput *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
- func (s *PaymentProviderService) UpdateSessionData(paymentSession *models.PaymentSession, data map[string]interface{}) (*models.PaymentSession, *utils.ApplictaionError)
- type PaymentService
- func (s *PaymentService) Capture(id uuid.UUID, payment *models.Payment) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentService) Create(data *types.CreatePaymentInput) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentService) List(selector models.Payment, config *sql.Options) ([]models.Payment, *utils.ApplictaionError)
- func (s *PaymentService) Refund(id uuid.UUID, payment *models.Payment, amount float64, ...) (*models.Refund, *utils.ApplictaionError)
- func (s *PaymentService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Payment, *utils.ApplictaionError)
- func (s *PaymentService) SetContext(context context.Context) *PaymentService
- func (s *PaymentService) Update(id uuid.UUID, data *types.UpdatePaymentInput) (*models.Payment, *utils.ApplictaionError)
- type PriceListService
- func (s *PriceListService) AddCurrencyFromRegion(prices []types.PriceListPriceCreateInput) ([]models.MoneyAmount, *utils.ApplictaionError)
- func (s *PriceListService) AddPrices(id uuid.UUID, prices []types.PriceListPriceCreateInput, replace bool) (*models.PriceList, *utils.ApplictaionError)
- func (s *PriceListService) ClearPrices(id uuid.UUID) *utils.ApplictaionError
- func (s *PriceListService) Create(data *types.CreatePriceListInput) (*models.PriceList, *utils.ApplictaionError)
- func (s *PriceListService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *PriceListService) DeletePrices(id uuid.UUID, priceIds uuid.UUIDs) *utils.ApplictaionError
- func (s *PriceListService) DeleteProductPrices(id uuid.UUID, productIds uuid.UUIDs) (uuid.UUIDs, *int, *utils.ApplictaionError)
- func (s *PriceListService) DeleteVariantPrices(id uuid.UUID, variantIds uuid.UUIDs) (uuid.UUIDs, *int, *utils.ApplictaionError)
- func (s *PriceListService) List(selector *types.FilterablePriceList, config *sql.Options) ([]models.PriceList, *utils.ApplictaionError)
- func (s *PriceListService) ListAndCount(selector *types.FilterablePriceList, config *sql.Options) ([]models.PriceList, *int64, *utils.ApplictaionError)
- func (s *PriceListService) ListPriceListsVariantIdsMap(priceListIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)
- func (s *PriceListService) ListProducts(id uuid.UUID, selector *types.FilterableProduct, config *sql.Options, ...) ([]models.Product, *int64, *utils.ApplictaionError)
- func (s *PriceListService) ListVariants(id uuid.UUID, selector *types.FilterableProductVariant, config *sql.Options, ...) ([]models.ProductVariant, *int64, *utils.ApplictaionError)
- func (s *PriceListService) Retrieve(id uuid.UUID, config *sql.Options) (*models.PriceList, *utils.ApplictaionError)
- func (s *PriceListService) SetContext(context context.Context) *PriceListService
- func (s *PriceListService) Update(id uuid.UUID, data *types.UpdatePriceListInput) (*models.PriceList, *utils.ApplictaionError)
- func (s *PriceListService) UpsertCustomerGroups(id uuid.UUID, customerGroups []types.CustomerGroups) *utils.ApplictaionError
- type PricingService
- func (s *PricingService) GetProductPricing(product *models.Product, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
- func (s *PricingService) GetProductPricingById(productId uuid.UUID, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
- func (s *PricingService) GetProductVariantPricingById(variantId uuid.UUID, context *interfaces.PricingContext) (*types.ProductVariantPricing, *utils.ApplictaionError)
- func (s *PricingService) GetProductVariantsPricing(data []interfaces.Pricing, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
- func (s *PricingService) GetShippingOptionPricing(shippingOption *models.ShippingOption, context *interfaces.PricingContext) (*types.PricedShippingOption, *utils.ApplictaionError)
- func (s *PricingService) SetAdminProductPricing(products []models.Product) ([]models.Product, *utils.ApplictaionError)
- func (s *PricingService) SetAdminVariantPricing(variants []models.ProductVariant, context *interfaces.PricingContext) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *PricingService) SetContext(context context.Context) *PricingService
- func (s *PricingService) SetProductPrices(products []models.Product, context *interfaces.PricingContext) ([]models.Product, *utils.ApplictaionError)
- func (s *PricingService) SetShippingOptionPrices(shippingOptions []models.ShippingOption, context *interfaces.PricingContext) ([]types.PricedShippingOption, *utils.ApplictaionError)
- func (s *PricingService) SetVariantPrices(variants []models.ProductVariant, context *interfaces.PricingContext) ([]models.ProductVariant, *utils.ApplictaionError)
- type ProductCategoryService
- func (s *ProductCategoryService) AddProducts(productCategoryId uuid.UUID, productIDs uuid.UUIDs) *utils.ApplictaionError
- func (s *ProductCategoryService) Create(data *types.CreateProductCategoryInput) (*models.ProductCategory, *utils.ApplictaionError)
- func (s *ProductCategoryService) Delete(productCategoryId uuid.UUID) *utils.ApplictaionError
- func (s *ProductCategoryService) List(selector *types.FilterableProductCategory, config *sql.Options) ([]models.ProductCategory, *utils.ApplictaionError)
- func (s *ProductCategoryService) ListAndCount(selector *types.FilterableProductCategory, config *sql.Options) ([]models.ProductCategory, *int64, *utils.ApplictaionError)
- func (s *ProductCategoryService) RemoveProducts(productCategoryId uuid.UUID, productIDs uuid.UUIDs) *utils.ApplictaionError
- func (s *ProductCategoryService) Retrieve(selector models.ProductCategory, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
- func (s *ProductCategoryService) RetrieveByHandle(handle string, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
- func (s *ProductCategoryService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
- func (s *ProductCategoryService) SetContext(context context.Context) *ProductCategoryService
- func (s *ProductCategoryService) Update(productCategoryId uuid.UUID, data *types.UpdateProductCategoryInput) (*models.ProductCategory, *utils.ApplictaionError)
- type ProductCollectionService
- func (s *ProductCollectionService) AddProducts(collectionId uuid.UUID, productIds uuid.UUIDs) (*models.ProductCollection, *utils.ApplictaionError)
- func (s *ProductCollectionService) Create(data *types.CreateProductCollection) (*models.ProductCollection, *utils.ApplictaionError)
- func (s *ProductCollectionService) Delete(collectionId uuid.UUID) *utils.ApplictaionError
- func (s *ProductCollectionService) List(selector *types.FilterableCollection, config *sql.Options) ([]models.ProductCollection, *utils.ApplictaionError)
- func (s *ProductCollectionService) ListAndCount(selector *types.FilterableCollection, config *sql.Options) ([]models.ProductCollection, *int64, *utils.ApplictaionError)
- func (s *ProductCollectionService) RemoveProducts(collectionId uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError
- func (s *ProductCollectionService) Retrieve(collectionId uuid.UUID, config *sql.Options) (*models.ProductCollection, *utils.ApplictaionError)
- func (s *ProductCollectionService) RetrieveByHandle(collectionHandle string, config *sql.Options) (*models.ProductCollection, *utils.ApplictaionError)
- func (s *ProductCollectionService) SetContext(context context.Context) *ProductCollectionService
- func (s *ProductCollectionService) Update(collectionId uuid.UUID, data *types.UpdateProductCollection) (*models.ProductCollection, *utils.ApplictaionError)
- type ProductService
- func (s *ProductService) AddOption(id uuid.UUID, optionTitle string) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) Count(selector models.Product) (*int64, *utils.ApplictaionError)
- func (s *ProductService) Create(data *types.CreateProductInput) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) DecorateProductsWithSalesChannels(products []models.Product) ([]models.Product, *utils.ApplictaionError)
- func (s *ProductService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *ProductService) DeleteOption(id uuid.UUID, optionId uuid.UUID) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) FilterProductsBySalesChannel(productIds uuid.UUIDs, salesChannelId uuid.UUID, config *sql.Options) ([]models.Product, *utils.ApplictaionError)
- func (s *ProductService) IsProductInSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) (bool, *utils.ApplictaionError)
- func (s *ProductService) List(selector *types.FilterableProduct, config *sql.Options) ([]models.Product, *utils.ApplictaionError)
- func (s *ProductService) ListAndCount(selector *types.FilterableProduct, config *sql.Options) ([]models.Product, *int64, *utils.ApplictaionError)
- func (s *ProductService) ListTagsByUsage(take int) ([]models.ProductTag, *utils.ApplictaionError)
- func (s *ProductService) ListTypes() ([]models.ProductType, *utils.ApplictaionError)
- func (s *ProductService) ReorderVariants(id uuid.UUID, variantOrder uuid.UUIDs) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) Retrieve(selector models.Product, config *sql.Options) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) RetrieveByExternalId(externalId string, config *sql.Options) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) RetrieveByHandle(productHandle string, config *sql.Options) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) RetrieveOptionByTitle(title string, id uuid.UUID) (*models.ProductOption, *utils.ApplictaionError)
- func (s *ProductService) RetrieveVariants(id uuid.UUID, config *sql.Options) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductService) SetContext(context context.Context) *ProductService
- func (s *ProductService) Update(id uuid.UUID, data *types.UpdateProductInput) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) UpdateOption(id uuid.UUID, optionId uuid.UUID, data *types.ProductOptionInput) (*models.Product, *utils.ApplictaionError)
- func (s *ProductService) UpdateShippingProfile(productIds uuid.UUIDs, profileId uuid.UUID) ([]models.Product, *utils.ApplictaionError)
- type ProductTagService
- func (s *ProductTagService) Create(tag *models.ProductTag) (*models.ProductTag, *utils.ApplictaionError)
- func (s *ProductTagService) List(selector *types.FilterableProductTag, config *sql.Options) ([]models.ProductTag, *utils.ApplictaionError)
- func (s *ProductTagService) ListAndCount(selector *types.FilterableProductTag, config *sql.Options) ([]models.ProductTag, *int64, *utils.ApplictaionError)
- func (s *ProductTagService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductTag, *utils.ApplictaionError)
- func (s *ProductTagService) SetContext(context context.Context) *ProductTagService
- type ProductTaxRateService
- type ProductTypeService
- func (s *ProductTypeService) List(selector *types.FilterableProductType, config *sql.Options) ([]models.ProductType, *utils.ApplictaionError)
- func (s *ProductTypeService) ListAndCount(selector *types.FilterableProductType, config *sql.Options) ([]models.ProductType, *int64, *utils.ApplictaionError)
- func (s *ProductTypeService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductType, *utils.ApplictaionError)
- func (s *ProductTypeService) SetContext(context context.Context) *ProductTypeService
- type ProductVariantInventoryService
- func (s *ProductVariantInventoryService) AdjustInventory(variantId uuid.UUID, locationId uuid.UUID, quantity int) *utils.ApplictaionError
- func (s *ProductVariantInventoryService) AdjustReservationsQuantityByLineItem(lineItemId uuid.UUID, variantId uuid.UUID, locationId uuid.UUID, quantity int) *utils.ApplictaionError
- func (s *ProductVariantInventoryService) AttachInventoryItem(data []models.ProductVariantInventoryItem) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ConfirmInventory(variantId uuid.UUID, quantity int, context map[string]interface{}) (bool, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) DeleteReservationsByLineItem(lineItemId uuid.UUID, variantId uuid.UUID, quantity int) *utils.ApplictaionError
- func (s *ProductVariantInventoryService) DetachInventoryItem(inventoryItemId uuid.UUID, variantId uuid.UUID) *utils.ApplictaionError
- func (s *ProductVariantInventoryService) GetAvailabilityContext(variants []models.ProductVariant, salesChannelId uuid.UUIDs, ...) (*AvailabilityContext, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) GetVariantQuantityFromVariantInventoryItems(variantInventoryItems []models.ProductVariantInventoryItem, ...) (*int, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ListByItem(itemIds uuid.UUIDs) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ListByVariant(variantIds uuid.UUIDs) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ListInventoryItemsByVariant(variantId uuid.UUID) ([]interfaces.InventoryItemDTO, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ListVariantsByItem(itemId uuid.UUID) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ReserveQuantity(variantId uuid.UUID, quantity int, context ReserveQuantityContext) ([]interfaces.ReservationItemDTO, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) Retrieve(inventoryItemId uuid.UUID, variantId uuid.UUID) (*models.ProductVariantInventoryItem, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) SetContext(context context.Context) *ProductVariantInventoryService
- func (s *ProductVariantInventoryService) SetProductAvailability(products []models.Product, salesChannelId uuid.UUIDs) ([]models.Product, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) SetVariantAvailability(variants []models.ProductVariant, salesChannelId uuid.UUIDs, ...) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantInventoryService) ValidateInventoryAtLocation(items []models.LineItem, locationId uuid.UUID) *utils.ApplictaionError
- type ProductVariantService
- func (s *ProductVariantService) AddOptionValue(id uuid.UUID, optionId uuid.UUID, optionValue string) (*models.ProductOptionValue, *utils.ApplictaionError)
- func (s *ProductVariantService) Create(productId uuid.UUID, product *models.Product, ...) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) Delete(variantIds uuid.UUIDs) *utils.ApplictaionError
- func (s *ProductVariantService) DeleteOptionValue(id uuid.UUID, optionId uuid.UUID) *utils.ApplictaionError
- func (s *ProductVariantService) GetRegionPrice(id uuid.UUID, data *types.GetRegionPriceContext) (*float64, *utils.ApplictaionError)
- func (s *ProductVariantService) IsVariantInSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) (bool, *utils.ApplictaionError)
- func (s *ProductVariantService) List(selector *types.FilterableProductVariant, config *sql.Options) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) ListAndCount(selector *types.FilterableProductVariant, config *sql.Options) ([]models.ProductVariant, *int64, *utils.ApplictaionError)
- func (s *ProductVariantService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) RetrieveBySKU(sku string, config *sql.Options) (*models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) SetContext(context context.Context) *ProductVariantService
- func (s *ProductVariantService) SetCurrencyPrice(id uuid.UUID, data types.ProductVariantPrice) (*models.MoneyAmount, *utils.ApplictaionError)
- func (s *ProductVariantService) SetRegionPrice(id uuid.UUID, price types.ProductVariantPrice) (*models.MoneyAmount, *utils.ApplictaionError)
- func (s *ProductVariantService) Update(id uuid.UUID, variant *models.ProductVariant, ...) (*models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) UpdateBatch(data []types.UpdateProductVariantData) ([]models.ProductVariant, *utils.ApplictaionError)
- func (s *ProductVariantService) UpdateOptionValue(id uuid.UUID, optionId uuid.UUID, optionValue string) (*models.ProductOptionValue, *utils.ApplictaionError)
- func (s *ProductVariantService) UpdateVariantPrices(data []types.UpdateVariantPricesData) *utils.ApplictaionError
- func (s *ProductVariantService) UpsertCurrencyPrices(data []types.UpdateVariantCurrencyPriceData) *utils.ApplictaionError
- func (s *ProductVariantService) UpsertRegionPrices(data []types.UpdateVariantRegionPriceData) *utils.ApplictaionError
- func (s *ProductVariantService) ValidateVariantsToCreate(product *models.Product, variants []types.CreateProductVariantInput) *utils.ApplictaionError
- type PublishableApiKeyService
- func (s *PublishableApiKeyService) AddSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError
- func (s *PublishableApiKeyService) Create(data *types.CreatePublishableApiKeyInput, loggedInUserId uuid.UUID) (*models.PublishableApiKey, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *PublishableApiKeyService) GetResourceScopes(id uuid.UUID) (*types.PublishableApiKeyScopes, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) IsValid(id uuid.UUID) (bool, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) ListAndCount(selector *models.PublishableApiKey, config *sql.Options) ([]models.PublishableApiKey, *int64, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) ListSalesChannels(id uuid.UUID, q *string) ([]models.SalesChannel, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) RemoveSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError
- func (s *PublishableApiKeyService) Retrieve(selector *models.PublishableApiKey, config *sql.Options) (*models.PublishableApiKey, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.PublishableApiKey, *utils.ApplictaionError)
- func (s *PublishableApiKeyService) Revoke(id uuid.UUID, loggedInUserId uuid.UUID) *utils.ApplictaionError
- func (s *PublishableApiKeyService) SetContext(context context.Context) *PublishableApiKeyService
- func (s *PublishableApiKeyService) Update(id uuid.UUID, data *types.UpdatePublishableApiKeyInput) (*models.PublishableApiKey, *utils.ApplictaionError)
- type RegionService
- func (s *RegionService) AddCountry(regionId uuid.UUID, code string) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) AddFulfillmentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) AddPaymentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) Create(data *types.CreateRegionInput) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) Delete(regionId uuid.UUID) *utils.ApplictaionError
- func (s *RegionService) List(selector *types.FilterableRegion, config *sql.Options) ([]models.Region, *utils.ApplictaionError)
- func (s *RegionService) ListAndCount(selector *types.FilterableRegion, config *sql.Options) ([]models.Region, *int64, *utils.ApplictaionError)
- func (s *RegionService) RemoveCountry(regionId uuid.UUID, code string) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) RemoveFulfillmentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) RemovePaymentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) Retrieve(regionId uuid.UUID, config *sql.Options) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) RetrieveByCountryCode(code string, config *sql.Options) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) RetrieveByName(name string) (*models.Region, *utils.ApplictaionError)
- func (s *RegionService) SetContext(context context.Context) *RegionService
- func (s *RegionService) Update(regionId uuid.UUID, Update *types.UpdateRegionInput) (*models.Region, *utils.ApplictaionError)
- type Registry
- type ReserveQuantityContext
- type ReturnReasonService
- func (s *ReturnReasonService) Create(data *types.CreateReturnReason) (*models.ReturnReason, *utils.ApplictaionError)
- func (s *ReturnReasonService) Delete(returnReasonId uuid.UUID) *utils.ApplictaionError
- func (s *ReturnReasonService) List(selector *types.FilterableReturnReason, config *sql.Options) ([]models.ReturnReason, *utils.ApplictaionError)
- func (s *ReturnReasonService) Retrieve(returnReasonId uuid.UUID, config *sql.Options) (*models.ReturnReason, *utils.ApplictaionError)
- func (s *ReturnReasonService) SetContext(context context.Context) *ReturnReasonService
- func (s *ReturnReasonService) Update(id uuid.UUID, data *types.UpdateReturnReason) (*models.ReturnReason, *utils.ApplictaionError)
- type ReturnService
- func (s *ReturnService) Cancel(returnId uuid.UUID) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) Create(data *types.CreateReturnInput) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) Fulfill(returnId uuid.UUID) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) GetFulfillmentItems(order *models.Order, items []types.OrderReturnItem, transformer Transformer) ([]models.ReturnItem, *utils.ApplictaionError)
- func (s *ReturnService) List(selector *types.FilterableReturn, config *sql.Options) ([]models.Return, *utils.ApplictaionError)
- func (s *ReturnService) ListAndCount(selector *types.FilterableReturn, config *sql.Options) ([]models.Return, *int64, *utils.ApplictaionError)
- func (s *ReturnService) Receive(returnId uuid.UUID, receivedItems []types.OrderReturnItem, ...) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) Retrieve(returnId uuid.UUID, config *sql.Options) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) RetrieveBySwap(swapId uuid.UUID, relations []string) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) SetContext(context context.Context) *ReturnService
- func (s *ReturnService) Update(returnId uuid.UUID, data *types.UpdateReturnInput) (*models.Return, *utils.ApplictaionError)
- func (s *ReturnService) ValidateReturnLineItem(item *models.LineItem, quantity int, additional *types.OrderReturnItem) (*models.ReturnItem, *utils.ApplictaionError)
- func (s *ReturnService) ValidateReturnStatuses(order *models.Order) *utils.ApplictaionError
- type SalesChannelInventoryService
- type SalesChannelLocationService
- func (s *SalesChannelLocationService) AssociateLocation(salesChannelId uuid.UUID, locationId uuid.UUID) *utils.ApplictaionError
- func (s *SalesChannelLocationService) ListLocationIds(salesChannelId uuid.UUIDs) (uuid.UUIDs, *utils.ApplictaionError)
- func (s *SalesChannelLocationService) ListSalesChannelIds(locationId uuid.UUID) (uuid.UUIDs, *utils.ApplictaionError)
- func (s *SalesChannelLocationService) RemoveLocation(salesChannelId uuid.UUID, locationId uuid.UUID) *utils.ApplictaionError
- func (s *SalesChannelLocationService) SetContext(context context.Context) *SalesChannelLocationService
- type SalesChannelService
- func (s *SalesChannelService) AddProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) Create(data *types.CreateSalesChannelInput) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) CreateDefault() (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) Delete(salesChannelId uuid.UUID) *utils.ApplictaionError
- func (s *SalesChannelService) List(selector *types.FilterableSalesChannel, config *sql.Options) ([]models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) ListAndCount(selector *types.FilterableSalesChannel, config *sql.Options) ([]models.SalesChannel, *int64, *utils.ApplictaionError)
- func (s *SalesChannelService) ListProductIdsBySalesChannelIds(salesChannelIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)
- func (s *SalesChannelService) RemoveProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) Retrieve(selector *models.SalesChannel, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) RetrieveById(salesChannelId uuid.UUID, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) RetrieveByName(name string, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) RetrieveDefault() (*models.SalesChannel, *utils.ApplictaionError)
- func (s *SalesChannelService) SetContext(context context.Context) *SalesChannelService
- func (s *SalesChannelService) Update(salesChannelId uuid.UUID, data *types.UpdateSalesChannelInput) (*models.SalesChannel, *utils.ApplictaionError)
- type ShippingMethodTotals
- type ShippingOptionService
- func (s *ShippingOptionService) AddRequirement(optionId uuid.UUID, requirement *models.ShippingOptionRequirement) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) Create(data *types.CreateShippingOptionInput) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) CreateShippingMethod(optionId uuid.UUID, data map[string]interface{}, ...) (*models.ShippingMethod, *utils.ApplictaionError)
- func (s *ShippingOptionService) Delete(optionId uuid.UUID) *utils.ApplictaionError
- func (s *ShippingOptionService) DeleteShippingMethods(shippingMethods []models.ShippingMethod) *utils.ApplictaionError
- func (s *ShippingOptionService) GetPrice(option *models.ShippingOption, data core.JSONB, cart *models.Cart) (float64, *utils.ApplictaionError)
- func (s *ShippingOptionService) List(selector *types.FilterableShippingOption, config *sql.Options) ([]models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) ListAndCount(selector *types.FilterableShippingOption, config *sql.Options) ([]models.ShippingOption, *int64, *utils.ApplictaionError)
- func (s *ShippingOptionService) RemoveRequirement(requirementId uuid.UUID) (*models.ShippingOptionRequirement, *utils.ApplictaionError)
- func (s *ShippingOptionService) Retrieve(optionId uuid.UUID, config *sql.Options) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) SetContext(context context.Context) *ShippingOptionService
- func (s *ShippingOptionService) Update(optionId uuid.UUID, data *types.UpdateShippingOptionInput) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) UpdateShippingMethod(id uuid.UUID, data *types.ShippingMethodUpdate) (*models.ShippingMethod, *utils.ApplictaionError)
- func (s *ShippingOptionService) UpdateShippingProfile(optionIds uuid.UUIDs, profileId uuid.UUID) ([]models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) ValidateAndMutatePrice(option *models.ShippingOption, option2 *types.CreateShippingOptionInput, ...) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) ValidateCartOption(option *models.ShippingOption, cart *models.Cart) (*models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingOptionService) ValidateRequirement(data *types.ValidateRequirementTypeInput, optionId uuid.UUID) (*models.ShippingOptionRequirement, *utils.ApplictaionError)
- type ShippingProfileService
- func (s *ShippingProfileService) AddProduct(profileId uuid.UUID, productId uuid.UUID) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) AddProducts(profileId uuid.UUID, productIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) AddShippingOption(profileId uuid.UUID, optionId uuid.UUID) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) AddShippingOptions(profileId uuid.UUID, optionIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) Create(data *types.CreateShippingProfile) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) CreateDefault() (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) CreateGiftCardDefault() (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) Delete(profileId uuid.UUID) *utils.ApplictaionError
- func (s *ShippingProfileService) FetchCartOptions(cart *models.Cart) ([]models.ShippingOption, *utils.ApplictaionError)
- func (s *ShippingProfileService) GetMapProfileIdsByProductIds(productIds uuid.UUIDs) (*map[uuid.UUID]uuid.UUID, *utils.ApplictaionError)
- func (s *ShippingProfileService) GetProfilesInCart(cart *models.Cart) (uuid.UUIDs, *utils.ApplictaionError)
- func (s *ShippingProfileService) List(selector *types.FilterableShippingProfile, config *sql.Options) ([]models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) RemoveProducts(profileId uuid.UUID, productIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) Retrieve(profileId uuid.UUID, config *sql.Options) (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) RetrieveDefault() (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) RetrieveForProducts(productIds uuid.UUIDs) (map[string]models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) RetrieveGiftCardDefault() (*models.ShippingProfile, *utils.ApplictaionError)
- func (s *ShippingProfileService) SetContext(context context.Context) *ShippingProfileService
- func (s *ShippingProfileService) Update(profileId uuid.UUID, data *types.UpdateShippingProfile) (*models.ShippingProfile, *utils.ApplictaionError)
- type ShippingTaxRateService
- type StagedJobService
- func (s *StagedJobService) Create(data []types.EmitData) *utils.ApplictaionError
- func (s *StagedJobService) Delete(stagedJobIds uuid.UUIDs) *utils.ApplictaionError
- func (s *StagedJobService) List(selector models.StagedJob, config *sql.Options) ([]models.StagedJob, *utils.ApplictaionError)
- func (s *StagedJobService) SetContext(context context.Context) *StagedJobService
- type StoreService
- func (s *StoreService) AddCurrency(code string) (*models.Store, *utils.ApplictaionError)
- func (s *StoreService) Create() (*models.Store, *utils.ApplictaionError)
- func (s *StoreService) GetDefaultCurrency(code string) *models.Currency
- func (s *StoreService) RemoveCurrency(code string) (*models.Store, *utils.ApplictaionError)
- func (s *StoreService) Retrieve(config *sql.Options) (*models.Store, *utils.ApplictaionError)
- func (s *StoreService) SetContext(context context.Context) *StoreService
- func (s *StoreService) Update(data *types.UpdateStoreInput) (*models.Store, *utils.ApplictaionError)
- type StrategyResolverService
- type SwapService
- func (s *SwapService) AreReturnItemsValid(returnItems []types.OrderReturnItem) (bool, *utils.ApplictaionError)
- func (s *SwapService) Cancel(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) Create(order *models.Order, returnItems []types.OrderReturnItem, ...) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) CreateCart(swapId uuid.UUID, ...) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) CreateFulfillment(swapId uuid.UUID, config *types.CreateShipmentConfig) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) CreateShipment(swapId uuid.UUID, fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, ...) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) DeleteMetadata(swapId string, key string) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) List(selector *types.FilterableSwap, config *sql.Options) ([]models.Swap, *utils.ApplictaionError)
- func (s *SwapService) ListAndCount(selector *types.FilterableSwap, config *sql.Options) ([]models.Swap, *int64, *utils.ApplictaionError)
- func (s *SwapService) ProcessDifference(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) RegisterCartCompletion(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) RegisterReceived(id uuid.UUID) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) Retrieve(swapId uuid.UUID, config *sql.Options) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) RetrieveByCartId(cartId uuid.UUID, relations []string) (*models.Swap, *utils.ApplictaionError)
- func (s *SwapService) SetContext(context context.Context) *SwapService
- func (s *SwapService) Update(swapId uuid.UUID, Update *models.Swap) (*models.Swap, *utils.ApplictaionError)
- type SystemProviderService
- func (s *SystemProviderService) AuthorizePayment() map[string]interface{}
- func (s *SystemProviderService) CancelPayment() map[string]interface{}
- func (s *SystemProviderService) CapturePayment() map[string]interface{}
- func (s *SystemProviderService) CreatePayment() map[string]interface{}
- func (s *SystemProviderService) DeletePayment() map[string]interface{}
- func (s *SystemProviderService) GetPaymentData() map[string]interface{}
- func (s *SystemProviderService) GetStatus() string
- func (s *SystemProviderService) GetTaxLines(itemLines []interfaces.ItemTaxCalculationLine, ...) ([]types.ProviderTaxLine, *utils.ApplictaionError)
- func (s *SystemProviderService) RefundPayment() map[string]interface{}
- func (s *SystemProviderService) SetContext(context context.Context) *SystemProviderService
- func (s *SystemProviderService) UpdatePayment() map[string]interface{}
- func (s *SystemProviderService) UpdatePaymentData() map[string]interface{}
- type SystemTaxService
- type TaxProviderService
- func (s *TaxProviderService) ClearLineItemsTaxLines(itemIds uuid.UUIDs) *utils.ApplictaionError
- func (s *TaxProviderService) ClearTaxLines(cartId uuid.UUID) *utils.ApplictaionError
- func (s *TaxProviderService) CreateShippingTaxLines(shippingMethod *models.ShippingMethod, ...) ([]models.ShippingMethodTaxLine, *utils.ApplictaionError)
- func (s *TaxProviderService) CreateTaxLines(cart *models.Cart, lineItems []models.LineItem, ...) ([]models.ShippingMethodTaxLine, []models.LineItemTaxLine, ...)
- func (s *TaxProviderService) GetCacheKey(id uuid.UUID, regionId uuid.UUID) string
- func (s *TaxProviderService) GetRegionRatesForProduct(productIds uuid.UUIDs, region *models.Region) (map[uuid.UUID][]types.TaxServiceRate, *utils.ApplictaionError)
- func (s *TaxProviderService) GetRegionRatesForShipping(optionId uuid.UUID, region *models.Region) ([]types.TaxServiceRate, *utils.ApplictaionError)
- func (s *TaxProviderService) GetShippingTaxLines(shippingMethod *models.ShippingMethod, ...) ([]models.ShippingMethodTaxLine, *utils.ApplictaionError)
- func (s *TaxProviderService) GetTaxLines(lineItems []models.LineItem, ...) ([]models.ShippingMethodTaxLine, []models.LineItemTaxLine, ...)
- func (s *TaxProviderService) GetTaxLinesMap(items []models.LineItem, calculationContext *interfaces.TaxCalculationContext) (types.TaxLinesMaps, *utils.ApplictaionError)
- func (s *TaxProviderService) List(selector *models.TaxProvider, config *sql.Options) ([]models.TaxProvider, *utils.ApplictaionError)
- func (s *TaxProviderService) ListAndCount(selector *models.TaxProvider, config *sql.Options) ([]models.TaxProvider, *int64, *utils.ApplictaionError)
- func (s *TaxProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
- func (s *TaxProviderService) RetrieveProvider(region models.Region) interfaces.ITaxService
- func (s *TaxProviderService) SetContext(context context.Context) *TaxProviderService
- type TaxRateService
- func (s *TaxRateService) AddToProduct(id uuid.UUID, productIds uuid.UUIDs, replace bool) ([]models.ProductTaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) AddToProductType(id uuid.UUID, productTypeIds uuid.UUIDs, replace bool) ([]models.ProductTypeTaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) AddToShippingOption(id uuid.UUID, optionIds uuid.UUIDs, replace bool) ([]models.ShippingTaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) Create(data *types.CreateTaxRateInput) (*models.TaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) Delete(id uuid.UUID) *utils.ApplictaionError
- func (s *TaxRateService) List(selector *types.FilterableTaxRate, config *sql.Options) ([]models.TaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) ListAndCount(selector *types.FilterableTaxRate, config *sql.Options) ([]models.TaxRate, int64, *utils.ApplictaionError)
- func (s *TaxRateService) ListByProduct(productId uuid.UUID, config types.TaxRateListByConfig) ([]models.TaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) ListByShippingOption(shippingOptionId uuid.UUID) ([]models.TaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) RemoveFromProduct(id uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError
- func (s *TaxRateService) RemoveFromProductType(id uuid.UUID, typeIds uuid.UUIDs) *utils.ApplictaionError
- func (s *TaxRateService) RemoveFromShippingOption(id uuid.UUID, optionIds uuid.UUIDs) *utils.ApplictaionError
- func (s *TaxRateService) Retrieve(taxRateId uuid.UUID, config *sql.Options) (*models.TaxRate, *utils.ApplictaionError)
- func (s *TaxRateService) SetContext(context context.Context) *TaxRateService
- func (s *TaxRateService) Update(id uuid.UUID, data *types.UpdateTaxRateInput) (*models.TaxRate, *utils.ApplictaionError)
- type TockenService
- func (s *TockenService) SetContext(context context.Context) *TockenService
- func (s *TockenService) SignToken(data map[string]interface{}) (*string, error)
- func (s *TockenService) SignTokenWithSecret(data map[string]interface{}, secret []byte) (*string, error)
- func (s *TockenService) VerifyToken(tocken string) (*jwt.Token, jwt.MapClaims, error)
- func (s *TockenService) VerifyTokenWithSecret(tocken string, secret []byte) (*jwt.Token, jwt.MapClaims, error)
- type Total
- type TotalsConfig
- type TotalsService
- func (s *TotalsService) CalculateDiscount(lineItem models.LineItem, variant uuid.UUID, variantPrice float64, ...) types.LineDiscount
- func (s *TotalsService) GetAllocationItemDiscounts(discount models.Discount, cart models.Cart) []types.LineDiscount
- func (s *TotalsService) GetAllocationMap(calculationContextData types.CalculationContextData, ...) (types.LineAllocationsMap, *utils.ApplictaionError)
- func (s *TotalsService) GetCalculationContext(calculationContextData types.CalculationContextData, ...) (*interfaces.TaxCalculationContext, *utils.ApplictaionError)
- func (s *TotalsService) GetDiscountTotal(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetGiftCardTotal(cart *models.Cart, order *models.Order, opts map[string]interface{}) (*Total, *utils.ApplictaionError)
- func (s *TotalsService) GetGiftCardableAmount(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetLineDiscounts(calculationContextData types.CalculationContextData, discount models.Discount) []types.LineDiscountAmount
- func (s *TotalsService) GetLineItemAdjustmentsTotal(cart *models.Cart, order *models.Order) float64
- func (s *TotalsService) GetLineItemDiscountAdjustment(lineItem models.LineItem, discount models.Discount) float64
- func (s *TotalsService) GetLineItemRefund(order *models.Order, lineItem models.LineItem) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetLineItemTotal(lineItem models.LineItem, cart *models.Cart, order *models.Order, ...) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetLineItemTotals(lineItem models.LineItem, cart *models.Cart, order *models.Order, ...) (*models.LineItem, *utils.ApplictaionError)
- func (s *TotalsService) GetPaidTotal(order *models.Order) float64
- func (s *TotalsService) GetRefundTotal(order *models.Order, lineItems []models.LineItem) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetRefundedTotal(order *models.Order) float64
- func (s *TotalsService) GetShippingMethodTotals(shippingMethod models.ShippingMethod, cart *models.Cart, order *models.Order, ...) (*ShippingMethodTotals, *utils.ApplictaionError)
- func (s *TotalsService) GetShippingTotal(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetSubtotal(cart *models.Cart, order *models.Order, opts types.SubtotalOptions) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetSwapTotal(order *models.Order) float64
- func (s *TotalsService) GetTaxTotal(cart *models.Cart, order *models.Order, forceTaxes bool) (float64, *utils.ApplictaionError)
- func (s *TotalsService) GetTotal(cart *models.Cart, order *models.Order, options GetTotalsOptions) (float64, *utils.ApplictaionError)
- func (s *TotalsService) Rounded(value float64) float64
- func (s *TotalsService) SetContext(context context.Context) *TotalsService
- type TotalsServiceProps
- type Transformer
- type UserService
- func (s *UserService) Create(data *types.CreateUserInput) (*models.User, *utils.ApplictaionError)
- func (s *UserService) Delete(userId uuid.UUID) *utils.ApplictaionError
- func (s *UserService) GenerateResetPasswordToken(userId uuid.UUID) (*string, *utils.ApplictaionError)
- func (s *UserService) HashPassword(password string) (string, error)
- func (s *UserService) List(selector *types.FilterableUser, config *sql.Options) ([]models.User, *utils.ApplictaionError)
- func (s *UserService) ListAndCount(selector *types.FilterableUser, config *sql.Options) ([]models.User, *int64, *utils.ApplictaionError)
- func (s *UserService) Retrieve(userId uuid.UUID, config *sql.Options) (*models.User, *utils.ApplictaionError)
- func (s *UserService) RetrieveByApiToken(apiToken string, relations []string) (*models.User, *utils.ApplictaionError)
- func (s *UserService) RetrieveByEmail(email string, config *sql.Options) (*models.User, *utils.ApplictaionError)
- func (s *UserService) SetContext(context context.Context) *UserService
- func (s *UserService) SetPassword(userId uuid.UUID, password string) (*models.User, *utils.ApplictaionError)
- func (s *UserService) Update(userId uuid.UUID, data *types.UpdateUserInput) (*models.User, *utils.ApplictaionError)
Constants ¶
const DEFAULT_VALID_DURATION = time.Hour * 24 * 7
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllocationMapOptions ¶
type AnalyticsConfigService ¶
type AnalyticsConfigService struct {
// contains filtered or unexported fields
}
func NewAnalyticsConfigService ¶
func NewAnalyticsConfigService( r Registry, ) *AnalyticsConfigService
func (*AnalyticsConfigService) Create ¶
func (s *AnalyticsConfigService) Create(userId uuid.UUID, data *types.CreateAnalyticsConfig) (*models.AnalyticsConfig, *utils.ApplictaionError)
func (*AnalyticsConfigService) Delete ¶
func (s *AnalyticsConfigService) Delete(userId uuid.UUID) *utils.ApplictaionError
func (*AnalyticsConfigService) Retrive ¶
func (s *AnalyticsConfigService) Retrive(userId uuid.UUID) (*models.AnalyticsConfig, *utils.ApplictaionError)
func (*AnalyticsConfigService) SetContext ¶
func (s *AnalyticsConfigService) SetContext(context context.Context) *AnalyticsConfigService
func (*AnalyticsConfigService) Update ¶
func (s *AnalyticsConfigService) Update(userId uuid.UUID, data *types.UpdateAnalyticsConfig) (*models.AnalyticsConfig, *utils.ApplictaionError)
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService( r Registry, ) *AuthService
func (*AuthService) Authenticate ¶
func (s *AuthService) Authenticate(email string, password string) types.AuthenticateResult
func (*AuthService) AuthenticateAPIToken ¶
func (s *AuthService) AuthenticateAPIToken(token string) types.AuthenticateResult
func (*AuthService) AuthenticateCustomer ¶
func (s *AuthService) AuthenticateCustomer(email string, password string) types.AuthenticateResult
func (*AuthService) ComparePassword ¶
func (s *AuthService) ComparePassword(password string, hash string) bool
func (*AuthService) SetContext ¶
func (s *AuthService) SetContext(context context.Context) *AuthService
type AvailabilityContext ¶
type AvailabilityContext struct {
// contains filtered or unexported fields
}
type BatchJobService ¶
type BatchJobService struct {
// contains filtered or unexported fields
}
func NewBatchJobService ¶
func NewBatchJobService(container di.Container, r Registry) *BatchJobService
func (*BatchJobService) Cancel ¶
func (s *BatchJobService) Cancel(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) Complete ¶
func (s *BatchJobService) Complete(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) Confirm ¶
func (s *BatchJobService) Confirm(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) Create ¶
func (s *BatchJobService) Create(data *types.BatchJobCreateProps) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) ListAndCount ¶
func (s *BatchJobService) ListAndCount(selector *types.FilterableBatchJob, config *sql.Options) ([]models.BatchJob, *int64, *utils.ApplictaionError)
func (*BatchJobService) PrepareBatchJobForProcessing ¶
func (s *BatchJobService) PrepareBatchJobForProcessing(data *types.CreateBatchJobInput) (*types.CreateBatchJobInput, *utils.ApplictaionError)
func (*BatchJobService) ResolveBatchJobByType ¶
func (s *BatchJobService) ResolveBatchJobByType(batchtype string) interfaces.IBatchJobStrategy
func (*BatchJobService) Retrive ¶
func (s *BatchJobService) Retrive(batchJobId uuid.UUID) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) SetContext ¶
func (s *BatchJobService) SetContext(context context.Context) *BatchJobService
func (*BatchJobService) SetFailed ¶
func (s *BatchJobService) SetFailed(batchJobId uuid.UUID, model *models.BatchJob, errorMessage types.BatchJobResultError) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) SetPreProcessingDone ¶
func (s *BatchJobService) SetPreProcessingDone(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) SetProcessing ¶
func (s *BatchJobService) SetProcessing(batchJobId uuid.UUID, model *models.BatchJob) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) Update ¶
func (s *BatchJobService) Update(batchJobId uuid.UUID, model *models.BatchJob, data *types.BatchJobUpdateProps) (*models.BatchJob, *utils.ApplictaionError)
func (*BatchJobService) UpdateStatus ¶
func (s *BatchJobService) UpdateStatus(batchJobId uuid.UUID, model *models.BatchJob, status models.BatchJobStatus) (*models.BatchJob, *utils.ApplictaionError)
type Bus ¶
type Bus interface { BusController BusSubscriber BusPublisher }
Bus englobes global (subscribe, publish, control) bus behavior
type BusController ¶
BusController defines bus control behavior (checking handler's presence, synchronization)
type BusPublisher ¶
type BusPublisher interface {
Publish(topic string, args ...interface{})
}
BusPublisher defines publishing-related bus behavior
type BusSubscriber ¶
type BusSubscriber interface { Subscribe(topic string, fn interface{}) error SubscribeAsync(topic string, fn interface{}, transactional bool) error SubscribeOnce(topic string, fn interface{}) error SubscribeOnceAsync(topic string, fn interface{}) error Unsubscribe(topic string, handler interface{}) error }
BusSubscriber defines subscription-related bus behavior
type CartService ¶
type CartService struct {
// contains filtered or unexported fields
}
func NewCartService ¶
func NewCartService( r Registry, ) *CartService
func (*CartService) AddLineItem ¶
func (s *CartService) AddLineItem( cartId uuid.UUID, lineItem models.LineItem, validateSalesChannels bool, ) *utils.ApplictaionError
func (*CartService) AddOrUpdateLineItems ¶
func (s *CartService) AddOrUpdateLineItems( cartId uuid.UUID, lineItems []models.LineItem, validateSalesChannels bool, ) *utils.ApplictaionError
func (*CartService) AddShippingMethod ¶
func (*CartService) ApplyDiscount ¶
func (s *CartService) ApplyDiscount(cart *models.Cart, discountCode string) *utils.ApplictaionError
func (*CartService) ApplyDiscounts ¶
func (s *CartService) ApplyDiscounts(cart *models.Cart, discountCodes []string) *utils.ApplictaionError
func (*CartService) AuthorizePayment ¶
func (s *CartService) AuthorizePayment(id uuid.UUID, cart *models.Cart, context map[string]interface{}) (*models.Cart, *utils.ApplictaionError)
func (*CartService) Create ¶
func (s *CartService) Create(data *types.CartCreateProps) (*models.Cart, *utils.ApplictaionError)
func (*CartService) CreateTaxLines ¶
func (s *CartService) CreateTaxLines(id uuid.UUID, cart *models.Cart) *utils.ApplictaionError
func (*CartService) DecorateTotals ¶
func (s *CartService) DecorateTotals(cart *models.Cart, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
func (*CartService) Delete ¶
func (s *CartService) Delete(id uuid.UUID) (*models.Cart, *utils.ApplictaionError)
func (*CartService) DeletePaymentSession ¶
func (s *CartService) DeletePaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
func (*CartService) DeleteTaxLines ¶
func (s *CartService) DeleteTaxLines(id uuid.UUID) *utils.ApplictaionError
func (*CartService) List ¶
func (s *CartService) List(selector types.FilterableCartProps, config *sql.Options) ([]models.Cart, *utils.ApplictaionError)
func (*CartService) RefreshPaymentSession ¶
func (s *CartService) RefreshPaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
func (*CartService) RemoveDiscount ¶
func (s *CartService) RemoveDiscount(cartId uuid.UUID, discountCode string) (*models.Cart, *utils.ApplictaionError)
func (*CartService) RemoveLineItem ¶
func (s *CartService) RemoveLineItem(id uuid.UUID, lineItemIds uuid.UUIDs) *utils.ApplictaionError
func (*CartService) Retrieve ¶
func (s *CartService) Retrieve(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
func (*CartService) RetrieveLegacy ¶
func (s *CartService) RetrieveLegacy(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
func (*CartService) RetrieveWithTotals ¶
func (s *CartService) RetrieveWithTotals(id uuid.UUID, config *sql.Options, totalsConfig TotalsConfig) (*models.Cart, *utils.ApplictaionError)
func (*CartService) SetContext ¶
func (s *CartService) SetContext(context context.Context) *CartService
func (*CartService) SetMetadata ¶
func (s *CartService) SetMetadata(id uuid.UUID, key string, value string) (*models.Cart, *utils.ApplictaionError)
func (*CartService) SetPaymentSession ¶
func (s *CartService) SetPaymentSession(id uuid.UUID, providerId uuid.UUID) *utils.ApplictaionError
func (*CartService) SetPaymentSessions ¶
func (s *CartService) SetPaymentSessions(id uuid.UUID, cart *models.Cart) *utils.ApplictaionError
func (*CartService) Update ¶
func (s *CartService) Update(id uuid.UUID, cart *models.Cart, data *types.CartUpdateProps) (*models.Cart, *utils.ApplictaionError)
func (*CartService) UpdateLineItem ¶
func (s *CartService) UpdateLineItem( cartId uuid.UUID, lineItemId uuid.UUID, update *types.LineItemUpdate, ) (*models.Cart, *utils.ApplictaionError)
func (*CartService) UpdatePaymentSession ¶
func (s *CartService) UpdatePaymentSession(cartId uuid.UUID, update map[string]interface{}) (*models.Cart, *utils.ApplictaionError)
func (*CartService) ValidateLineItem ¶
func (s *CartService) ValidateLineItem( salesChannelId uuid.UUID, lineItem types.LineItemValidateData, ) (bool, *utils.ApplictaionError)
type ClaimItemService ¶
type ClaimItemService struct {
// contains filtered or unexported fields
}
func NewClaimItemService ¶
func NewClaimItemService( r Registry, ) *ClaimItemService
func (*ClaimItemService) Create ¶
func (s *ClaimItemService) Create(data *types.CreateClaimItemInput) (*models.ClaimItem, *utils.ApplictaionError)
func (*ClaimItemService) List ¶
func (s *ClaimItemService) List(selector models.ClaimItem, config *sql.Options) ([]models.ClaimItem, *utils.ApplictaionError)
func (*ClaimItemService) Retrieve ¶
func (s *ClaimItemService) Retrieve(claimItemId uuid.UUID, config *sql.Options) (*models.ClaimItem, *utils.ApplictaionError)
func (*ClaimItemService) SetContext ¶
func (s *ClaimItemService) SetContext(context context.Context) *ClaimItemService
func (*ClaimItemService) Update ¶
func (s *ClaimItemService) Update(id uuid.UUID, data *types.UpdateClaimItemInput) (*models.ClaimItem, *utils.ApplictaionError)
type ClaimService ¶
type ClaimService struct {
// contains filtered or unexported fields
}
func NewClaimService ¶
func NewClaimService( r Registry, ) *ClaimService
func (*ClaimService) Cancel ¶
func (s *ClaimService) Cancel(id uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) CancelFulfillment ¶
func (s *ClaimService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) Create ¶
func (s *ClaimService) Create(data *types.CreateClaimInput) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) CreateFulfillment ¶
func (s *ClaimService) CreateFulfillment(id uuid.UUID, noNotification bool, locationId uuid.UUID, metadata map[string]interface{}) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) CreateShipment ¶
func (s *ClaimService) CreateShipment(id uuid.UUID, fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, noNotification bool, metadata map[string]interface{}) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) GetRefundTotalForClaimLinesOnOrder ¶
func (s *ClaimService) GetRefundTotalForClaimLinesOnOrder(order *models.Order, claimItems []types.CreateClaimItemInput) (*float64, *utils.ApplictaionError)
func (*ClaimService) List ¶
func (s *ClaimService) List(selector *models.ClaimOrder, config *sql.Options) ([]models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) ProcessRefund ¶
func (s *ClaimService) ProcessRefund(id uuid.UUID) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) Retrieve ¶
func (s *ClaimService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) SetContext ¶
func (s *ClaimService) SetContext(context context.Context) *ClaimService
func (*ClaimService) Update ¶
func (s *ClaimService) Update(id uuid.UUID, data *types.UpdateClaimInput) (*models.ClaimOrder, *utils.ApplictaionError)
func (*ClaimService) ValidateCreateClaimInput ¶
func (s *ClaimService) ValidateCreateClaimInput(data *types.CreateClaimInput) *utils.ApplictaionError
type CsvParserService ¶
func NewCsvParserService ¶
func NewCsvParserService(schema CsvSchema, delimiter string) *CsvParserService
func (*CsvParserService) Parse ¶
func (p *CsvParserService) Parse(readableStream io.Reader) ([]interface{}, error)
func (*CsvParserService) ParserFunc ¶
func (p *CsvParserService) ParserFunc(line []string) (interface{}, error)
type CurrencyService ¶
type CurrencyService struct {
// contains filtered or unexported fields
}
func NewCurrencyService ¶
func NewCurrencyService( r Registry, ) *CurrencyService
func (*CurrencyService) ListAndCount ¶
func (s *CurrencyService) ListAndCount(selector *types.FilterableCurrencyProps, config *sql.Options) ([]models.Currency, *int64, *utils.ApplictaionError)
func (*CurrencyService) RetrieveByCode ¶
func (s *CurrencyService) RetrieveByCode(code string) (*models.Currency, *utils.ApplictaionError)
func (*CurrencyService) SetContext ¶
func (s *CurrencyService) SetContext(context context.Context) *CurrencyService
func (*CurrencyService) Update ¶
func (s *CurrencyService) Update(code string, data *types.UpdateCurrencyInput) (*models.Currency, *utils.ApplictaionError)
type CustomShippingOptionService ¶
type CustomShippingOptionService struct {
// contains filtered or unexported fields
}
func NewCustomShippingOptionService ¶
func NewCustomShippingOptionService( r Registry, ) *CustomShippingOptionService
func (*CustomShippingOptionService) Create ¶
func (s *CustomShippingOptionService) Create(data []types.CreateCustomShippingOptionInput) ([]models.CustomShippingOption, *utils.ApplictaionError)
func (*CustomShippingOptionService) List ¶
func (s *CustomShippingOptionService) List(selector models.CustomShippingOption, config *sql.Options) ([]models.CustomShippingOption, *utils.ApplictaionError)
func (*CustomShippingOptionService) Retrieve ¶
func (s *CustomShippingOptionService) Retrieve(id uuid.UUID, config *sql.Options) (*models.CustomShippingOption, *utils.ApplictaionError)
func (*CustomShippingOptionService) SetContext ¶
func (s *CustomShippingOptionService) SetContext(context context.Context) *CustomShippingOptionService
type CustomerGroupService ¶
type CustomerGroupService struct {
// contains filtered or unexported fields
}
func NewCustomerGroupService ¶
func NewCustomerGroupService( r Registry, ) *CustomerGroupService
func (*CustomerGroupService) AddCustomers ¶
func (s *CustomerGroupService) AddCustomers(id uuid.UUID, customerIds uuid.UUIDs) (*models.CustomerGroup, *utils.ApplictaionError)
func (*CustomerGroupService) Create ¶
func (s *CustomerGroupService) Create(data *types.CreateCustomerGroup) (*models.CustomerGroup, *utils.ApplictaionError)
func (*CustomerGroupService) Delete ¶
func (s *CustomerGroupService) Delete(groupId uuid.UUID) *utils.ApplictaionError
func (*CustomerGroupService) List ¶
func (s *CustomerGroupService) List(selector *types.FilterableCustomerGroup, config *sql.Options) ([]models.CustomerGroup, *utils.ApplictaionError)
func (*CustomerGroupService) ListAndCount ¶
func (s *CustomerGroupService) ListAndCount(selector *types.FilterableCustomerGroup, config *sql.Options) ([]models.CustomerGroup, *int64, *utils.ApplictaionError)
func (*CustomerGroupService) RemoveCustomer ¶
func (s *CustomerGroupService) RemoveCustomer(id uuid.UUID, customerIds uuid.UUIDs) (*models.CustomerGroup, *utils.ApplictaionError)
func (*CustomerGroupService) Retrieve ¶
func (s *CustomerGroupService) Retrieve(customerGroupId uuid.UUID, config *sql.Options) (*models.CustomerGroup, *utils.ApplictaionError)
func (*CustomerGroupService) SetContext ¶
func (s *CustomerGroupService) SetContext(context context.Context) *CustomerGroupService
func (*CustomerGroupService) Update ¶
func (s *CustomerGroupService) Update(customerGroupId uuid.UUID, data *types.UpdateCustomerGroup) (*models.CustomerGroup, *utils.ApplictaionError)
type CustomerService ¶
type CustomerService struct {
// contains filtered or unexported fields
}
func NewCustomerService ¶
func NewCustomerService( r Registry, ) *CustomerService
func (*CustomerService) AddAddress ¶
func (*CustomerService) Count ¶
func (s *CustomerService) Count() (*int64, *utils.ApplictaionError)
func (*CustomerService) Create ¶
func (s *CustomerService) Create(data *types.CreateCustomerInput) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) Delete ¶
func (s *CustomerService) Delete(customerId uuid.UUID) *utils.ApplictaionError
func (*CustomerService) GenerateResetPasswordToken ¶
func (s *CustomerService) GenerateResetPasswordToken(customerId uuid.UUID) (*string, *utils.ApplictaionError)
func (*CustomerService) HashPassword ¶
func (s *CustomerService) HashPassword(password string) (string, error)
func (*CustomerService) List ¶
func (s *CustomerService) List(selector *types.FilterableCustomer, config *sql.Options) ([]models.Customer, *utils.ApplictaionError)
func (*CustomerService) ListAndCount ¶
func (s *CustomerService) ListAndCount(selector *types.FilterableCustomer, config *sql.Options) ([]models.Customer, *int64, *utils.ApplictaionError)
func (*CustomerService) ListByEmail ¶
func (s *CustomerService) ListByEmail(email string, config *sql.Options) ([]models.Customer, *utils.ApplictaionError)
func (*CustomerService) RemoveAddress ¶
func (s *CustomerService) RemoveAddress(customerId uuid.UUID, addressId uuid.UUID) (err *utils.ApplictaionError)
func (*CustomerService) Retrieve ¶
func (s *CustomerService) Retrieve(selector models.Customer, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) RetrieveByEmail ¶
func (s *CustomerService) RetrieveByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) RetrieveById ¶
func (s *CustomerService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) RetrieveByPhone ¶
func (s *CustomerService) RetrieveByPhone(phone string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) RetrieveRegisteredByEmail ¶
func (s *CustomerService) RetrieveRegisteredByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) RetrieveUnregisteredByEmail ¶
func (s *CustomerService) RetrieveUnregisteredByEmail(email string, config *sql.Options) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) SetContext ¶
func (s *CustomerService) SetContext(context context.Context) *CustomerService
func (*CustomerService) Update ¶
func (s *CustomerService) Update(userId uuid.UUID, data *types.UpdateCustomerInput) (*models.Customer, *utils.ApplictaionError)
func (*CustomerService) UpdateAddress ¶
func (*CustomerService) UpdateBillingAddress ¶
func (s *CustomerService) UpdateBillingAddress(model *models.Customer, id uuid.UUID, address *models.Address) *utils.ApplictaionError
type DefaultFileService ¶
type DefaultFileService struct {
// contains filtered or unexported fields
}
func NewDefaultFileService ¶
func NewDefaultFileService() *DefaultFileService
func (*DefaultFileService) Delete ¶
func (s *DefaultFileService) Delete(fileData map[string]interface{}) error
func (*DefaultFileService) GetDownloadStream ¶
func (s *DefaultFileService) GetDownloadStream(fileData interfaces.GetUploadedFileType) (io.Reader, error)
func (*DefaultFileService) GetPresignedDownloadUrl ¶
func (s *DefaultFileService) GetPresignedDownloadUrl(fileData interfaces.GetUploadedFileType) (string, error)
func (*DefaultFileService) GetUploadStreamDescriptor ¶
func (s *DefaultFileService) GetUploadStreamDescriptor(fileData interfaces.UploadStreamDescriptorType) (*interfaces.FileServiceGetUploadStreamResult, error)
func (*DefaultFileService) SetContext ¶
func (s *DefaultFileService) SetContext(context context.Context) *DefaultFileService
func (*DefaultFileService) Upload ¶
func (s *DefaultFileService) Upload(fileData io.Reader) (*interfaces.FileServiceUploadResult, error)
func (*DefaultFileService) UploadProtected ¶
func (s *DefaultFileService) UploadProtected(fileData io.Reader) (*interfaces.FileServiceUploadResult, error)
type DefaultSearchService ¶
type DefaultSearchService struct {
// contains filtered or unexported fields
}
func NewDefaultSearchService ¶
func NewDefaultSearchService( r Registry, ) *DefaultSearchService
func (*DefaultSearchService) AddDocuments ¶
func (s *DefaultSearchService) AddDocuments(indexName string, documents interface{}, types string)
func (*DefaultSearchService) CreateIndex ¶
func (s *DefaultSearchService) CreateIndex(indexName string, options interface{})
func (*DefaultSearchService) DeleteAllDocuments ¶
func (s *DefaultSearchService) DeleteAllDocuments(indexName string)
func (*DefaultSearchService) DeleteDocument ¶
func (s *DefaultSearchService) DeleteDocument(indexName string, document_id interface{})
func (*DefaultSearchService) GetIndex ¶
func (s *DefaultSearchService) GetIndex(indexName string)
func (*DefaultSearchService) ReplaceDocuments ¶
func (s *DefaultSearchService) ReplaceDocuments(indexName string, documents interface{}, types string)
func (*DefaultSearchService) Search ¶
func (s *DefaultSearchService) Search(indexName string, query interface{}, options map[string]interface{}) map[string]interface{}
func (*DefaultSearchService) SetContext ¶
func (s *DefaultSearchService) SetContext(context context.Context) *DefaultSearchService
func (*DefaultSearchService) UpdateSettings ¶
func (s *DefaultSearchService) UpdateSettings(indexName string, settings interface{})
type DiscountConditionService ¶
type DiscountConditionService struct {
// contains filtered or unexported fields
}
func NewDiscountConditionService ¶
func NewDiscountConditionService( r Registry, ) *DiscountConditionService
func (*DiscountConditionService) Delete ¶
func (s *DiscountConditionService) Delete(conditionId uuid.UUID) *utils.ApplictaionError
func (*DiscountConditionService) RemoveResources ¶
func (s *DiscountConditionService) RemoveResources(data *types.DiscountConditionInput) *utils.ApplictaionError
func (*DiscountConditionService) ResolveConditionType ¶
func (s *DiscountConditionService) ResolveConditionType(data *types.DiscountConditionInput) (*models.DiscountCondition, *utils.ApplictaionError)
func (*DiscountConditionService) Retrieve ¶
func (s *DiscountConditionService) Retrieve(conditionId uuid.UUID, config *sql.Options) (*models.DiscountCondition, *utils.ApplictaionError)
func (*DiscountConditionService) SetContext ¶
func (s *DiscountConditionService) SetContext(context context.Context) *DiscountConditionService
func (*DiscountConditionService) UpsertCondition ¶
func (s *DiscountConditionService) UpsertCondition(data *types.DiscountConditionInput, overrideExisting bool) ([]models.DiscountCondition, *utils.ApplictaionError)
type DiscountService ¶
type DiscountService struct {
// contains filtered or unexported fields
}
func NewDiscountService ¶
func NewDiscountService( r Registry, ) *DiscountService
func (*DiscountService) AddRegion ¶
func (s *DiscountService) AddRegion(discountId uuid.UUID, regionId uuid.UUID) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) CalculateDiscountForLineItem ¶
func (s *DiscountService) CalculateDiscountForLineItem(discountId uuid.UUID, lineItem *models.LineItem, calculationContextData types.CalculationContextData) (float64, *utils.ApplictaionError)
func (*DiscountService) Create ¶
func (s *DiscountService) Create(data *types.CreateDiscountInput) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) CreateDynamicCode ¶
func (s *DiscountService) CreateDynamicCode(discountId uuid.UUID, data *types.CreateDynamicDiscountInput) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) Delete ¶
func (s *DiscountService) Delete(discountId uuid.UUID) *utils.ApplictaionError
func (*DiscountService) DeleteDynamicCode ¶
func (s *DiscountService) DeleteDynamicCode(discountId uuid.UUID, code string) *utils.ApplictaionError
func (*DiscountService) List ¶
func (s *DiscountService) List(selector types.FilterableDiscount, config *sql.Options) ([]models.Discount, *utils.ApplictaionError)
func (*DiscountService) ListAndCount ¶
func (s *DiscountService) ListAndCount(selector *types.FilterableDiscount, config *sql.Options) ([]models.Discount, *int64, *utils.ApplictaionError)
func (*DiscountService) ListByCodes ¶
func (s *DiscountService) ListByCodes(discountCodes []string, config sql.Query) ([]models.Discount, *utils.ApplictaionError)
func (*DiscountService) RemoveRegion ¶
func (s *DiscountService) RemoveRegion(discountId uuid.UUID, regionId uuid.UUID) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) Retrieve ¶
func (s *DiscountService) Retrieve(discountId uuid.UUID, config *sql.Options) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) RetrieveByCode ¶
func (s *DiscountService) RetrieveByCode(discountCode string, config *sql.Options) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) SetContext ¶
func (s *DiscountService) SetContext(context context.Context) *DiscountService
func (*DiscountService) Update ¶
func (s *DiscountService) Update(discountId uuid.UUID, data *types.UpdateDiscountInput) (*models.Discount, *utils.ApplictaionError)
func (*DiscountService) ValidateDiscountForProduct ¶
func (s *DiscountService) ValidateDiscountForProduct(discountRuleId uuid.UUID, productId uuid.UUID) (bool, *utils.ApplictaionError)
func (*DiscountService) ValidateDiscountRule ¶
func (s *DiscountService) ValidateDiscountRule(discountRule *types.CreateDiscountRuleInput) (*types.CreateDiscountRuleInput, *utils.ApplictaionError)
type DraftOrderService ¶
type DraftOrderService struct {
// contains filtered or unexported fields
}
func NewDraftOrderService ¶
func NewDraftOrderService( r Registry, ) *DraftOrderService
func (*DraftOrderService) Create ¶
func (s *DraftOrderService) Create(data *types.DraftOrderCreate) (*models.DraftOrder, *utils.ApplictaionError)
func (*DraftOrderService) Delete ¶
func (s *DraftOrderService) Delete(draftOrderId uuid.UUID) *utils.ApplictaionError
func (*DraftOrderService) List ¶
func (s *DraftOrderService) List(selector *models.DraftOrder, config *sql.Options) ([]models.DraftOrder, *utils.ApplictaionError)
func (*DraftOrderService) ListAndCount ¶
func (s *DraftOrderService) ListAndCount(selector *types.FilterableDraftOrder, config *sql.Options) ([]models.DraftOrder, *int64, *utils.ApplictaionError)
func (*DraftOrderService) RegisterCartCompletion ¶
func (s *DraftOrderService) RegisterCartCompletion(id uuid.UUID, orderId uuid.UUID) (*models.DraftOrder, *utils.ApplictaionError)
func (*DraftOrderService) Retrieve ¶
func (s *DraftOrderService) Retrieve(draftOrderId uuid.UUID, config *sql.Options) (*models.DraftOrder, *utils.ApplictaionError)
func (*DraftOrderService) RetrieveByCartId ¶
func (s *DraftOrderService) RetrieveByCartId(cartId uuid.UUID, config *sql.Options) (*models.DraftOrder, *utils.ApplictaionError)
func (*DraftOrderService) SetContext ¶
func (s *DraftOrderService) SetContext(context context.Context) *DraftOrderService
func (*DraftOrderService) Update ¶
func (s *DraftOrderService) Update(id uuid.UUID, data *models.DraftOrder) (*models.DraftOrder, *utils.ApplictaionError)
type EventBus ¶
type EventBus struct {
// contains filtered or unexported fields
}
EventBus - box for handlers and callbacks.
func (*EventBus) HasCallback ¶
HasCallback returns true if exists any callback subscribed to the topic.
func (*EventBus) Publish ¶
Publish executes callback defined for a topic. Any additional argument will be transferred to the callback.
func (*EventBus) Subscribe ¶
Subscribe subscribes to a topic. Returns error if `fn` is not a function.
func (*EventBus) SubscribeAsync ¶
SubscribeAsync subscribes to a topic with an asynchronous callback Transactional determines whether subsequent callbacks for a topic are run serially (true) or concurrently (false) Returns error if `fn` is not a function.
func (*EventBus) SubscribeOnce ¶
SubscribeOnce subscribes to a topic once. Handler will be removed after executing. Returns error if `fn` is not a function.
func (*EventBus) SubscribeOnceAsync ¶
SubscribeOnceAsync subscribes to a topic once with an asynchronous callback Handler will be removed after executing. Returns error if `fn` is not a function.
func (*EventBus) Unsubscribe ¶
Unsubscribe removes callback defined for a topic. Returns error if there are no callbacks subscribed to the topic.
type FlagRouter ¶
type FlagRouter struct {
// contains filtered or unexported fields
}
func NewFlagRouter ¶
func NewFlagRouter(r Registry) *FlagRouter
func (*FlagRouter) IsFeatureEnabled ¶
func (m *FlagRouter) IsFeatureEnabled(flag []string) bool
func (*FlagRouter) SetFlag ¶
func (m *FlagRouter) SetFlag(flag string, value bool)
type FulfillmentProviderService ¶
type FulfillmentProviderService struct {
// contains filtered or unexported fields
}
func NewFulfillmentProviderService ¶
func NewFulfillmentProviderService( container di.Container, r Registry, ) *FulfillmentProviderService
func (*FulfillmentProviderService) CalculatePrice ¶
func (s *FulfillmentProviderService) CalculatePrice(option *models.ShippingOption, data map[string]interface{}, cart *models.Cart) (float64, *utils.ApplictaionError)
func (*FulfillmentProviderService) CanCalculate ¶
func (s *FulfillmentProviderService) CanCalculate(option types.FulfillmentOptions) (bool, *utils.ApplictaionError)
func (*FulfillmentProviderService) CancelFulfillment ¶
func (s *FulfillmentProviderService) CancelFulfillment(fulfillment *models.Fulfillment) (*models.Fulfillment, *utils.ApplictaionError)
func (*FulfillmentProviderService) CreateFulfillment ¶
func (s *FulfillmentProviderService) CreateFulfillment(method *models.ShippingMethod, items []models.LineItem, order *types.CreateFulfillmentOrder, fulfillment *models.Fulfillment) (core.JSONB, *utils.ApplictaionError)
func (*FulfillmentProviderService) CreateReturn ¶
func (s *FulfillmentProviderService) CreateReturn(returnOrder *models.Return) (core.JSONB, *utils.ApplictaionError)
func (*FulfillmentProviderService) List ¶
func (s *FulfillmentProviderService) List() ([]models.FulfillmentProvider, *utils.ApplictaionError)
func (*FulfillmentProviderService) ListFulfillmentOptions ¶
func (s *FulfillmentProviderService) ListFulfillmentOptions(providerIDs uuid.UUIDs) ([]types.FulfillmentOptions, *utils.ApplictaionError)
func (*FulfillmentProviderService) RegisterInstalledProviders ¶
func (s *FulfillmentProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
func (*FulfillmentProviderService) RetrieveDocuments ¶
func (s *FulfillmentProviderService) RetrieveDocuments(providerId uuid.UUID, fulfillmentData map[string]interface{}, documentType string) (map[string]interface{}, *utils.ApplictaionError)
func (*FulfillmentProviderService) RetrieveProvider ¶
func (s *FulfillmentProviderService) RetrieveProvider(providerID uuid.UUID) interfaces.IFulfillmentService
func (*FulfillmentProviderService) SetContext ¶
func (s *FulfillmentProviderService) SetContext(context context.Context) *FulfillmentProviderService
func (*FulfillmentProviderService) ValidateFulfillmentData ¶
func (s *FulfillmentProviderService) ValidateFulfillmentData(option *models.ShippingOption, data map[string]interface{}, cart *models.Cart) (map[string]interface{}, *utils.ApplictaionError)
func (*FulfillmentProviderService) ValidateOption ¶
func (s *FulfillmentProviderService) ValidateOption(option models.ShippingOption) (bool, *utils.ApplictaionError)
type FulfillmentService ¶
type FulfillmentService struct {
// contains filtered or unexported fields
}
func NewFulfillmentService ¶
func NewFulfillmentService( r Registry, ) *FulfillmentService
func (*FulfillmentService) CancelFulfillment ¶
func (s *FulfillmentService) CancelFulfillment(fulfillmentId uuid.UUID, fulfillment *models.Fulfillment) (*models.Fulfillment, *utils.ApplictaionError)
func (*FulfillmentService) CreateFulfillment ¶
func (s *FulfillmentService) CreateFulfillment(order *types.CreateFulfillmentOrder, itemsToFulfill []types.FulFillmentItemType, custom models.Fulfillment) ([]models.Fulfillment, *utils.ApplictaionError)
func (*FulfillmentService) CreateShipment ¶
func (s *FulfillmentService) CreateShipment(fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, config *types.CreateShipmentConfig) (*models.Fulfillment, *utils.ApplictaionError)
func (*FulfillmentService) GetFulfillmentItems ¶
func (s *FulfillmentService) GetFulfillmentItems(order *types.CreateFulfillmentOrder, items []types.FulFillmentItemType) ([]models.LineItem, *utils.ApplictaionError)
func (*FulfillmentService) PartitionItems ¶
func (s *FulfillmentService) PartitionItems(shippingMethods []models.ShippingMethod, items []models.LineItem) []types.FulfillmentItemPartition
func (*FulfillmentService) Retrieve ¶
func (s *FulfillmentService) Retrieve(fulfillmentId uuid.UUID, config *sql.Options) (*models.Fulfillment, *utils.ApplictaionError)
func (*FulfillmentService) SetContext ¶
func (s *FulfillmentService) SetContext(context context.Context) *FulfillmentService
func (*FulfillmentService) ValidateFulfillmentLineItem ¶
func (s *FulfillmentService) ValidateFulfillmentLineItem(item *models.LineItem, quantity int) (*models.LineItem, *utils.ApplictaionError)
type GenerateLineItemContext ¶
type GenerateLineItemContext struct { types.GenerateLineItemContext VariantPricing *types.ProductVariantPricing }
type GetLineItemTotalOptions ¶
type GetShippingMethodTotalsOptions ¶
type GetShippingMethodTotalsOptions struct { IncludeTax bool UseTaxLines bool CalculationContext interfaces.TaxCalculationContext }
type GetTotalsOptions ¶
type GiftCardService ¶
type GiftCardService struct {
// contains filtered or unexported fields
}
func NewGiftCardService ¶
func NewGiftCardService( r Registry, ) *GiftCardService
func (*GiftCardService) Create ¶
func (s *GiftCardService) Create(data *types.CreateGiftCardInput) (*models.GiftCard, *utils.ApplictaionError)
func (*GiftCardService) CreateTransaction ¶
func (s *GiftCardService) CreateTransaction(data *types.CreateGiftCardTransactionInput) (uuid.UUID, *utils.ApplictaionError)
func (*GiftCardService) Delete ¶
func (s *GiftCardService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*GiftCardService) GenerateCode ¶
func (s *GiftCardService) GenerateCode() string
func (*GiftCardService) List ¶
func (s *GiftCardService) List(selector *types.FilterableGiftCard, config *sql.Options) ([]models.GiftCard, *utils.ApplictaionError)
func (*GiftCardService) ListAndCount ¶
func (s *GiftCardService) ListAndCount(selector *types.FilterableGiftCard, config *sql.Options) ([]models.GiftCard, *int64, *utils.ApplictaionError)
func (*GiftCardService) ResolveTaxRate ¶
func (s *GiftCardService) ResolveTaxRate(giftCardTaxRate float64, region *models.Region) float64
func (*GiftCardService) Retrieve ¶
func (s *GiftCardService) Retrieve(selector *models.GiftCard, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
func (*GiftCardService) RetrieveByCode ¶
func (s *GiftCardService) RetrieveByCode(code string, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
func (*GiftCardService) RetrieveById ¶
func (s *GiftCardService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.GiftCard, *utils.ApplictaionError)
func (*GiftCardService) SetContext ¶
func (s *GiftCardService) SetContext(context context.Context) *GiftCardService
func (*GiftCardService) Update ¶
func (s *GiftCardService) Update(id uuid.UUID, data *types.UpdateGiftCardInput) (*models.GiftCard, *utils.ApplictaionError)
type IdempotencyKeyService ¶
type IdempotencyKeyService struct {
// contains filtered or unexported fields
}
func NewIdempotencyKeyService ¶
func NewIdempotencyKeyService( r Registry, ) *IdempotencyKeyService
func (*IdempotencyKeyService) Create ¶
func (s *IdempotencyKeyService) Create(payload *types.CreateIdempotencyKeyInput) (*models.IdempotencyKey, *utils.ApplictaionError)
func (*IdempotencyKeyService) InitializeRequest ¶
func (s *IdempotencyKeyService) InitializeRequest(headerKey string, reqMethod string, reqParams core.JSONB, reqPath string) (*models.IdempotencyKey, *utils.ApplictaionError)
func (*IdempotencyKeyService) Lock ¶
func (s *IdempotencyKeyService) Lock(idempotencyKey string) (*models.IdempotencyKey, *utils.ApplictaionError)
func (*IdempotencyKeyService) Retrieve ¶
func (s *IdempotencyKeyService) Retrieve(idempotencyKey string) (*models.IdempotencyKey, *utils.ApplictaionError)
func (*IdempotencyKeyService) SetContext ¶
func (s *IdempotencyKeyService) SetContext(context context.Context) *IdempotencyKeyService
func (*IdempotencyKeyService) Update ¶
func (s *IdempotencyKeyService) Update(idempotencyKey string, data *models.IdempotencyKey) (*models.IdempotencyKey, *utils.ApplictaionError)
func (*IdempotencyKeyService) WorkStage ¶
func (s *IdempotencyKeyService) WorkStage(idempotencyKey string, callback func() (*types.IdempotencyCallbackResult, *utils.ApplictaionError)) (*models.IdempotencyKey, *utils.ApplictaionError)
type InviteService ¶
type InviteService struct {
// contains filtered or unexported fields
}
func NewInviteService ¶
func NewInviteService( r Registry, ) *InviteService
func (*InviteService) Accept ¶
func (s *InviteService) Accept(token string, user *types.AcceptCustomer) (*models.User, *utils.ApplictaionError)
func (*InviteService) Create ¶
func (s *InviteService) Create(data *types.CreateInviteInput, validDuration time.Duration) *utils.ApplictaionError
func (*InviteService) Delete ¶
func (s *InviteService) Delete(inviteId uuid.UUID) *utils.ApplictaionError
func (*InviteService) List ¶
func (s *InviteService) List(selector *types.FilterableInvite, config *sql.Options) ([]models.Invite, *utils.ApplictaionError)
func (*InviteService) Resend ¶
func (s *InviteService) Resend(id uuid.UUID) *utils.ApplictaionError
func (*InviteService) SetContext ¶
func (s *InviteService) SetContext(context context.Context) *InviteService
type LineItemAdjustmentService ¶
type LineItemAdjustmentService struct {
// contains filtered or unexported fields
}
func NewLineItemAdjustmentService ¶
func NewLineItemAdjustmentService( r Registry, ) *LineItemAdjustmentService
func (*LineItemAdjustmentService) Create ¶
func (s *LineItemAdjustmentService) Create(data *models.LineItemAdjustment) (*models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) CreateAdjustmentForLineItem ¶
func (s *LineItemAdjustmentService) CreateAdjustmentForLineItem(cart *models.Cart, lineItem *models.LineItem) ([]models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) CreateAdjustments ¶
func (s *LineItemAdjustmentService) CreateAdjustments(cart *models.Cart, lineItem *models.LineItem) ([]models.LineItemAdjustment, [][]models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) Delete ¶
func (s *LineItemAdjustmentService) Delete(id uuid.UUID, selector *models.LineItemAdjustment, config *sql.Options) *utils.ApplictaionError
func (*LineItemAdjustmentService) DeleteSlice ¶
func (s *LineItemAdjustmentService) DeleteSlice(ids uuid.UUIDs, selector []models.LineItemAdjustment) *utils.ApplictaionError
func (*LineItemAdjustmentService) GenerateAdjustments ¶
func (s *LineItemAdjustmentService) GenerateAdjustments(calculationContextData types.CalculationContextData, generatedLineItem *models.LineItem, context *models.ProductVariant) ([]models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) List ¶
func (s *LineItemAdjustmentService) List(selector types.FilterableLineItemAdjustmentProps, config *sql.Options) ([]models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) Retrieve ¶
func (s *LineItemAdjustmentService) Retrieve(id uuid.UUID, config *sql.Options) (*models.LineItemAdjustment, *utils.ApplictaionError)
func (*LineItemAdjustmentService) SetContext ¶
func (s *LineItemAdjustmentService) SetContext(context context.Context) *LineItemAdjustmentService
func (*LineItemAdjustmentService) Update ¶
func (s *LineItemAdjustmentService) Update(id uuid.UUID, Update *models.LineItemAdjustment) (*models.LineItemAdjustment, *utils.ApplictaionError)
type LineItemService ¶
type LineItemService struct {
// contains filtered or unexported fields
}
func NewLineItemService ¶
func NewLineItemService( r Registry, ) *LineItemService
func (*LineItemService) CloneTo ¶
func (s *LineItemService) CloneTo(ids uuid.UUIDs, data *models.LineItem, options map[string]interface{}) ([]models.LineItem, *utils.ApplictaionError)
func (*LineItemService) Create ¶
func (s *LineItemService) Create(data []models.LineItem) ([]models.LineItem, *utils.ApplictaionError)
func (*LineItemService) CreateReturnLines ¶
func (s *LineItemService) CreateReturnLines(returnId uuid.UUID, cartId uuid.UUID) (*models.LineItem, *utils.ApplictaionError)
func (*LineItemService) CreateTaxLine ¶
func (s *LineItemService) CreateTaxLine(data *models.LineItemTaxLine) (*models.LineItemTaxLine, *utils.ApplictaionError)
func (*LineItemService) Delete ¶
func (s *LineItemService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*LineItemService) DeleteWithTaxLines ¶
func (s *LineItemService) DeleteWithTaxLines(id uuid.UUID) *utils.ApplictaionError
func (*LineItemService) Generate ¶
func (s *LineItemService) Generate( variantId uuid.UUID, variant []types.GenerateInputData, regionId uuid.UUID, quantity int, context types.GenerateLineItemContext, ) ([]models.LineItem, *utils.ApplictaionError)
func (*LineItemService) List ¶
func (s *LineItemService) List(selector models.LineItem, config *sql.Options) ([]models.LineItem, *utils.ApplictaionError)
func (*LineItemService) Retrieve ¶
func (s *LineItemService) Retrieve(lineItemId uuid.UUID, config *sql.Options) (*models.LineItem, *utils.ApplictaionError)
func (*LineItemService) SetContext ¶
func (s *LineItemService) SetContext(context context.Context) *LineItemService
type LineItemTotalsOptions ¶
type LineItemTotalsOptions struct { IncludeTax bool UseTaxLines bool ExcludeGiftCards bool CalculationContext *interfaces.TaxCalculationContext }
type NewTotalsService ¶
type NewTotalsService struct {
// contains filtered or unexported fields
}
func NewNewTotalsServices ¶
func NewNewTotalsServices( r Registry, ) *NewTotalsService
func (*NewTotalsService) GetGiftCardTotals ¶
func (s *NewTotalsService) GetGiftCardTotals(giftCardableAmount float64, giftCardTransactions []models.GiftCardTransaction, region *models.Region, giftCards []models.GiftCard) (*Total, *utils.ApplictaionError)
func (*NewTotalsService) GetGiftCardTransactionsTotals ¶
func (s *NewTotalsService) GetGiftCardTransactionsTotals(giftCardTransactions []models.GiftCardTransaction, region *models.Region) *Total
func (*NewTotalsService) GetGiftCardableAmount ¶
func (s *NewTotalsService) GetGiftCardableAmount(giftCardsTaxable bool, subtotal, shippingTotal, discountTotal, taxTotal float64) float64
func (*NewTotalsService) GetLineItemRefund ¶
func (s *NewTotalsService) GetLineItemRefund(lineItem models.LineItem, calculationContext *interfaces.TaxCalculationContext, taxRate *float64) (float64, *utils.ApplictaionError)
func (*NewTotalsService) GetLineItemTotals ¶
func (s *NewTotalsService) GetLineItemTotals(items []models.LineItem, includeTax bool, calculationContext *interfaces.TaxCalculationContext, taxRate *float64) (map[uuid.UUID]models.LineItem, *utils.ApplictaionError)
func (*NewTotalsService) GetShippingMethodTotals ¶
func (s *NewTotalsService) GetShippingMethodTotals(shippingMethods []models.ShippingMethod, includeTax bool, discounts []models.Discount, taxRate *float64, calculationContext *interfaces.TaxCalculationContext) (map[uuid.UUID]models.ShippingMethod, *utils.ApplictaionError)
func (*NewTotalsService) SetContext ¶
func (s *NewTotalsService) SetContext(context context.Context) *NewTotalsService
type NoteService ¶
type NoteService struct {
// contains filtered or unexported fields
}
func NewNoteService ¶
func NewNoteService( r Registry, ) *NoteService
func (*NoteService) Create ¶
func (s *NoteService) Create(data *types.CreateNoteInput, config map[string]interface{}) (*models.Note, *utils.ApplictaionError)
func (*NoteService) Delete ¶
func (s *NoteService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*NoteService) List ¶
func (s *NoteService) List(selector *types.FilterableNote, config *sql.Options) ([]models.Note, *utils.ApplictaionError)
func (*NoteService) ListAndCount ¶
func (s *NoteService) ListAndCount(selector *types.FilterableNote, config *sql.Options) ([]models.Note, *int64, *utils.ApplictaionError)
func (*NoteService) Retrieve ¶
func (s *NoteService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Note, *utils.ApplictaionError)
func (*NoteService) SetContext ¶
func (s *NoteService) SetContext(context context.Context) *NoteService
func (*NoteService) Update ¶
func (s *NoteService) Update(id uuid.UUID, data *types.UpdateNoteInput) (*models.Note, *utils.ApplictaionError)
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
func NewNotificationService ¶
func (*NotificationService) HandleEvent ¶
func (s *NotificationService) HandleEvent(eventName string, data map[string]interface{}) *utils.ApplictaionError
func (*NotificationService) List ¶
func (s *NotificationService) List(selector *types.FilterableNotification, config *sql.Options) ([]models.Notification, *utils.ApplictaionError)
func (*NotificationService) ListAndCount ¶
func (s *NotificationService) ListAndCount(selector *types.FilterableNotification, config *sql.Options) ([]models.Notification, *int64, *utils.ApplictaionError)
func (*NotificationService) RegisterAttachmentGenerator ¶
func (s *NotificationService) RegisterAttachmentGenerator(service interface{})
func (*NotificationService) RegisterInstalledProviders ¶
func (s *NotificationService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
func (*NotificationService) Resend ¶
func (s *NotificationService) Resend(id uuid.UUID, config *sql.Options) (*models.Notification, *utils.ApplictaionError)
func (*NotificationService) Retrieve ¶
func (s *NotificationService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Notification, *utils.ApplictaionError)
func (*NotificationService) RetrieveProvider ¶
func (s *NotificationService) RetrieveProvider(id uuid.UUID) (interfaces.INotificationService, *utils.ApplictaionError)
func (*NotificationService) Send ¶
func (s *NotificationService) Send(event string, eventData map[string]interface{}, providerId uuid.UUID) (*models.Notification, *utils.ApplictaionError)
func (*NotificationService) SetContext ¶
func (s *NotificationService) SetContext(context context.Context) *NotificationService
func (*NotificationService) Subscribe ¶
func (s *NotificationService) Subscribe(eventName string, providerId uuid.UUID) *utils.ApplictaionError
type OAuthService ¶
type OAuthService struct {
// contains filtered or unexported fields
}
func NewOAuthService ¶
func NewOAuthService( container di.Container, r Registry, ) *OAuthService
func (*OAuthService) Create ¶
func (s *OAuthService) Create(data *types.CreateOauthInput) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) GenerateToken ¶
func (s *OAuthService) GenerateToken(appName string, code string, state string) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) List ¶
func (s *OAuthService) List(selector *models.OAuth, config *sql.Options) ([]models.OAuth, *utils.ApplictaionError)
func (*OAuthService) RefreshToken ¶
func (s *OAuthService) RefreshToken(appName string) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) RegisterOauthApp ¶
func (s *OAuthService) RegisterOauthApp(appDetails *types.CreateOauthInput) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) Retrieve ¶
func (s *OAuthService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) RetrieveByName ¶
func (s *OAuthService) RetrieveByName(appName string, config *sql.Options) (*models.OAuth, *utils.ApplictaionError)
func (*OAuthService) SetContext ¶
func (s *OAuthService) SetContext(context context.Context) *OAuthService
func (*OAuthService) Update ¶
func (s *OAuthService) Update(id uuid.UUID, data *types.UpdateOauthInput) (*models.OAuth, *utils.ApplictaionError)
type OrderEditService ¶
type OrderEditService struct {
// contains filtered or unexported fields
}
func NewOrderEditService ¶
func NewOrderEditService( r Registry, ) *OrderEditService
func (*OrderEditService) AddLineItem ¶
func (s *OrderEditService) AddLineItem(id uuid.UUID, data *types.AddOrderEditLineItemInput) *utils.ApplictaionError
func (*OrderEditService) Cancel ¶
func (s *OrderEditService) Cancel(id uuid.UUID, canceledBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) Confirm ¶
func (s *OrderEditService) Confirm(id uuid.UUID, confirmedBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) Create ¶
func (s *OrderEditService) Create(data *types.CreateOrderEditInput, createdBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) Decline ¶
func (s *OrderEditService) Decline(id uuid.UUID, declinedBy uuid.UUID, declinedReason string) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) DecorateTotals ¶
func (s *OrderEditService) DecorateTotals(orderEdit *models.OrderEdit) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) Delete ¶
func (s *OrderEditService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*OrderEditService) DeleteClonedItems ¶
func (s *OrderEditService) DeleteClonedItems(id uuid.UUID) *utils.ApplictaionError
func (*OrderEditService) DeleteItemChange ¶
func (s *OrderEditService) DeleteItemChange(id uuid.UUID, itemChangeId uuid.UUID) *utils.ApplictaionError
func (*OrderEditService) List ¶
func (s *OrderEditService) List(selector *types.FilterableOrderEdit, config *sql.Options) ([]models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) ListAndCount ¶
func (s *OrderEditService) ListAndCount(selector *types.FilterableOrderEdit, config *sql.Options) ([]models.OrderEdit, *int64, *utils.ApplictaionError)
func (*OrderEditService) RefreshAdjustments ¶
func (s *OrderEditService) RefreshAdjustments(id uuid.UUID, preserveCustomAdjustments bool) *utils.ApplictaionError
func (*OrderEditService) RemoveLineItem ¶
func (s *OrderEditService) RemoveLineItem(id uuid.UUID, lineItemId uuid.UUID) *utils.ApplictaionError
func (*OrderEditService) RequestConfirmation ¶
func (s *OrderEditService) RequestConfirmation(id uuid.UUID, requestedBy uuid.UUID) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) Retrieve ¶
func (s *OrderEditService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) RetrieveActive ¶
func (s *OrderEditService) RetrieveActive(orderId uuid.UUID, config *sql.Options) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) SetContext ¶
func (s *OrderEditService) SetContext(context context.Context) *OrderEditService
func (*OrderEditService) Update ¶
func (s *OrderEditService) Update(id uuid.UUID, data *models.OrderEdit) (*models.OrderEdit, *utils.ApplictaionError)
func (*OrderEditService) UpdateLineItem ¶
func (s *OrderEditService) UpdateLineItem(id uuid.UUID, itemId uuid.UUID, quantity int) *utils.ApplictaionError
type OrderItemChangeService ¶
type OrderItemChangeService struct {
// contains filtered or unexported fields
}
func NewOrderItemChangeService ¶
func NewOrderItemChangeService( r Registry, ) *OrderItemChangeService
func (*OrderItemChangeService) Create ¶
func (s *OrderItemChangeService) Create(data *types.CreateOrderEditItemChangeInput) (*models.OrderItemChange, *utils.ApplictaionError)
func (*OrderItemChangeService) Delete ¶
func (s *OrderItemChangeService) Delete(itemChangeIds uuid.UUIDs) *utils.ApplictaionError
func (*OrderItemChangeService) List ¶
func (s *OrderItemChangeService) List(selector models.OrderItemChange, config *sql.Options) ([]models.OrderItemChange, *utils.ApplictaionError)
func (*OrderItemChangeService) Retrieve ¶
func (s *OrderItemChangeService) Retrieve(id uuid.UUID, config *sql.Options) (*models.OrderItemChange, *utils.ApplictaionError)
func (*OrderItemChangeService) SetContext ¶
func (s *OrderItemChangeService) SetContext(context context.Context) *OrderItemChangeService
type OrderService ¶
type OrderService struct {
// contains filtered or unexported fields
}
func NewOrderService ¶
func NewOrderService( r Registry, ) *OrderService
func (*OrderService) AddShippingMethod ¶
func (s *OrderService) AddShippingMethod( orderId uuid.UUID, optionId uuid.UUID, data map[string]interface{}, config *types.CreateShippingMethodDto, ) (*models.Order, *utils.ApplictaionError)
func (*OrderService) Archive ¶
func (s *OrderService) Archive(id uuid.UUID) (*models.Order, *utils.ApplictaionError)
func (*OrderService) Cancel ¶
func (s *OrderService) Cancel(orderId uuid.UUID) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CancelFulfillment ¶
func (s *OrderService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CapturePayment ¶
func (s *OrderService) CapturePayment(orderId uuid.UUID) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CompleteOrder ¶
func (s *OrderService) CompleteOrder(id uuid.UUID) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CreateFromCart ¶
func (s *OrderService) CreateFromCart(id uuid.UUID, data *models.Cart) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CreateFulfillment ¶
func (s *OrderService) CreateFulfillment(id uuid.UUID, itemsToFulfill []types.FulFillmentItemType, config map[string]interface{}) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CreateRefund ¶
func (s *OrderService) CreateRefund(id uuid.UUID, refundAmount float64, reason models.RefundReason, note *string, noNotification *bool) (*models.Order, *utils.ApplictaionError)
func (*OrderService) CreateShipment ¶
func (s *OrderService) CreateShipment( orderId uuid.UUID, fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, config struct { NoNotification bool Metadata map[string]interface{} }, ) (*models.Order, *utils.ApplictaionError)
func (*OrderService) GetFulfillmentItems ¶
func (s *OrderService) GetFulfillmentItems(order models.Order, items []types.FulFillmentItemType, transformer func(item models.LineItem, quantity int) interface{}) ([]models.LineItem, *utils.ApplictaionError)
func (*OrderService) GetTotalsRelations ¶
func (s *OrderService) GetTotalsRelations(config *sql.Options) []string
func (*OrderService) List ¶
func (s *OrderService) List(selector *types.FilterableOrder, config *sql.Options) ([]models.Order, *utils.ApplictaionError)
func (*OrderService) ListAndCount ¶
func (s *OrderService) ListAndCount(selector *types.FilterableOrder, config *sql.Options) ([]models.Order, *int64, *utils.ApplictaionError)
func (*OrderService) RegisterReturnReceived ¶
func (s *OrderService) RegisterReturnReceived(id uuid.UUID, receivedReturn *models.Return, customRefundAmount *float64) (*models.Order, *utils.ApplictaionError)
func (*OrderService) Retrieve ¶
func (s *OrderService) Retrieve(selector models.Order, config *sql.Options) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveByCartId ¶
func (s *OrderService) RetrieveByCartId(cartId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveByCartIdWithTotals ¶
func (s *OrderService) RetrieveByCartIdWithTotals(cartId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveByExternalId ¶
func (s *OrderService) RetrieveByExternalId(externalId uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveById ¶
func (s *OrderService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveByIdWithTotals ¶
func (s *OrderService) RetrieveByIdWithTotals(id uuid.UUID, config *sql.Options, context types.TotalsContext) (*models.Order, *utils.ApplictaionError)
func (*OrderService) RetrieveLegacy ¶
func (*OrderService) RetrieveWithTotals ¶
func (s *OrderService) RetrieveWithTotals(selector models.Order, config *sql.Options, context types.TotalsContext) (*models.Order, *utils.ApplictaionError)
func (*OrderService) SetContext ¶
func (s *OrderService) SetContext(context context.Context) *OrderService
func (*OrderService) Update ¶
func (s *OrderService) Update(orderId uuid.UUID, update *types.UpdateOrderInput) (*models.Order, *utils.ApplictaionError)
func (*OrderService) UpdateBillingAddress ¶
func (s *OrderService) UpdateBillingAddress( order *models.Order, address *models.Address, ) *utils.ApplictaionError
func (*OrderService) UpdateShippingAddress ¶
func (s *OrderService) UpdateShippingAddress( order *models.Order, address *models.Address, ) *utils.ApplictaionError
func (*OrderService) ValidateFulfillmentLineItem ¶
type PaymentCollectionService ¶
type PaymentCollectionService struct {
// contains filtered or unexported fields
}
func NewPaymentCollectionService ¶
func NewPaymentCollectionService( r Registry, ) *PaymentCollectionService
func (*PaymentCollectionService) AuthorizePaymentSessions ¶
func (s *PaymentCollectionService) AuthorizePaymentSessions(id uuid.UUID, sessionIds uuid.UUIDs, context map[string]interface{}) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) Create ¶
func (s *PaymentCollectionService) Create(data *types.CreatePaymentCollectionInput) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) Delete ¶
func (s *PaymentCollectionService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*PaymentCollectionService) IsValidTotalAmount ¶
func (s *PaymentCollectionService) IsValidTotalAmount(total float64, sessionsInput []types.PaymentCollectionsSessionsBatchInput) bool
func (*PaymentCollectionService) MarkAsAuthorized ¶
func (s *PaymentCollectionService) MarkAsAuthorized(id uuid.UUID) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) RefreshPaymentSession ¶
func (s *PaymentCollectionService) RefreshPaymentSession(id uuid.UUID, sessionId uuid.UUID, customerId uuid.UUID) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentCollectionService) Retrieve ¶
func (s *PaymentCollectionService) Retrieve(id uuid.UUID, config *sql.Options) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) SetContext ¶
func (s *PaymentCollectionService) SetContext(context context.Context) *PaymentCollectionService
func (*PaymentCollectionService) SetPaymentSession ¶
func (s *PaymentCollectionService) SetPaymentSession(id uuid.UUID, sessionInput *types.SessionsInput, customerId uuid.UUID) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) SetPaymentSessionsBatch ¶
func (s *PaymentCollectionService) SetPaymentSessionsBatch(id uuid.UUID, paymentCollection *models.PaymentCollection, sessionsInput []types.PaymentCollectionsSessionsBatchInput, customerId uuid.UUID) (*models.PaymentCollection, *utils.ApplictaionError)
func (*PaymentCollectionService) Update ¶
func (s *PaymentCollectionService) Update(id uuid.UUID, Update *models.PaymentCollection) (*models.PaymentCollection, *utils.ApplictaionError)
type PaymentProviderService ¶
type PaymentProviderService struct {
// contains filtered or unexported fields
}
func NewPaymentProviderService ¶
func NewPaymentProviderService( container di.Container, r Registry, ) *PaymentProviderService
func (*PaymentProviderService) AuthorizePayment ¶
func (s *PaymentProviderService) AuthorizePayment(paymentSession *models.PaymentSession, context map[string]interface{}) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) CancelPayment ¶
func (s *PaymentProviderService) CancelPayment(data *models.Payment) (*models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) CapturePayment ¶
func (s *PaymentProviderService) CapturePayment(data *models.Payment) (*models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) CreatePayment ¶
func (s *PaymentProviderService) CreatePayment(data *types.CreatePaymentInput) (*models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) CreateSession ¶
func (s *PaymentProviderService) CreateSession(providerId uuid.UUID, session *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) DeleteSession ¶
func (s *PaymentProviderService) DeleteSession(paymentSession *models.PaymentSession) *utils.ApplictaionError
func (*PaymentProviderService) GetStatus ¶
func (s *PaymentProviderService) GetStatus(payment *models.Payment) (*models.PaymentSessionStatus, *utils.ApplictaionError)
func (*PaymentProviderService) List ¶
func (s *PaymentProviderService) List() ([]models.PaymentProvider, *utils.ApplictaionError)
func (*PaymentProviderService) ListPayments ¶
func (s *PaymentProviderService) ListPayments(selector models.Payment, config *sql.Options) ([]models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) RefreshSession ¶
func (s *PaymentProviderService) RefreshSession(paymentSession *models.PaymentSession, sessionInput *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) RefundFromPayment ¶
func (s *PaymentProviderService) RefundFromPayment(payment *models.Payment, amount float64, reason models.RefundReason, note *string) (*models.Refund, *utils.ApplictaionError)
func (*PaymentProviderService) RefundPayments ¶
func (s *PaymentProviderService) RefundPayments(data []models.Payment, amount float64, reason models.RefundReason, note *string) (*models.Refund, *utils.ApplictaionError)
func (*PaymentProviderService) RegisterInstalledProviders ¶
func (s *PaymentProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
func (*PaymentProviderService) RetrievePayment ¶
func (s *PaymentProviderService) RetrievePayment(id uuid.UUID, relations []string) (*models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) RetrieveProvider ¶
func (s *PaymentProviderService) RetrieveProvider(providerId uuid.UUID) (interfaces.IPaymentProcessor, *utils.ApplictaionError)
func (*PaymentProviderService) RetrieveRefund ¶
func (s *PaymentProviderService) RetrieveRefund(id uuid.UUID, config *sql.Options) (*models.Refund, *utils.ApplictaionError)
func (*PaymentProviderService) RetrieveSession ¶
func (s *PaymentProviderService) RetrieveSession(id uuid.UUID, relations []string) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) SaveSession ¶
func (s *PaymentProviderService) SaveSession(id uuid.UUID, providerId uuid.UUID, data *models.PaymentSession) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) SetContext ¶
func (s *PaymentProviderService) SetContext(context context.Context) *PaymentProviderService
func (*PaymentProviderService) UpdatePayment ¶
func (s *PaymentProviderService) UpdatePayment(id uuid.UUID, data *types.UpdatePaymentInput) (*models.Payment, *utils.ApplictaionError)
func (*PaymentProviderService) UpdateSession ¶
func (s *PaymentProviderService) UpdateSession(paymentSession *models.PaymentSession, sessionInput *types.PaymentSessionInput) (*models.PaymentSession, *utils.ApplictaionError)
func (*PaymentProviderService) UpdateSessionData ¶
func (s *PaymentProviderService) UpdateSessionData(paymentSession *models.PaymentSession, data map[string]interface{}) (*models.PaymentSession, *utils.ApplictaionError)
type PaymentService ¶
type PaymentService struct {
// contains filtered or unexported fields
}
func NewPaymentService ¶
func NewPaymentService( r Registry, ) *PaymentService
func (*PaymentService) Capture ¶
func (s *PaymentService) Capture(id uuid.UUID, payment *models.Payment) (*models.Payment, *utils.ApplictaionError)
func (*PaymentService) Create ¶
func (s *PaymentService) Create(data *types.CreatePaymentInput) (*models.Payment, *utils.ApplictaionError)
func (*PaymentService) List ¶
func (s *PaymentService) List(selector models.Payment, config *sql.Options) ([]models.Payment, *utils.ApplictaionError)
func (*PaymentService) Refund ¶
func (s *PaymentService) Refund(id uuid.UUID, payment *models.Payment, amount float64, reason models.RefundReason, note *string) (*models.Refund, *utils.ApplictaionError)
func (*PaymentService) Retrieve ¶
func (s *PaymentService) Retrieve(id uuid.UUID, config *sql.Options) (*models.Payment, *utils.ApplictaionError)
func (*PaymentService) SetContext ¶
func (s *PaymentService) SetContext(context context.Context) *PaymentService
func (*PaymentService) Update ¶
func (s *PaymentService) Update(id uuid.UUID, data *types.UpdatePaymentInput) (*models.Payment, *utils.ApplictaionError)
type PriceListService ¶
type PriceListService struct {
// contains filtered or unexported fields
}
func NewPriceListService ¶
func NewPriceListService( r Registry, ) *PriceListService
func (*PriceListService) AddCurrencyFromRegion ¶
func (s *PriceListService) AddCurrencyFromRegion(prices []types.PriceListPriceCreateInput) ([]models.MoneyAmount, *utils.ApplictaionError)
func (*PriceListService) AddPrices ¶
func (s *PriceListService) AddPrices(id uuid.UUID, prices []types.PriceListPriceCreateInput, replace bool) (*models.PriceList, *utils.ApplictaionError)
func (*PriceListService) ClearPrices ¶
func (s *PriceListService) ClearPrices(id uuid.UUID) *utils.ApplictaionError
func (*PriceListService) Create ¶
func (s *PriceListService) Create(data *types.CreatePriceListInput) (*models.PriceList, *utils.ApplictaionError)
func (*PriceListService) Delete ¶
func (s *PriceListService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*PriceListService) DeletePrices ¶
func (s *PriceListService) DeletePrices(id uuid.UUID, priceIds uuid.UUIDs) *utils.ApplictaionError
func (*PriceListService) DeleteProductPrices ¶
func (s *PriceListService) DeleteProductPrices(id uuid.UUID, productIds uuid.UUIDs) (uuid.UUIDs, *int, *utils.ApplictaionError)
func (*PriceListService) DeleteVariantPrices ¶
func (s *PriceListService) DeleteVariantPrices(id uuid.UUID, variantIds uuid.UUIDs) (uuid.UUIDs, *int, *utils.ApplictaionError)
func (*PriceListService) List ¶
func (s *PriceListService) List(selector *types.FilterablePriceList, config *sql.Options) ([]models.PriceList, *utils.ApplictaionError)
func (*PriceListService) ListAndCount ¶
func (s *PriceListService) ListAndCount(selector *types.FilterablePriceList, config *sql.Options) ([]models.PriceList, *int64, *utils.ApplictaionError)
func (*PriceListService) ListPriceListsVariantIdsMap ¶
func (s *PriceListService) ListPriceListsVariantIdsMap(priceListIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)
func (*PriceListService) ListProducts ¶
func (s *PriceListService) ListProducts(id uuid.UUID, selector *types.FilterableProduct, config *sql.Options, requiresPriceList bool) ([]models.Product, *int64, *utils.ApplictaionError)
func (*PriceListService) ListVariants ¶
func (s *PriceListService) ListVariants(id uuid.UUID, selector *types.FilterableProductVariant, config *sql.Options, requiresPriceList bool) ([]models.ProductVariant, *int64, *utils.ApplictaionError)
func (*PriceListService) Retrieve ¶
func (s *PriceListService) Retrieve(id uuid.UUID, config *sql.Options) (*models.PriceList, *utils.ApplictaionError)
func (*PriceListService) SetContext ¶
func (s *PriceListService) SetContext(context context.Context) *PriceListService
func (*PriceListService) Update ¶
func (s *PriceListService) Update(id uuid.UUID, data *types.UpdatePriceListInput) (*models.PriceList, *utils.ApplictaionError)
func (*PriceListService) UpsertCustomerGroups ¶
func (s *PriceListService) UpsertCustomerGroups(id uuid.UUID, customerGroups []types.CustomerGroups) *utils.ApplictaionError
type PricingService ¶
type PricingService struct {
// contains filtered or unexported fields
}
func NewPricingService ¶
func NewPricingService( r Registry, ) *PricingService
func (*PricingService) GetProductPricing ¶
func (s *PricingService) GetProductPricing(product *models.Product, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
func (*PricingService) GetProductPricingById ¶
func (s *PricingService) GetProductPricingById(productId uuid.UUID, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
func (*PricingService) GetProductVariantPricingById ¶
func (s *PricingService) GetProductVariantPricingById(variantId uuid.UUID, context *interfaces.PricingContext) (*types.ProductVariantPricing, *utils.ApplictaionError)
func (*PricingService) GetProductVariantsPricing ¶
func (s *PricingService) GetProductVariantsPricing(data []interfaces.Pricing, context *interfaces.PricingContext) (map[uuid.UUID]types.ProductVariantPricing, *utils.ApplictaionError)
func (*PricingService) GetShippingOptionPricing ¶
func (s *PricingService) GetShippingOptionPricing(shippingOption *models.ShippingOption, context *interfaces.PricingContext) (*types.PricedShippingOption, *utils.ApplictaionError)
func (*PricingService) SetAdminProductPricing ¶
func (s *PricingService) SetAdminProductPricing(products []models.Product) ([]models.Product, *utils.ApplictaionError)
func (*PricingService) SetAdminVariantPricing ¶
func (s *PricingService) SetAdminVariantPricing(variants []models.ProductVariant, context *interfaces.PricingContext) ([]models.ProductVariant, *utils.ApplictaionError)
func (*PricingService) SetContext ¶
func (s *PricingService) SetContext(context context.Context) *PricingService
func (*PricingService) SetProductPrices ¶
func (s *PricingService) SetProductPrices(products []models.Product, context *interfaces.PricingContext) ([]models.Product, *utils.ApplictaionError)
func (*PricingService) SetShippingOptionPrices ¶
func (s *PricingService) SetShippingOptionPrices(shippingOptions []models.ShippingOption, context *interfaces.PricingContext) ([]types.PricedShippingOption, *utils.ApplictaionError)
func (*PricingService) SetVariantPrices ¶
func (s *PricingService) SetVariantPrices(variants []models.ProductVariant, context *interfaces.PricingContext) ([]models.ProductVariant, *utils.ApplictaionError)
type ProductCategoryService ¶
type ProductCategoryService struct {
// contains filtered or unexported fields
}
func NewProductCategoryService ¶
func NewProductCategoryService( r Registry, ) *ProductCategoryService
func (*ProductCategoryService) AddProducts ¶
func (s *ProductCategoryService) AddProducts(productCategoryId uuid.UUID, productIDs uuid.UUIDs) *utils.ApplictaionError
func (*ProductCategoryService) Create ¶
func (s *ProductCategoryService) Create(data *types.CreateProductCategoryInput) (*models.ProductCategory, *utils.ApplictaionError)
func (*ProductCategoryService) Delete ¶
func (s *ProductCategoryService) Delete(productCategoryId uuid.UUID) *utils.ApplictaionError
func (*ProductCategoryService) List ¶
func (s *ProductCategoryService) List(selector *types.FilterableProductCategory, config *sql.Options) ([]models.ProductCategory, *utils.ApplictaionError)
func (*ProductCategoryService) ListAndCount ¶
func (s *ProductCategoryService) ListAndCount(selector *types.FilterableProductCategory, config *sql.Options) ([]models.ProductCategory, *int64, *utils.ApplictaionError)
func (*ProductCategoryService) RemoveProducts ¶
func (s *ProductCategoryService) RemoveProducts(productCategoryId uuid.UUID, productIDs uuid.UUIDs) *utils.ApplictaionError
func (*ProductCategoryService) Retrieve ¶
func (s *ProductCategoryService) Retrieve(selector models.ProductCategory, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
func (*ProductCategoryService) RetrieveByHandle ¶
func (s *ProductCategoryService) RetrieveByHandle(handle string, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
func (*ProductCategoryService) RetrieveById ¶
func (s *ProductCategoryService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.ProductCategory, *utils.ApplictaionError)
func (*ProductCategoryService) SetContext ¶
func (s *ProductCategoryService) SetContext(context context.Context) *ProductCategoryService
func (*ProductCategoryService) Update ¶
func (s *ProductCategoryService) Update(productCategoryId uuid.UUID, data *types.UpdateProductCategoryInput) (*models.ProductCategory, *utils.ApplictaionError)
type ProductCollectionService ¶
type ProductCollectionService struct {
// contains filtered or unexported fields
}
func NewProductCollectionService ¶
func NewProductCollectionService( r Registry, ) *ProductCollectionService
func (*ProductCollectionService) AddProducts ¶
func (s *ProductCollectionService) AddProducts(collectionId uuid.UUID, productIds uuid.UUIDs) (*models.ProductCollection, *utils.ApplictaionError)
func (*ProductCollectionService) Create ¶
func (s *ProductCollectionService) Create(data *types.CreateProductCollection) (*models.ProductCollection, *utils.ApplictaionError)
func (*ProductCollectionService) Delete ¶
func (s *ProductCollectionService) Delete(collectionId uuid.UUID) *utils.ApplictaionError
func (*ProductCollectionService) List ¶
func (s *ProductCollectionService) List(selector *types.FilterableCollection, config *sql.Options) ([]models.ProductCollection, *utils.ApplictaionError)
func (*ProductCollectionService) ListAndCount ¶
func (s *ProductCollectionService) ListAndCount(selector *types.FilterableCollection, config *sql.Options) ([]models.ProductCollection, *int64, *utils.ApplictaionError)
func (*ProductCollectionService) RemoveProducts ¶
func (s *ProductCollectionService) RemoveProducts(collectionId uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError
func (*ProductCollectionService) Retrieve ¶
func (s *ProductCollectionService) Retrieve(collectionId uuid.UUID, config *sql.Options) (*models.ProductCollection, *utils.ApplictaionError)
func (*ProductCollectionService) RetrieveByHandle ¶
func (s *ProductCollectionService) RetrieveByHandle(collectionHandle string, config *sql.Options) (*models.ProductCollection, *utils.ApplictaionError)
func (*ProductCollectionService) SetContext ¶
func (s *ProductCollectionService) SetContext(context context.Context) *ProductCollectionService
func (*ProductCollectionService) Update ¶
func (s *ProductCollectionService) Update(collectionId uuid.UUID, data *types.UpdateProductCollection) (*models.ProductCollection, *utils.ApplictaionError)
type ProductService ¶
type ProductService struct {
// contains filtered or unexported fields
}
func NewProductService ¶
func NewProductService( r Registry, ) *ProductService
func (*ProductService) AddOption ¶
func (s *ProductService) AddOption(id uuid.UUID, optionTitle string) (*models.Product, *utils.ApplictaionError)
func (*ProductService) Count ¶
func (s *ProductService) Count(selector models.Product) (*int64, *utils.ApplictaionError)
func (*ProductService) Create ¶
func (s *ProductService) Create(data *types.CreateProductInput) (*models.Product, *utils.ApplictaionError)
func (*ProductService) DecorateProductsWithSalesChannels ¶
func (s *ProductService) DecorateProductsWithSalesChannels(products []models.Product) ([]models.Product, *utils.ApplictaionError)
func (*ProductService) Delete ¶
func (s *ProductService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*ProductService) DeleteOption ¶
func (s *ProductService) DeleteOption(id uuid.UUID, optionId uuid.UUID) (*models.Product, *utils.ApplictaionError)
func (*ProductService) FilterProductsBySalesChannel ¶
func (*ProductService) IsProductInSalesChannels ¶
func (s *ProductService) IsProductInSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) (bool, *utils.ApplictaionError)
func (*ProductService) List ¶
func (s *ProductService) List(selector *types.FilterableProduct, config *sql.Options) ([]models.Product, *utils.ApplictaionError)
func (*ProductService) ListAndCount ¶
func (s *ProductService) ListAndCount(selector *types.FilterableProduct, config *sql.Options) ([]models.Product, *int64, *utils.ApplictaionError)
func (*ProductService) ListTagsByUsage ¶
func (s *ProductService) ListTagsByUsage(take int) ([]models.ProductTag, *utils.ApplictaionError)
func (*ProductService) ListTypes ¶
func (s *ProductService) ListTypes() ([]models.ProductType, *utils.ApplictaionError)
func (*ProductService) ReorderVariants ¶
func (s *ProductService) ReorderVariants(id uuid.UUID, variantOrder uuid.UUIDs) (*models.Product, *utils.ApplictaionError)
func (*ProductService) Retrieve ¶
func (s *ProductService) Retrieve(selector models.Product, config *sql.Options) (*models.Product, *utils.ApplictaionError)
func (*ProductService) RetrieveByExternalId ¶
func (s *ProductService) RetrieveByExternalId(externalId string, config *sql.Options) (*models.Product, *utils.ApplictaionError)
func (*ProductService) RetrieveByHandle ¶
func (s *ProductService) RetrieveByHandle(productHandle string, config *sql.Options) (*models.Product, *utils.ApplictaionError)
func (*ProductService) RetrieveById ¶
func (s *ProductService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.Product, *utils.ApplictaionError)
func (*ProductService) RetrieveOptionByTitle ¶
func (s *ProductService) RetrieveOptionByTitle(title string, id uuid.UUID) (*models.ProductOption, *utils.ApplictaionError)
func (*ProductService) RetrieveVariants ¶
func (s *ProductService) RetrieveVariants(id uuid.UUID, config *sql.Options) ([]models.ProductVariant, *utils.ApplictaionError)
func (*ProductService) SetContext ¶
func (s *ProductService) SetContext(context context.Context) *ProductService
func (*ProductService) Update ¶
func (s *ProductService) Update(id uuid.UUID, data *types.UpdateProductInput) (*models.Product, *utils.ApplictaionError)
func (*ProductService) UpdateOption ¶
func (s *ProductService) UpdateOption(id uuid.UUID, optionId uuid.UUID, data *types.ProductOptionInput) (*models.Product, *utils.ApplictaionError)
func (*ProductService) UpdateShippingProfile ¶
func (s *ProductService) UpdateShippingProfile(productIds uuid.UUIDs, profileId uuid.UUID) ([]models.Product, *utils.ApplictaionError)
type ProductTagService ¶
type ProductTagService struct {
// contains filtered or unexported fields
}
func NewProductTagService ¶
func NewProductTagService( r Registry, ) *ProductTagService
func (*ProductTagService) Create ¶
func (s *ProductTagService) Create(tag *models.ProductTag) (*models.ProductTag, *utils.ApplictaionError)
func (*ProductTagService) List ¶
func (s *ProductTagService) List(selector *types.FilterableProductTag, config *sql.Options) ([]models.ProductTag, *utils.ApplictaionError)
func (*ProductTagService) ListAndCount ¶
func (s *ProductTagService) ListAndCount(selector *types.FilterableProductTag, config *sql.Options) ([]models.ProductTag, *int64, *utils.ApplictaionError)
func (*ProductTagService) Retrieve ¶
func (s *ProductTagService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductTag, *utils.ApplictaionError)
func (*ProductTagService) SetContext ¶
func (s *ProductTagService) SetContext(context context.Context) *ProductTagService
type ProductTaxRateService ¶
type ProductTaxRateService struct {
// contains filtered or unexported fields
}
func NewProductTaxRateService ¶
func NewProductTaxRateService( r Registry, ) *ProductTaxRateService
func (*ProductTaxRateService) List ¶
func (s *ProductTaxRateService) List(selector types.FilterableProductTaxRate, config *sql.Options) ([]models.ProductTaxRate, *utils.ApplictaionError)
func (*ProductTaxRateService) SetContext ¶
func (s *ProductTaxRateService) SetContext(context context.Context) *ProductTaxRateService
type ProductTypeService ¶
type ProductTypeService struct {
// contains filtered or unexported fields
}
func NewProductTypeService ¶
func NewProductTypeService( r Registry, ) *ProductTypeService
func (*ProductTypeService) List ¶
func (s *ProductTypeService) List(selector *types.FilterableProductType, config *sql.Options) ([]models.ProductType, *utils.ApplictaionError)
func (*ProductTypeService) ListAndCount ¶
func (s *ProductTypeService) ListAndCount(selector *types.FilterableProductType, config *sql.Options) ([]models.ProductType, *int64, *utils.ApplictaionError)
func (*ProductTypeService) Retrieve ¶
func (s *ProductTypeService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductType, *utils.ApplictaionError)
func (*ProductTypeService) SetContext ¶
func (s *ProductTypeService) SetContext(context context.Context) *ProductTypeService
type ProductVariantInventoryService ¶
type ProductVariantInventoryService struct {
// contains filtered or unexported fields
}
func NewProductVariantInventoryService ¶
func NewProductVariantInventoryService( r Registry, ) *ProductVariantInventoryService
func (*ProductVariantInventoryService) AdjustInventory ¶
func (s *ProductVariantInventoryService) AdjustInventory(variantId uuid.UUID, locationId uuid.UUID, quantity int) *utils.ApplictaionError
func (*ProductVariantInventoryService) AdjustReservationsQuantityByLineItem ¶
func (s *ProductVariantInventoryService) AdjustReservationsQuantityByLineItem(lineItemId uuid.UUID, variantId uuid.UUID, locationId uuid.UUID, quantity int) *utils.ApplictaionError
func (*ProductVariantInventoryService) AttachInventoryItem ¶
func (s *ProductVariantInventoryService) AttachInventoryItem(data []models.ProductVariantInventoryItem) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ConfirmInventory ¶
func (s *ProductVariantInventoryService) ConfirmInventory(variantId uuid.UUID, quantity int, context map[string]interface{}) (bool, *utils.ApplictaionError)
func (*ProductVariantInventoryService) DeleteReservationsByLineItem ¶
func (s *ProductVariantInventoryService) DeleteReservationsByLineItem(lineItemId uuid.UUID, variantId uuid.UUID, quantity int) *utils.ApplictaionError
func (*ProductVariantInventoryService) DetachInventoryItem ¶
func (s *ProductVariantInventoryService) DetachInventoryItem(inventoryItemId uuid.UUID, variantId uuid.UUID) *utils.ApplictaionError
func (*ProductVariantInventoryService) GetAvailabilityContext ¶
func (s *ProductVariantInventoryService) GetAvailabilityContext(variants []models.ProductVariant, salesChannelId uuid.UUIDs, existingContext *AvailabilityContext) (*AvailabilityContext, *utils.ApplictaionError)
func (*ProductVariantInventoryService) GetVariantQuantityFromVariantInventoryItems ¶
func (s *ProductVariantInventoryService) GetVariantQuantityFromVariantInventoryItems(variantInventoryItems []models.ProductVariantInventoryItem, channelId uuid.UUID) (*int, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ListByItem ¶
func (s *ProductVariantInventoryService) ListByItem(itemIds uuid.UUIDs) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ListByVariant ¶
func (s *ProductVariantInventoryService) ListByVariant(variantIds uuid.UUIDs) ([]models.ProductVariantInventoryItem, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ListInventoryItemsByVariant ¶
func (s *ProductVariantInventoryService) ListInventoryItemsByVariant(variantId uuid.UUID) ([]interfaces.InventoryItemDTO, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ListVariantsByItem ¶
func (s *ProductVariantInventoryService) ListVariantsByItem(itemId uuid.UUID) ([]models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ReserveQuantity ¶
func (s *ProductVariantInventoryService) ReserveQuantity(variantId uuid.UUID, quantity int, context ReserveQuantityContext) ([]interfaces.ReservationItemDTO, *utils.ApplictaionError)
func (*ProductVariantInventoryService) Retrieve ¶
func (s *ProductVariantInventoryService) Retrieve(inventoryItemId uuid.UUID, variantId uuid.UUID) (*models.ProductVariantInventoryItem, *utils.ApplictaionError)
func (*ProductVariantInventoryService) SetContext ¶
func (s *ProductVariantInventoryService) SetContext(context context.Context) *ProductVariantInventoryService
func (*ProductVariantInventoryService) SetProductAvailability ¶
func (s *ProductVariantInventoryService) SetProductAvailability(products []models.Product, salesChannelId uuid.UUIDs) ([]models.Product, *utils.ApplictaionError)
func (*ProductVariantInventoryService) SetVariantAvailability ¶
func (s *ProductVariantInventoryService) SetVariantAvailability(variants []models.ProductVariant, salesChannelId uuid.UUIDs, availabilityContext *AvailabilityContext) ([]models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantInventoryService) ValidateInventoryAtLocation ¶
func (s *ProductVariantInventoryService) ValidateInventoryAtLocation(items []models.LineItem, locationId uuid.UUID) *utils.ApplictaionError
type ProductVariantService ¶
type ProductVariantService struct {
// contains filtered or unexported fields
}
func NewProductVariantService ¶
func NewProductVariantService( r Registry, ) *ProductVariantService
func (*ProductVariantService) AddOptionValue ¶
func (s *ProductVariantService) AddOptionValue(id uuid.UUID, optionId uuid.UUID, optionValue string) (*models.ProductOptionValue, *utils.ApplictaionError)
addOptionValue adds option value to a variant
func (*ProductVariantService) Create ¶
func (s *ProductVariantService) Create(productId uuid.UUID, product *models.Product, variants []types.CreateProductVariantInput) ([]models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantService) Delete ¶
func (s *ProductVariantService) Delete(variantIds uuid.UUIDs) *utils.ApplictaionError
Delete deletes the variant
func (*ProductVariantService) DeleteOptionValue ¶
func (s *ProductVariantService) DeleteOptionValue(id uuid.UUID, optionId uuid.UUID) *utils.ApplictaionError
deleteOptionValue deletes option value from given variant
func (*ProductVariantService) GetRegionPrice ¶
func (s *ProductVariantService) GetRegionPrice(id uuid.UUID, data *types.GetRegionPriceContext) (*float64, *utils.ApplictaionError)
getRegionPrice gets the price specific to a region
func (*ProductVariantService) IsVariantInSalesChannels ¶
func (s *ProductVariantService) IsVariantInSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) (bool, *utils.ApplictaionError)
IsVariantInSalesChannels checks if the variant is assigned to at least one of the provided sales channels
func (*ProductVariantService) List ¶
func (s *ProductVariantService) List(selector *types.FilterableProductVariant, config *sql.Options) ([]models.ProductVariant, *utils.ApplictaionError)
list lists the variants
func (*ProductVariantService) ListAndCount ¶
func (s *ProductVariantService) ListAndCount(selector *types.FilterableProductVariant, config *sql.Options) ([]models.ProductVariant, *int64, *utils.ApplictaionError)
ListAndCount lists and counts the variants
func (*ProductVariantService) Retrieve ¶
func (s *ProductVariantService) Retrieve(id uuid.UUID, config *sql.Options) (*models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantService) RetrieveBySKU ¶
func (s *ProductVariantService) RetrieveBySKU(sku string, config *sql.Options) (*models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantService) SetContext ¶
func (s *ProductVariantService) SetContext(context context.Context) *ProductVariantService
func (*ProductVariantService) SetCurrencyPrice ¶
func (s *ProductVariantService) SetCurrencyPrice(id uuid.UUID, data types.ProductVariantPrice) (*models.MoneyAmount, *utils.ApplictaionError)
setCurrencyPrice sets the default price for the given currency
func (*ProductVariantService) SetRegionPrice ¶
func (s *ProductVariantService) SetRegionPrice(id uuid.UUID, price types.ProductVariantPrice) (*models.MoneyAmount, *utils.ApplictaionError)
setRegionPrice sets the default price of a specific region
func (*ProductVariantService) Update ¶
func (s *ProductVariantService) Update(id uuid.UUID, variant *models.ProductVariant, data *types.UpdateProductVariantInput) (*models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantService) UpdateBatch ¶
func (s *ProductVariantService) UpdateBatch(data []types.UpdateProductVariantData) ([]models.ProductVariant, *utils.ApplictaionError)
func (*ProductVariantService) UpdateOptionValue ¶
func (s *ProductVariantService) UpdateOptionValue(id uuid.UUID, optionId uuid.UUID, optionValue string) (*models.ProductOptionValue, *utils.ApplictaionError)
updateOptionValue updates variant's option value
func (*ProductVariantService) UpdateVariantPrices ¶
func (s *ProductVariantService) UpdateVariantPrices(data []types.UpdateVariantPricesData) *utils.ApplictaionError
func (*ProductVariantService) UpsertCurrencyPrices ¶
func (s *ProductVariantService) UpsertCurrencyPrices(data []types.UpdateVariantCurrencyPriceData) *utils.ApplictaionError
func (*ProductVariantService) UpsertRegionPrices ¶
func (s *ProductVariantService) UpsertRegionPrices(data []types.UpdateVariantRegionPriceData) *utils.ApplictaionError
func (*ProductVariantService) ValidateVariantsToCreate ¶
func (s *ProductVariantService) ValidateVariantsToCreate(product *models.Product, variants []types.CreateProductVariantInput) *utils.ApplictaionError
ValidateVariantsToCreate validates the variants to Create
type PublishableApiKeyService ¶
type PublishableApiKeyService struct {
// contains filtered or unexported fields
}
func NewPublishableApiKeyService ¶
func NewPublishableApiKeyService( r Registry, ) *PublishableApiKeyService
func (*PublishableApiKeyService) AddSalesChannels ¶
func (s *PublishableApiKeyService) AddSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError
func (*PublishableApiKeyService) Create ¶
func (s *PublishableApiKeyService) Create(data *types.CreatePublishableApiKeyInput, loggedInUserId uuid.UUID) (*models.PublishableApiKey, *utils.ApplictaionError)
func (*PublishableApiKeyService) Delete ¶
func (s *PublishableApiKeyService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*PublishableApiKeyService) GetResourceScopes ¶
func (s *PublishableApiKeyService) GetResourceScopes(id uuid.UUID) (*types.PublishableApiKeyScopes, *utils.ApplictaionError)
func (*PublishableApiKeyService) IsValid ¶
func (s *PublishableApiKeyService) IsValid(id uuid.UUID) (bool, *utils.ApplictaionError)
func (*PublishableApiKeyService) ListAndCount ¶
func (s *PublishableApiKeyService) ListAndCount(selector *models.PublishableApiKey, config *sql.Options) ([]models.PublishableApiKey, *int64, *utils.ApplictaionError)
func (*PublishableApiKeyService) ListSalesChannels ¶
func (s *PublishableApiKeyService) ListSalesChannels(id uuid.UUID, q *string) ([]models.SalesChannel, *utils.ApplictaionError)
func (*PublishableApiKeyService) RemoveSalesChannels ¶
func (s *PublishableApiKeyService) RemoveSalesChannels(id uuid.UUID, salesChannelIds uuid.UUIDs) *utils.ApplictaionError
func (*PublishableApiKeyService) Retrieve ¶
func (s *PublishableApiKeyService) Retrieve(selector *models.PublishableApiKey, config *sql.Options) (*models.PublishableApiKey, *utils.ApplictaionError)
func (*PublishableApiKeyService) RetrieveById ¶
func (s *PublishableApiKeyService) RetrieveById(id uuid.UUID, config *sql.Options) (*models.PublishableApiKey, *utils.ApplictaionError)
func (*PublishableApiKeyService) Revoke ¶
func (s *PublishableApiKeyService) Revoke(id uuid.UUID, loggedInUserId uuid.UUID) *utils.ApplictaionError
func (*PublishableApiKeyService) SetContext ¶
func (s *PublishableApiKeyService) SetContext(context context.Context) *PublishableApiKeyService
func (*PublishableApiKeyService) Update ¶
func (s *PublishableApiKeyService) Update(id uuid.UUID, data *types.UpdatePublishableApiKeyInput) (*models.PublishableApiKey, *utils.ApplictaionError)
type RegionService ¶
type RegionService struct {
// contains filtered or unexported fields
}
func NewRegionService ¶
func NewRegionService( r Registry, ) *RegionService
func (*RegionService) AddCountry ¶
func (s *RegionService) AddCountry(regionId uuid.UUID, code string) (*models.Region, *utils.ApplictaionError)
func (*RegionService) AddFulfillmentProvider ¶
func (s *RegionService) AddFulfillmentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
func (*RegionService) AddPaymentProvider ¶
func (s *RegionService) AddPaymentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
func (*RegionService) Create ¶
func (s *RegionService) Create(data *types.CreateRegionInput) (*models.Region, *utils.ApplictaionError)
func (*RegionService) Delete ¶
func (s *RegionService) Delete(regionId uuid.UUID) *utils.ApplictaionError
func (*RegionService) List ¶
func (s *RegionService) List(selector *types.FilterableRegion, config *sql.Options) ([]models.Region, *utils.ApplictaionError)
func (*RegionService) ListAndCount ¶
func (s *RegionService) ListAndCount(selector *types.FilterableRegion, config *sql.Options) ([]models.Region, *int64, *utils.ApplictaionError)
func (*RegionService) RemoveCountry ¶
func (s *RegionService) RemoveCountry(regionId uuid.UUID, code string) (*models.Region, *utils.ApplictaionError)
func (*RegionService) RemoveFulfillmentProvider ¶
func (s *RegionService) RemoveFulfillmentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
func (*RegionService) RemovePaymentProvider ¶
func (s *RegionService) RemovePaymentProvider(regionId uuid.UUID, providerId uuid.UUID) (*models.Region, *utils.ApplictaionError)
func (*RegionService) Retrieve ¶
func (s *RegionService) Retrieve(regionId uuid.UUID, config *sql.Options) (*models.Region, *utils.ApplictaionError)
func (*RegionService) RetrieveByCountryCode ¶
func (s *RegionService) RetrieveByCountryCode(code string, config *sql.Options) (*models.Region, *utils.ApplictaionError)
func (*RegionService) RetrieveByName ¶
func (s *RegionService) RetrieveByName(name string) (*models.Region, *utils.ApplictaionError)
func (*RegionService) SetContext ¶
func (s *RegionService) SetContext(context context.Context) *RegionService
func (*RegionService) Update ¶
func (s *RegionService) Update(regionId uuid.UUID, Update *types.UpdateRegionInput) (*models.Region, *utils.ApplictaionError)
type Registry ¶
type Registry interface { Context() *gorm.DB Manager(ctx context.Context) *gorm.DB Config() *config.Config //Repository AddressRepository() *repository.AddressRepo AnalyticsConfigRepository() *repository.AnalyticsConfigRepo BatchJobRepository() *repository.BatchJobRepo CartRepository() *repository.CartRepo ClaimImageRepository() *repository.ClaimImageRepo ClaimItemRepository() *repository.ClaimItemRepo ClaimTagRepository() *repository.ClaimTagRepo ClaimRepository() *repository.ClaimRepo CountryRepository() *repository.CountryRepo CurrencyRepository() *repository.CurrencyRepo CustomShippingOptionRepository() *repository.CustomShippingOptionRepo CustomerGroupRepository() *repository.CustomerGroupRepo CustomerRepository() *repository.CustomerRepo DiscountConditionRepository() *repository.DiscountConditionRepo DiscountRuleRepository() *repository.DiscountRuleRepo DiscountRepository() *repository.DiscountRepo DraftOrderRepository() *repository.DraftOrderRepo FulfillmentProviderRepository() *repository.FulfillmentProviderRepo FulfillmentRepository() *repository.FulfillmentRepo GiftCardTransactionRepository() *repository.GiftCardTransactionRepo GiftCardRepository() *repository.GiftCardRepo IdempotencyKeyRepository() *repository.IdempotencyKeyRepo ImageRepository() *repository.ImageRepo InviteRepository() *repository.InviteRepo LineItemAdjustmentRepository() *repository.LineItemAdjustmentRepo LineItemTaxLineRepository() *repository.LineItemTaxLineRepo LineItemRepository() *repository.LineItemRepo MoneyAmountRepository() *repository.MoneyAmountRepo NoteRepository() *repository.NoteRepo NotificationProviderRepository() *repository.NotificationProviderRepo NotificationRepository() *repository.NotificationRepo OAuthRepository() *repository.OAuthRepo OrderEditRepository() *repository.OrderEditRepo OrderItemChangeRepository() *repository.OrderItemChangeRepo OrderRepository() *repository.OrderRepo PaymentCollectionRepository() *repository.PaymentCollectionRepo PaymentProviderRepository() *repository.PaymentProviderRepo PaymentSessionRepository() *repository.PaymentSessionRepo PaymentRepository() *repository.PaymentRepo PriceListRepository() *repository.PriceListRepo ProductCategoryRepository() *repository.ProductCategoryRepo ProductCollectionRepository() *repository.ProductCollectionRepo ProductOptionValueRepository() *repository.ProductOptionValueRepo ProductOptionRepository() *repository.ProductOptionRepo ProductTagRepository() *repository.ProductTagRepo ProductTaxRateRepository() *repository.ProductTaxRateRepo ProductTypeRepository() *repository.ProductTypeRepo ProductVariantInventoryItemRepository() *repository.ProductVariantInventoryItem ProductVariantRepository() *repository.ProductVariantRepo ProductRepository() *repository.ProductRepo PublishableApiKeySalesChannelRepository() *repository.PublishableApiKeySalesChannelRepo PublishableApiKeyRepository() *repository.PublishableApiKeyRepo RefundRepository() *repository.RefundRepo RegionRepository() *repository.RegionRepo ReturnItemRepository() *repository.ReturnItemRepo ReturnReasonRepository() *repository.ReturnReasonRepo ReturnRepository() *repository.ReturnRepo SalesChannelLocationRepository() *repository.SalesChannelLocationRepo SalesChannelRepository() *repository.SalesChannelRepo ShippingMethodTaxLineRepository() *repository.ShippingMethodTaxLineRepo ShippingMethodRepository() *repository.ShippingMethodRepo ShippingOptionRequirementRepository() *repository.ShippingOptionRequirementRepo ShippingOptionRepository() *repository.ShippingOptionRepo ShippingProfileRepository() *repository.ShippingProfileRepo ShippingTaxRateRepository() *repository.ShippingTaxRateRepo StagedJobRepository() *repository.StagedJobRepo StoreRepository() *repository.StoreRepo SwapRepository() *repository.SwapRepo TaxProviderRepository() *repository.TaxProviderRepo TaxRateRepository() *repository.TaxRateRepo TrackingLinkRepository() *repository.TrackingLinkRepo UserRepository() *repository.UserRepo //Services AnalyticsConfigService() *AnalyticsConfigService AuthService() *AuthService BatchJobService() *BatchJobService CartService() *CartService ClaimItemService() *ClaimItemService ClaimService() *ClaimService CsvParserService() *CsvParserService CurrencyService() *CurrencyService CustomShippingOptionService() *CustomShippingOptionService CustomerGroupService() *CustomerGroupService CustomerService() *CustomerService DiscountConditionService() *DiscountConditionService DiscountService() *DiscountService DraftOrderService() *DraftOrderService EventBus() *Bus DefaultFileService() *DefaultFileService FulfillmentProviderService() *FulfillmentProviderService FulfillmentService() *FulfillmentService GiftCardService() *GiftCardService IdempotencyKeyService() *IdempotencyKeyService InviteService() *InviteService LineItemAdjustmentService() *LineItemAdjustmentService LineItemService() *LineItemService NewTotalsService() *NewTotalsService NoteService() *NoteService NotificationService() *NotificationService OAuthService() *OAuthService OrderItemChangeService() *OrderItemChangeService OrderEditService() *OrderEditService OrderService() *OrderService PaymentCollectionService() *PaymentCollectionService PaymentProviderService() *PaymentProviderService PaymentService() *PaymentService PriceListService() *PriceListService PricingService() *PricingService ProductCategoryService() *ProductCategoryService ProductCollectionService() *ProductCollectionService ProductTagService() *ProductTagService ProductTaxRateService() *ProductTaxRateService ProductTypeService() *ProductTypeService ProductVariantInventoryService() *ProductVariantInventoryService ProductVariantService() *ProductVariantService ProductService() *ProductService PublishableApiKeyService() *PublishableApiKeyService RegionService() *RegionService ReturnReasonService() *ReturnReasonService ReturnService() *ReturnService SalesChannelInventoryService() *SalesChannelInventoryService SalesChannelLocationService() *SalesChannelLocationService SalesChannelService() *SalesChannelService DefaultSearchService() *DefaultSearchService ShippingOptionService() *ShippingOptionService ShippingProfileService() *ShippingProfileService ShippingTaxRateService() *ShippingTaxRateService StagedJobService() *StagedJobService StoreService() *StoreService StrategyResolverService() *StrategyResolverService SwapService() *SwapService SystemProviderService() *SystemProviderService SystemTaxService() *SystemTaxService TaxProviderService() *TaxProviderService TaxRateService() *TaxRateService TockenService() *TockenService TotalsService() *TotalsService UserService() *UserService //Interfaces PriceSelectionStrategy() interfaces.IPriceSelectionStrategy TaxCalculationStrategy() interfaces.ITaxCalculationStrategy InventoryService() interfaces.IInventoryService StockLocationService() interfaces.IStockLocationService CacheService() interfaces.ICacheService PricingModuleService() interfaces.IPricingModuleService BatchJobStrategy() interfaces.IBatchJobStrategy }
type ReserveQuantityContext ¶
type ReturnReasonService ¶
type ReturnReasonService struct {
// contains filtered or unexported fields
}
func NewReturnReasonService ¶
func NewReturnReasonService( r Registry, ) *ReturnReasonService
func (*ReturnReasonService) Create ¶
func (s *ReturnReasonService) Create(data *types.CreateReturnReason) (*models.ReturnReason, *utils.ApplictaionError)
func (*ReturnReasonService) Delete ¶
func (s *ReturnReasonService) Delete(returnReasonId uuid.UUID) *utils.ApplictaionError
func (*ReturnReasonService) List ¶
func (s *ReturnReasonService) List(selector *types.FilterableReturnReason, config *sql.Options) ([]models.ReturnReason, *utils.ApplictaionError)
func (*ReturnReasonService) Retrieve ¶
func (s *ReturnReasonService) Retrieve(returnReasonId uuid.UUID, config *sql.Options) (*models.ReturnReason, *utils.ApplictaionError)
func (*ReturnReasonService) SetContext ¶
func (s *ReturnReasonService) SetContext(context context.Context) *ReturnReasonService
func (*ReturnReasonService) Update ¶
func (s *ReturnReasonService) Update(id uuid.UUID, data *types.UpdateReturnReason) (*models.ReturnReason, *utils.ApplictaionError)
type ReturnService ¶
type ReturnService struct {
// contains filtered or unexported fields
}
func NewReturnService ¶
func NewReturnService( r Registry, ) *ReturnService
func (*ReturnService) Cancel ¶
func (s *ReturnService) Cancel(returnId uuid.UUID) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) Create ¶
func (s *ReturnService) Create(data *types.CreateReturnInput) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) Fulfill ¶
func (s *ReturnService) Fulfill(returnId uuid.UUID) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) GetFulfillmentItems ¶
func (s *ReturnService) GetFulfillmentItems(order *models.Order, items []types.OrderReturnItem, transformer Transformer) ([]models.ReturnItem, *utils.ApplictaionError)
func (*ReturnService) List ¶
func (s *ReturnService) List(selector *types.FilterableReturn, config *sql.Options) ([]models.Return, *utils.ApplictaionError)
func (*ReturnService) ListAndCount ¶
func (s *ReturnService) ListAndCount(selector *types.FilterableReturn, config *sql.Options) ([]models.Return, *int64, *utils.ApplictaionError)
func (*ReturnService) Receive ¶
func (s *ReturnService) Receive(returnId uuid.UUID, receivedItems []types.OrderReturnItem, refundAmount *float64, allowMismatch bool, context map[string]interface{}) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) Retrieve ¶
func (s *ReturnService) Retrieve(returnId uuid.UUID, config *sql.Options) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) RetrieveBySwap ¶
func (s *ReturnService) RetrieveBySwap(swapId uuid.UUID, relations []string) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) SetContext ¶
func (s *ReturnService) SetContext(context context.Context) *ReturnService
func (*ReturnService) Update ¶
func (s *ReturnService) Update(returnId uuid.UUID, data *types.UpdateReturnInput) (*models.Return, *utils.ApplictaionError)
func (*ReturnService) ValidateReturnLineItem ¶
func (s *ReturnService) ValidateReturnLineItem(item *models.LineItem, quantity int, additional *types.OrderReturnItem) (*models.ReturnItem, *utils.ApplictaionError)
func (*ReturnService) ValidateReturnStatuses ¶
func (s *ReturnService) ValidateReturnStatuses(order *models.Order) *utils.ApplictaionError
type SalesChannelInventoryService ¶
type SalesChannelInventoryService struct {
// contains filtered or unexported fields
}
func NewSalesChannelInventoryService ¶
func NewSalesChannelInventoryService( r Registry, ) *SalesChannelInventoryService
func (*SalesChannelInventoryService) RetrieveAvailableItemQuantity ¶
func (s *SalesChannelInventoryService) RetrieveAvailableItemQuantity(salesChannelId uuid.UUID, inventoryItemId uuid.UUID) (int, *utils.ApplictaionError)
func (*SalesChannelInventoryService) SetContext ¶
func (s *SalesChannelInventoryService) SetContext(context context.Context) *SalesChannelInventoryService
type SalesChannelLocationService ¶
type SalesChannelLocationService struct {
// contains filtered or unexported fields
}
func NewSalesChannelLocationService ¶
func NewSalesChannelLocationService( r Registry, ) *SalesChannelLocationService
func (*SalesChannelLocationService) AssociateLocation ¶
func (s *SalesChannelLocationService) AssociateLocation(salesChannelId uuid.UUID, locationId uuid.UUID) *utils.ApplictaionError
func (*SalesChannelLocationService) ListLocationIds ¶
func (s *SalesChannelLocationService) ListLocationIds(salesChannelId uuid.UUIDs) (uuid.UUIDs, *utils.ApplictaionError)
func (*SalesChannelLocationService) ListSalesChannelIds ¶
func (s *SalesChannelLocationService) ListSalesChannelIds(locationId uuid.UUID) (uuid.UUIDs, *utils.ApplictaionError)
func (*SalesChannelLocationService) RemoveLocation ¶
func (s *SalesChannelLocationService) RemoveLocation(salesChannelId uuid.UUID, locationId uuid.UUID) *utils.ApplictaionError
func (*SalesChannelLocationService) SetContext ¶
func (s *SalesChannelLocationService) SetContext(context context.Context) *SalesChannelLocationService
type SalesChannelService ¶
type SalesChannelService struct {
// contains filtered or unexported fields
}
func NewSalesChannelService ¶
func NewSalesChannelService( r Registry, ) *SalesChannelService
func (*SalesChannelService) AddProducts ¶
func (s *SalesChannelService) AddProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) Create ¶
func (s *SalesChannelService) Create(data *types.CreateSalesChannelInput) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) CreateDefault ¶
func (s *SalesChannelService) CreateDefault() (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) Delete ¶
func (s *SalesChannelService) Delete(salesChannelId uuid.UUID) *utils.ApplictaionError
func (*SalesChannelService) List ¶
func (s *SalesChannelService) List(selector *types.FilterableSalesChannel, config *sql.Options) ([]models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) ListAndCount ¶
func (s *SalesChannelService) ListAndCount(selector *types.FilterableSalesChannel, config *sql.Options) ([]models.SalesChannel, *int64, *utils.ApplictaionError)
func (*SalesChannelService) ListProductIdsBySalesChannelIds ¶
func (s *SalesChannelService) ListProductIdsBySalesChannelIds(salesChannelIds uuid.UUIDs) (map[string][]string, *utils.ApplictaionError)
func (*SalesChannelService) RemoveProducts ¶
func (s *SalesChannelService) RemoveProducts(salesChannelId uuid.UUID, productIds uuid.UUIDs) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) Retrieve ¶
func (s *SalesChannelService) Retrieve(selector *models.SalesChannel, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) RetrieveById ¶
func (s *SalesChannelService) RetrieveById(salesChannelId uuid.UUID, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) RetrieveByName ¶
func (s *SalesChannelService) RetrieveByName(name string, config *sql.Options) (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) RetrieveDefault ¶
func (s *SalesChannelService) RetrieveDefault() (*models.SalesChannel, *utils.ApplictaionError)
func (*SalesChannelService) SetContext ¶
func (s *SalesChannelService) SetContext(context context.Context) *SalesChannelService
func (*SalesChannelService) Update ¶
func (s *SalesChannelService) Update(salesChannelId uuid.UUID, data *types.UpdateSalesChannelInput) (*models.SalesChannel, *utils.ApplictaionError)
type ShippingMethodTotals ¶
type ShippingOptionService ¶
type ShippingOptionService struct {
// contains filtered or unexported fields
}
func NewShippingOptionService ¶
func NewShippingOptionService( r Registry, ) *ShippingOptionService
func (*ShippingOptionService) AddRequirement ¶
func (s *ShippingOptionService) AddRequirement(optionId uuid.UUID, requirement *models.ShippingOptionRequirement) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) Create ¶
func (s *ShippingOptionService) Create(data *types.CreateShippingOptionInput) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) CreateShippingMethod ¶
func (s *ShippingOptionService) CreateShippingMethod(optionId uuid.UUID, data map[string]interface{}, config *types.CreateShippingMethodDto) (*models.ShippingMethod, *utils.ApplictaionError)
func (*ShippingOptionService) Delete ¶
func (s *ShippingOptionService) Delete(optionId uuid.UUID) *utils.ApplictaionError
func (*ShippingOptionService) DeleteShippingMethods ¶
func (s *ShippingOptionService) DeleteShippingMethods(shippingMethods []models.ShippingMethod) *utils.ApplictaionError
func (*ShippingOptionService) GetPrice ¶
func (s *ShippingOptionService) GetPrice(option *models.ShippingOption, data core.JSONB, cart *models.Cart) (float64, *utils.ApplictaionError)
func (*ShippingOptionService) List ¶
func (s *ShippingOptionService) List(selector *types.FilterableShippingOption, config *sql.Options) ([]models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) ListAndCount ¶
func (s *ShippingOptionService) ListAndCount(selector *types.FilterableShippingOption, config *sql.Options) ([]models.ShippingOption, *int64, *utils.ApplictaionError)
func (*ShippingOptionService) RemoveRequirement ¶
func (s *ShippingOptionService) RemoveRequirement(requirementId uuid.UUID) (*models.ShippingOptionRequirement, *utils.ApplictaionError)
func (*ShippingOptionService) Retrieve ¶
func (s *ShippingOptionService) Retrieve(optionId uuid.UUID, config *sql.Options) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) SetContext ¶
func (s *ShippingOptionService) SetContext(context context.Context) *ShippingOptionService
func (*ShippingOptionService) Update ¶
func (s *ShippingOptionService) Update(optionId uuid.UUID, data *types.UpdateShippingOptionInput) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) UpdateShippingMethod ¶
func (s *ShippingOptionService) UpdateShippingMethod(id uuid.UUID, data *types.ShippingMethodUpdate) (*models.ShippingMethod, *utils.ApplictaionError)
func (*ShippingOptionService) UpdateShippingProfile ¶
func (s *ShippingOptionService) UpdateShippingProfile(optionIds uuid.UUIDs, profileId uuid.UUID) ([]models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) ValidateAndMutatePrice ¶
func (s *ShippingOptionService) ValidateAndMutatePrice(option *models.ShippingOption, option2 *types.CreateShippingOptionInput, priceInput types.ValidatePriceTypeAndAmountInput) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) ValidateCartOption ¶
func (s *ShippingOptionService) ValidateCartOption(option *models.ShippingOption, cart *models.Cart) (*models.ShippingOption, *utils.ApplictaionError)
func (*ShippingOptionService) ValidateRequirement ¶
func (s *ShippingOptionService) ValidateRequirement(data *types.ValidateRequirementTypeInput, optionId uuid.UUID) (*models.ShippingOptionRequirement, *utils.ApplictaionError)
type ShippingProfileService ¶
type ShippingProfileService struct {
// contains filtered or unexported fields
}
func NewShippingProfileService ¶
func NewShippingProfileService( r Registry, ) *ShippingProfileService
func (*ShippingProfileService) AddProduct ¶
func (s *ShippingProfileService) AddProduct(profileId uuid.UUID, productId uuid.UUID) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) AddProducts ¶
func (s *ShippingProfileService) AddProducts(profileId uuid.UUID, productIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) AddShippingOption ¶
func (s *ShippingProfileService) AddShippingOption(profileId uuid.UUID, optionId uuid.UUID) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) AddShippingOptions ¶
func (s *ShippingProfileService) AddShippingOptions(profileId uuid.UUID, optionIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) Create ¶
func (s *ShippingProfileService) Create(data *types.CreateShippingProfile) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) CreateDefault ¶
func (s *ShippingProfileService) CreateDefault() (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) CreateGiftCardDefault ¶
func (s *ShippingProfileService) CreateGiftCardDefault() (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) Delete ¶
func (s *ShippingProfileService) Delete(profileId uuid.UUID) *utils.ApplictaionError
func (*ShippingProfileService) FetchCartOptions ¶
func (s *ShippingProfileService) FetchCartOptions(cart *models.Cart) ([]models.ShippingOption, *utils.ApplictaionError)
func (*ShippingProfileService) GetMapProfileIdsByProductIds ¶
func (s *ShippingProfileService) GetMapProfileIdsByProductIds(productIds uuid.UUIDs) (*map[uuid.UUID]uuid.UUID, *utils.ApplictaionError)
func (*ShippingProfileService) GetProfilesInCart ¶
func (s *ShippingProfileService) GetProfilesInCart(cart *models.Cart) (uuid.UUIDs, *utils.ApplictaionError)
func (*ShippingProfileService) List ¶
func (s *ShippingProfileService) List(selector *types.FilterableShippingProfile, config *sql.Options) ([]models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) RemoveProducts ¶
func (s *ShippingProfileService) RemoveProducts(profileId uuid.UUID, productIds uuid.UUIDs) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) Retrieve ¶
func (s *ShippingProfileService) Retrieve(profileId uuid.UUID, config *sql.Options) (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) RetrieveDefault ¶
func (s *ShippingProfileService) RetrieveDefault() (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) RetrieveForProducts ¶
func (s *ShippingProfileService) RetrieveForProducts(productIds uuid.UUIDs) (map[string]models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) RetrieveGiftCardDefault ¶
func (s *ShippingProfileService) RetrieveGiftCardDefault() (*models.ShippingProfile, *utils.ApplictaionError)
func (*ShippingProfileService) SetContext ¶
func (s *ShippingProfileService) SetContext(context context.Context) *ShippingProfileService
func (*ShippingProfileService) Update ¶
func (s *ShippingProfileService) Update(profileId uuid.UUID, data *types.UpdateShippingProfile) (*models.ShippingProfile, *utils.ApplictaionError)
type ShippingTaxRateService ¶
type ShippingTaxRateService struct {
// contains filtered or unexported fields
}
func NewShippingTaxRateService ¶
func NewShippingTaxRateService( r Registry, ) *ShippingTaxRateService
func (*ShippingTaxRateService) List ¶
func (s *ShippingTaxRateService) List(selector types.FilterableShippingTaxRate, config *sql.Options) ([]models.ShippingTaxRate, *utils.ApplictaionError)
func (*ShippingTaxRateService) SetContext ¶
func (s *ShippingTaxRateService) SetContext(context context.Context) *ShippingTaxRateService
type StagedJobService ¶
type StagedJobService struct {
// contains filtered or unexported fields
}
func NewStagedJobService ¶
func NewStagedJobService(r Registry) *StagedJobService
func (*StagedJobService) Create ¶
func (s *StagedJobService) Create(data []types.EmitData) *utils.ApplictaionError
func (*StagedJobService) Delete ¶
func (s *StagedJobService) Delete(stagedJobIds uuid.UUIDs) *utils.ApplictaionError
func (*StagedJobService) List ¶
func (s *StagedJobService) List(selector models.StagedJob, config *sql.Options) ([]models.StagedJob, *utils.ApplictaionError)
func (*StagedJobService) SetContext ¶
func (s *StagedJobService) SetContext(context context.Context) *StagedJobService
type StoreService ¶
type StoreService struct {
// contains filtered or unexported fields
}
func NewStoreService ¶
func NewStoreService( r Registry, ) *StoreService
func (*StoreService) AddCurrency ¶
func (s *StoreService) AddCurrency(code string) (*models.Store, *utils.ApplictaionError)
func (*StoreService) Create ¶
func (s *StoreService) Create() (*models.Store, *utils.ApplictaionError)
func (*StoreService) GetDefaultCurrency ¶
func (s *StoreService) GetDefaultCurrency(code string) *models.Currency
func (*StoreService) RemoveCurrency ¶
func (s *StoreService) RemoveCurrency(code string) (*models.Store, *utils.ApplictaionError)
func (*StoreService) Retrieve ¶
func (s *StoreService) Retrieve(config *sql.Options) (*models.Store, *utils.ApplictaionError)
func (*StoreService) SetContext ¶
func (s *StoreService) SetContext(context context.Context) *StoreService
func (*StoreService) Update ¶
func (s *StoreService) Update(data *types.UpdateStoreInput) (*models.Store, *utils.ApplictaionError)
type StrategyResolverService ¶
type StrategyResolverService struct {
// contains filtered or unexported fields
}
func NewStrategyResolverService ¶
func NewStrategyResolverService() *StrategyResolverService
func (*StrategyResolverService) SetContext ¶
func (s *StrategyResolverService) SetContext(context context.Context) *StrategyResolverService
type SwapService ¶
type SwapService struct {
// contains filtered or unexported fields
}
func NewSwapService ¶
func NewSwapService( r Registry, ) *SwapService
func (*SwapService) AreReturnItemsValid ¶
func (s *SwapService) AreReturnItemsValid(returnItems []types.OrderReturnItem) (bool, *utils.ApplictaionError)
func (*SwapService) Cancel ¶
func (s *SwapService) Cancel(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) CancelFulfillment ¶
func (s *SwapService) CancelFulfillment(fulfillmentId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) Create ¶
func (s *SwapService) Create(order *models.Order, returnItems []types.OrderReturnItem, additionalItems []types.CreateClaimItemAdditionalItemInput, returnShipping *types.CreateClaimReturnShippingInput, custom map[string]interface{}) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) CreateCart ¶
func (s *SwapService) CreateCart(swapId uuid.UUID, customShippingOptions []types.CreateCustomShippingOptionInput, context map[string]interface{}) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) CreateFulfillment ¶
func (s *SwapService) CreateFulfillment(swapId uuid.UUID, config *types.CreateShipmentConfig) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) CreateShipment ¶
func (s *SwapService) CreateShipment(swapId uuid.UUID, fulfillmentId uuid.UUID, trackingLinks []models.TrackingLink, config *types.CreateShipmentConfig) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) DeleteMetadata ¶
func (s *SwapService) DeleteMetadata(swapId string, key string) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) List ¶
func (s *SwapService) List(selector *types.FilterableSwap, config *sql.Options) ([]models.Swap, *utils.ApplictaionError)
func (*SwapService) ListAndCount ¶
func (s *SwapService) ListAndCount(selector *types.FilterableSwap, config *sql.Options) ([]models.Swap, *int64, *utils.ApplictaionError)
func (*SwapService) ProcessDifference ¶
func (s *SwapService) ProcessDifference(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) RegisterCartCompletion ¶
func (s *SwapService) RegisterCartCompletion(swapId uuid.UUID) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) RegisterReceived ¶
func (s *SwapService) RegisterReceived(id uuid.UUID) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) Retrieve ¶
func (s *SwapService) Retrieve(swapId uuid.UUID, config *sql.Options) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) RetrieveByCartId ¶
func (s *SwapService) RetrieveByCartId(cartId uuid.UUID, relations []string) (*models.Swap, *utils.ApplictaionError)
func (*SwapService) SetContext ¶
func (s *SwapService) SetContext(context context.Context) *SwapService
type SystemProviderService ¶
type SystemProviderService struct {
// contains filtered or unexported fields
}
func NewSystemProviderService ¶
func NewSystemProviderService() *SystemProviderService
func (*SystemProviderService) AuthorizePayment ¶
func (s *SystemProviderService) AuthorizePayment() map[string]interface{}
func (*SystemProviderService) CancelPayment ¶
func (s *SystemProviderService) CancelPayment() map[string]interface{}
func (*SystemProviderService) CapturePayment ¶
func (s *SystemProviderService) CapturePayment() map[string]interface{}
func (*SystemProviderService) CreatePayment ¶
func (s *SystemProviderService) CreatePayment() map[string]interface{}
func (*SystemProviderService) DeletePayment ¶
func (s *SystemProviderService) DeletePayment() map[string]interface{}
func (*SystemProviderService) GetPaymentData ¶
func (s *SystemProviderService) GetPaymentData() map[string]interface{}
func (*SystemProviderService) GetStatus ¶
func (s *SystemProviderService) GetStatus() string
func (*SystemProviderService) GetTaxLines ¶
func (s *SystemProviderService) GetTaxLines(itemLines []interfaces.ItemTaxCalculationLine, shippingLines []interfaces.ShippingTaxCalculationLine, context interfaces.TaxCalculationContext) ([]types.ProviderTaxLine, *utils.ApplictaionError)
func (*SystemProviderService) RefundPayment ¶
func (s *SystemProviderService) RefundPayment() map[string]interface{}
func (*SystemProviderService) SetContext ¶
func (s *SystemProviderService) SetContext(context context.Context) *SystemProviderService
func (*SystemProviderService) UpdatePayment ¶
func (s *SystemProviderService) UpdatePayment() map[string]interface{}
func (*SystemProviderService) UpdatePaymentData ¶
func (s *SystemProviderService) UpdatePaymentData() map[string]interface{}
type SystemTaxService ¶
type SystemTaxService struct {
// contains filtered or unexported fields
}
func NewSystemTaxService ¶
func NewSystemTaxService(r Registry) *SystemTaxService
func (*SystemTaxService) SetContext ¶
func (s *SystemTaxService) SetContext(context context.Context) *SystemTaxService
type TaxProviderService ¶
type TaxProviderService struct {
// contains filtered or unexported fields
}
func NewTaxProviderService ¶
func NewTaxProviderService( container di.Container, r Registry, ) *TaxProviderService
func (*TaxProviderService) ClearLineItemsTaxLines ¶
func (s *TaxProviderService) ClearLineItemsTaxLines(itemIds uuid.UUIDs) *utils.ApplictaionError
func (*TaxProviderService) ClearTaxLines ¶
func (s *TaxProviderService) ClearTaxLines(cartId uuid.UUID) *utils.ApplictaionError
func (*TaxProviderService) CreateShippingTaxLines ¶
func (s *TaxProviderService) CreateShippingTaxLines(shippingMethod *models.ShippingMethod, calculationContext *interfaces.TaxCalculationContext) ([]models.ShippingMethodTaxLine, *utils.ApplictaionError)
func (*TaxProviderService) CreateTaxLines ¶
func (s *TaxProviderService) CreateTaxLines(cart *models.Cart, lineItems []models.LineItem, calculationContext *interfaces.TaxCalculationContext) ([]models.ShippingMethodTaxLine, []models.LineItemTaxLine, *utils.ApplictaionError)
func (*TaxProviderService) GetCacheKey ¶
func (*TaxProviderService) GetRegionRatesForProduct ¶
func (s *TaxProviderService) GetRegionRatesForProduct(productIds uuid.UUIDs, region *models.Region) (map[uuid.UUID][]types.TaxServiceRate, *utils.ApplictaionError)
func (*TaxProviderService) GetRegionRatesForShipping ¶
func (s *TaxProviderService) GetRegionRatesForShipping(optionId uuid.UUID, region *models.Region) ([]types.TaxServiceRate, *utils.ApplictaionError)
func (*TaxProviderService) GetShippingTaxLines ¶
func (s *TaxProviderService) GetShippingTaxLines(shippingMethod *models.ShippingMethod, calculationContext *interfaces.TaxCalculationContext) ([]models.ShippingMethodTaxLine, *utils.ApplictaionError)
func (*TaxProviderService) GetTaxLines ¶
func (s *TaxProviderService) GetTaxLines(lineItems []models.LineItem, calculationContext *interfaces.TaxCalculationContext) ([]models.ShippingMethodTaxLine, []models.LineItemTaxLine, *utils.ApplictaionError)
func (*TaxProviderService) GetTaxLinesMap ¶
func (s *TaxProviderService) GetTaxLinesMap(items []models.LineItem, calculationContext *interfaces.TaxCalculationContext) (types.TaxLinesMaps, *utils.ApplictaionError)
func (*TaxProviderService) List ¶
func (s *TaxProviderService) List(selector *models.TaxProvider, config *sql.Options) ([]models.TaxProvider, *utils.ApplictaionError)
func (*TaxProviderService) ListAndCount ¶
func (s *TaxProviderService) ListAndCount(selector *models.TaxProvider, config *sql.Options) ([]models.TaxProvider, *int64, *utils.ApplictaionError)
func (*TaxProviderService) RegisterInstalledProviders ¶
func (s *TaxProviderService) RegisterInstalledProviders(providers uuid.UUIDs) *utils.ApplictaionError
func (*TaxProviderService) RetrieveProvider ¶
func (s *TaxProviderService) RetrieveProvider(region models.Region) interfaces.ITaxService
func (*TaxProviderService) SetContext ¶
func (s *TaxProviderService) SetContext(context context.Context) *TaxProviderService
type TaxRateService ¶
type TaxRateService struct {
// contains filtered or unexported fields
}
func NewTaxRateService ¶
func NewTaxRateService( r Registry, ) *TaxRateService
func (*TaxRateService) AddToProduct ¶
func (s *TaxRateService) AddToProduct(id uuid.UUID, productIds uuid.UUIDs, replace bool) ([]models.ProductTaxRate, *utils.ApplictaionError)
func (*TaxRateService) AddToProductType ¶
func (s *TaxRateService) AddToProductType(id uuid.UUID, productTypeIds uuid.UUIDs, replace bool) ([]models.ProductTypeTaxRate, *utils.ApplictaionError)
func (*TaxRateService) AddToShippingOption ¶
func (s *TaxRateService) AddToShippingOption(id uuid.UUID, optionIds uuid.UUIDs, replace bool) ([]models.ShippingTaxRate, *utils.ApplictaionError)
func (*TaxRateService) Create ¶
func (s *TaxRateService) Create(data *types.CreateTaxRateInput) (*models.TaxRate, *utils.ApplictaionError)
func (*TaxRateService) Delete ¶
func (s *TaxRateService) Delete(id uuid.UUID) *utils.ApplictaionError
func (*TaxRateService) List ¶
func (s *TaxRateService) List(selector *types.FilterableTaxRate, config *sql.Options) ([]models.TaxRate, *utils.ApplictaionError)
func (*TaxRateService) ListAndCount ¶
func (s *TaxRateService) ListAndCount(selector *types.FilterableTaxRate, config *sql.Options) ([]models.TaxRate, int64, *utils.ApplictaionError)
func (*TaxRateService) ListByProduct ¶
func (s *TaxRateService) ListByProduct(productId uuid.UUID, config types.TaxRateListByConfig) ([]models.TaxRate, *utils.ApplictaionError)
func (*TaxRateService) ListByShippingOption ¶
func (s *TaxRateService) ListByShippingOption(shippingOptionId uuid.UUID) ([]models.TaxRate, *utils.ApplictaionError)
func (*TaxRateService) RemoveFromProduct ¶
func (s *TaxRateService) RemoveFromProduct(id uuid.UUID, productIds uuid.UUIDs) *utils.ApplictaionError
func (*TaxRateService) RemoveFromProductType ¶
func (s *TaxRateService) RemoveFromProductType(id uuid.UUID, typeIds uuid.UUIDs) *utils.ApplictaionError
func (*TaxRateService) RemoveFromShippingOption ¶
func (s *TaxRateService) RemoveFromShippingOption(id uuid.UUID, optionIds uuid.UUIDs) *utils.ApplictaionError
func (*TaxRateService) Retrieve ¶
func (s *TaxRateService) Retrieve(taxRateId uuid.UUID, config *sql.Options) (*models.TaxRate, *utils.ApplictaionError)
func (*TaxRateService) SetContext ¶
func (s *TaxRateService) SetContext(context context.Context) *TaxRateService
func (*TaxRateService) Update ¶
func (s *TaxRateService) Update(id uuid.UUID, data *types.UpdateTaxRateInput) (*models.TaxRate, *utils.ApplictaionError)
type TockenService ¶
type TockenService struct {
// contains filtered or unexported fields
}
func NewTockenService ¶
func NewTockenService(secretKey []byte) *TockenService
func (*TockenService) SetContext ¶
func (s *TockenService) SetContext(context context.Context) *TockenService
func (*TockenService) SignToken ¶
func (s *TockenService) SignToken(data map[string]interface{}) (*string, error)
func (*TockenService) SignTokenWithSecret ¶
func (s *TockenService) SignTokenWithSecret(data map[string]interface{}, secret []byte) (*string, error)
func (*TockenService) VerifyToken ¶
func (*TockenService) VerifyTokenWithSecret ¶
type TotalsConfig ¶
type TotalsConfig struct {
ForceTaxes bool
}
type TotalsService ¶
type TotalsService struct {
// contains filtered or unexported fields
}
func NewTotalService ¶
func NewTotalService( r Registry, ) *TotalsService
func (*TotalsService) CalculateDiscount ¶
func (s *TotalsService) CalculateDiscount(lineItem models.LineItem, variant uuid.UUID, variantPrice float64, value float64, discountType models.DiscountRuleType) types.LineDiscount
func (*TotalsService) GetAllocationItemDiscounts ¶
func (s *TotalsService) GetAllocationItemDiscounts(discount models.Discount, cart models.Cart) []types.LineDiscount
func (*TotalsService) GetAllocationMap ¶
func (s *TotalsService) GetAllocationMap(calculationContextData types.CalculationContextData, options AllocationMapOptions) (types.LineAllocationsMap, *utils.ApplictaionError)
func (*TotalsService) GetCalculationContext ¶
func (s *TotalsService) GetCalculationContext(calculationContextData types.CalculationContextData, options CalculationContextOptions) (*interfaces.TaxCalculationContext, *utils.ApplictaionError)
func (*TotalsService) GetDiscountTotal ¶
func (s *TotalsService) GetDiscountTotal(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
func (*TotalsService) GetGiftCardTotal ¶
func (s *TotalsService) GetGiftCardTotal(cart *models.Cart, order *models.Order, opts map[string]interface{}) (*Total, *utils.ApplictaionError)
func (*TotalsService) GetGiftCardableAmount ¶
func (s *TotalsService) GetGiftCardableAmount(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
func (*TotalsService) GetLineDiscounts ¶
func (s *TotalsService) GetLineDiscounts(calculationContextData types.CalculationContextData, discount models.Discount) []types.LineDiscountAmount
func (*TotalsService) GetLineItemAdjustmentsTotal ¶
func (*TotalsService) GetLineItemDiscountAdjustment ¶
func (*TotalsService) GetLineItemRefund ¶
func (s *TotalsService) GetLineItemRefund(order *models.Order, lineItem models.LineItem) (float64, *utils.ApplictaionError)
func (*TotalsService) GetLineItemTotal ¶
func (s *TotalsService) GetLineItemTotal(lineItem models.LineItem, cart *models.Cart, order *models.Order, options GetLineItemTotalOptions) (float64, *utils.ApplictaionError)
func (*TotalsService) GetLineItemTotals ¶
func (s *TotalsService) GetLineItemTotals(lineItem models.LineItem, cart *models.Cart, order *models.Order, options *LineItemTotalsOptions) (*models.LineItem, *utils.ApplictaionError)
func (*TotalsService) GetPaidTotal ¶
func (s *TotalsService) GetPaidTotal(order *models.Order) float64
func (*TotalsService) GetRefundTotal ¶
func (s *TotalsService) GetRefundTotal(order *models.Order, lineItems []models.LineItem) (float64, *utils.ApplictaionError)
func (*TotalsService) GetRefundedTotal ¶
func (s *TotalsService) GetRefundedTotal(order *models.Order) float64
func (*TotalsService) GetShippingMethodTotals ¶
func (s *TotalsService) GetShippingMethodTotals(shippingMethod models.ShippingMethod, cart *models.Cart, order *models.Order, opts GetShippingMethodTotalsOptions) (*ShippingMethodTotals, *utils.ApplictaionError)
func (*TotalsService) GetShippingTotal ¶
func (s *TotalsService) GetShippingTotal(cart *models.Cart, order *models.Order) (float64, *utils.ApplictaionError)
func (*TotalsService) GetSubtotal ¶
func (s *TotalsService) GetSubtotal(cart *models.Cart, order *models.Order, opts types.SubtotalOptions) (float64, *utils.ApplictaionError)
func (*TotalsService) GetSwapTotal ¶
func (s *TotalsService) GetSwapTotal(order *models.Order) float64
func (*TotalsService) GetTaxTotal ¶
func (s *TotalsService) GetTaxTotal(cart *models.Cart, order *models.Order, forceTaxes bool) (float64, *utils.ApplictaionError)
func (*TotalsService) GetTotal ¶
func (s *TotalsService) GetTotal(cart *models.Cart, order *models.Order, options GetTotalsOptions) (float64, *utils.ApplictaionError)
func (*TotalsService) Rounded ¶
func (s *TotalsService) Rounded(value float64) float64
func (*TotalsService) SetContext ¶
func (s *TotalsService) SetContext(context context.Context) *TotalsService
type TotalsServiceProps ¶
type TotalsServiceProps struct { TaxProviderService TaxProviderService NewTotalsService NewTotalsService TaxCalculationStrategy interfaces.ITaxCalculationStrategy }
type Transformer ¶
type Transformer func(item *models.LineItem, quantity int, additional *types.OrderReturnItem) (*models.ReturnItem, *utils.ApplictaionError)
TODO:OrdersReturnItem
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService( r Registry, ) *UserService
func (*UserService) Create ¶
func (s *UserService) Create(data *types.CreateUserInput) (*models.User, *utils.ApplictaionError)
func (*UserService) Delete ¶
func (s *UserService) Delete(userId uuid.UUID) *utils.ApplictaionError
func (*UserService) GenerateResetPasswordToken ¶
func (s *UserService) GenerateResetPasswordToken(userId uuid.UUID) (*string, *utils.ApplictaionError)
func (*UserService) HashPassword ¶
func (s *UserService) HashPassword(password string) (string, error)
func (*UserService) List ¶
func (s *UserService) List(selector *types.FilterableUser, config *sql.Options) ([]models.User, *utils.ApplictaionError)
func (*UserService) ListAndCount ¶
func (s *UserService) ListAndCount(selector *types.FilterableUser, config *sql.Options) ([]models.User, *int64, *utils.ApplictaionError)
func (*UserService) Retrieve ¶
func (s *UserService) Retrieve(userId uuid.UUID, config *sql.Options) (*models.User, *utils.ApplictaionError)
func (*UserService) RetrieveByApiToken ¶
func (s *UserService) RetrieveByApiToken(apiToken string, relations []string) (*models.User, *utils.ApplictaionError)
func (*UserService) RetrieveByEmail ¶
func (s *UserService) RetrieveByEmail(email string, config *sql.Options) (*models.User, *utils.ApplictaionError)
func (*UserService) SetContext ¶
func (s *UserService) SetContext(context context.Context) *UserService
func (*UserService) SetPassword ¶
func (s *UserService) SetPassword(userId uuid.UUID, password string) (*models.User, *utils.ApplictaionError)
func (*UserService) Update ¶
func (s *UserService) Update(userId uuid.UUID, data *types.UpdateUserInput) (*models.User, *utils.ApplictaionError)
Source Files ¶
- analytics-config.go
- auth.go
- batch-job.go
- cart.go
- claim-item.go
- claim.go
- csv-parser.go
- currency.go
- custom-shipping-option.go
- customer-group.go
- customer.go
- discount-condition.go
- discount.go
- draft-order.go
- event-bus.go
- file.go
- flag.go
- fulfillment-provider.go
- fulfillment.go
- gift-card.go
- idempotency-key.go
- invite.go
- job-scheduler.go
- line-item-adjustment.go
- line-item.go
- middleware.go
- new-totals.go
- note.go
- notification.go
- oauth.go
- order-edit-item-change.go
- order-edit.go
- order.go
- payment-collection.go
- payment-provider.go
- payment.go
- price-list.go
- pricing.go
- product-category.go
- product-collection.go
- product-tag.go
- product-tax-rate.go
- product-type.go
- product-variant-inventory.go
- product-variant.go
- product.go
- publishable-api-key.go
- region.go
- registry.go
- return-reason.go
- return.go
- sales-channel-inventory.go
- sales-channel-location.go
- sales-channel.go
- search.go
- shipping-option.go
- shipping-profile.go
- shipping-tax-rate.go
- staged-job.go
- store.go
- strategy-resolver.go
- swap.go
- system-payment-provider.go
- system-tax.go
- tax-provider.go
- tax-rate.go
- token.go
- totals.go
- user.go