Documentation
¶
Index ¶
- func IsPaymentProcessor(obj interface{}) bool
- func IsPaymentProcessorError(obj interface{}) bool
- type AddPriceListPrices
- type BulkUpdateInventoryLevelInput
- type CalculatedPrice
- type CalculatedPriceSet
- type CartCompletionResponse
- type CreateBatchJobInput
- type CreateInventoryItemInput
- type CreateInventoryLevelInput
- type CreateReservationItemInput
- type CreateStockLocationInput
- type CsvParserContext
- type DefaultPriceType
- type DeleteFileType
- type FileServiceGetUploadStreamResult
- type FileServiceUploadResult
- type FilterableInventoryItemProps
- type FilterableInventoryLevelProps
- type FilterableReservationItemProps
- type FilterableStockLocation
- type GetUploadedFileType
- type IBatchJobStrategy
- type ICacheService
- type ICartCompletionStrategy
- type ICsvValidator
- type IFileService
- type IFulfillmentService
- type IInventoryService
- type IMigrator
- type INotificationService
- type IOauthService
- type IParser
- type IPaymentProcessor
- type IPriceSelectionStrategy
- type IPricingModuleService
- type ISearchService
- type IStockLocationService
- type ITaxCalculationStrategy
- type ITaxService
- type InventoryItemDTO
- type InventoryLevelDTO
- type ItemTaxCalculationLine
- type LineContext
- type Migration
- type ModuleJoinerConfig
- type PaymentProcessorContext
- type PaymentProcessorError
- type PaymentProcessorSessionResponse
- type PriceListRule
- type PriceListRuleValue
- type PriceRule
- type PriceSelectionResult
- type PriceSet
- type PriceSetMoneyAmount
- type PriceSetMoneyAmountRules
- type PriceType
- type Pricing
- type PricingContext
- type ProductPricing
- type ReservationItemDTO
- type ReserveQuantityContext
- type ReturnedData
- type RuleType
- type SharedContext
- type ShippingTaxCalculationLine
- type StockLocationAddressDTO
- type StockLocationAddressInput
- type StockLocationDTO
- type StockLocationExpandedDTO
- type StringComparisonOperator
- type TaxCalculationContext
- type UpdateInventoryLevelInput
- type UpdateReservationItemInput
- type UpdateStockLocationInput
- type UploadStreamDescriptorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPaymentProcessor ¶
func IsPaymentProcessor(obj interface{}) bool
func IsPaymentProcessorError ¶
func IsPaymentProcessorError(obj interface{}) bool
Types ¶
type AddPriceListPrices ¶
type AddPriceListPrices struct { // The ID of the price list to add prices to PriceListId uuid.UUID // The prices to add Prices []string }
AddPriceListPrices represents the data transfer object for adding prices to a price list
type CalculatedPrice ¶
type CalculatedPrice struct { // The ID of the money amount selected as the calculated price MoneyAmountId uuid.UUID // The ID of the associated price list, if any PriceListId uuid.UUID // The type of the associated price list, if any PriceListType string // The `min_quantity` field defined on a money amount MinQuantity int // The `max_quantity` field defined on a money amount MaxQuantity int }
CalculatedPrice represents the details of the calculated price
type CalculatedPriceSet ¶
type CalculatedPriceSet struct { // The ID of the price set Id uuid.UUID // Whether the calculated price is associated with a price list IsCalculatedPricePriceList bool `json:"is_calculated_price_price_list,omitempty"` // The amount of the calculated price, or `null` if there isn't a calculated price CalculatedAmount float64 // Whether the original price is associated with a price list IsOriginalPricePriceList bool `json:"is_original_price_price_list,omitempty"` // The amount of the original price, or `null` if there isn't a calculated price OriginalAmount float64 // The currency code of the calculated price, or null if there isn't a calculated price CurrencyCode string // The details of the calculated price CalculatedPrice *CalculatedPrice // The details of the original price OriginalPrice *CalculatedPrice }
CalculatedPriceSet represents the calculated price set
type CartCompletionResponse ¶
type CreateBatchJobInput ¶
type CreateStockLocationInput ¶
type CreateStockLocationInput struct { Name string `json:"name"` AddressID *string `json:"address_id,omitempty"` Address *StockLocationAddressInput `json:"address,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
*
- @schema AdminPostStockLocationsReq
- type: object
- description: "The details of the stock location to create."
- required:
- - name
- properties:
- name:
- description: the name of the stock location
- type: string
- address_id:
- description: the ID of an existing stock location address to associate with the stock location. Only required if `address` is not provided.
- type: string
- metadata:
- type: object
- description: An optional key-value map with additional details
- example: {car: "white"}
- externalDocs:
- description: "Learn about the metadata attribute, and how to delete and update it."
- url: "https://docs.medusajs.com/development/entities/overview#metadata-attribute"
- address:
- description: A new stock location address to create and associate with the stock location. Only required if `address_id` is not provided.
- $ref: "#/components/schemas/StockLocationAddressInput"
type CsvParserContext ¶
type DeleteFileType ¶
type DeleteFileType struct {
FileKey string
}
type FileServiceUploadResult ¶
type FilterableStockLocation ¶
type GetUploadedFileType ¶
type IBatchJobStrategy ¶
type ICacheService ¶
type ICartCompletionStrategy ¶
type ICartCompletionStrategy interface {
Complete(cartId uuid.UUID, idempotencyKey *models.IdempotencyKey, context types.RequestContext) (*CartCompletionResponse, *utils.ApplictaionError)
}
type ICsvValidator ¶
type ICsvValidator interface {
Validate(value interface{}, context CsvParserContext) (bool, error)
}
type IFileService ¶
type IFileService interface { Upload(file *multipart.FileHeader) (*FileServiceUploadResult, *utils.ApplictaionError) UploadProtected(file *multipart.FileHeader) (*FileServiceUploadResult, *utils.ApplictaionError) Delete(fileData DeleteFileType) *utils.ApplictaionError GetUploadStreamDescriptor(fileData UploadStreamDescriptorType) (*FileServiceGetUploadStreamResult, *utils.ApplictaionError) GetDownloadStream(fileData GetUploadedFileType) (io.ReadCloser, *utils.ApplictaionError) GetPresignedDownloadUrl(fileData GetUploadedFileType) (string, *utils.ApplictaionError) }
type IFulfillmentService ¶
type IFulfillmentService interface { GetIdentifier() string GetFulfillmentOptions() (map[string]interface{}, *utils.ApplictaionError) ValidateFulfillmentData(optionData *models.ShippingOption, data map[string]interface{}, cart *models.Cart) map[string]interface{} ValidateOption(data models.ShippingOption) bool CanCalculate(data map[string]interface{}) bool CalculatePrice(optionData *models.ShippingOption, data map[string]interface{}, cart *models.Cart) float64 CreateFulfillment(data *models.ShippingMethod, items []models.LineItem, order *types.CreateFulfillmentOrder, fulfillment *models.Fulfillment) core.JSONB CancelFulfillment(fulfillment *models.Fulfillment) *models.Fulfillment GetFulfillmentDocuments(data interface{}) []interface{} CreateReturn(fromData *models.Return) core.JSONB GetReturnDocuments(data interface{}) []interface{} GetShipmentDocuments(data interface{}) []interface{} RetrieveDocuments(fulfillmentData map[string]interface{}, documentType string) map[string]interface{} }
type IInventoryService ¶
type IInventoryService interface { ListInventoryItems(context context.Context, selector FilterableInventoryItemProps, config *sql.Options) ([]InventoryItemDTO, *int64, *utils.ApplictaionError) ListReservationItems(context context.Context, selector FilterableReservationItemProps, config *sql.Options) ([]ReservationItemDTO, *int64, *utils.ApplictaionError) ListInventoryLevels(context context.Context, selector FilterableInventoryLevelProps, config *sql.Options) ([]InventoryLevelDTO, *int64, *utils.ApplictaionError) RetrieveInventoryItem(context context.Context, inventoryItemId uuid.UUID, config *sql.Options) (InventoryItemDTO, *utils.ApplictaionError) RetrieveInventoryLevel(context context.Context, inventoryItemId uuid.UUID, locationId string) (InventoryLevelDTO, *utils.ApplictaionError) RetrieveReservationItem(context context.Context, reservationId uuid.UUID) (ReservationItemDTO, *utils.ApplictaionError) CreateReservationItem(context context.Context, input CreateReservationItemInput) (ReservationItemDTO, *utils.ApplictaionError) CreateReservationItems(context context.Context, input []CreateReservationItemInput) ([]ReservationItemDTO, *utils.ApplictaionError) CreateInventoryItem(context context.Context, input CreateInventoryItemInput) (InventoryItemDTO, *utils.ApplictaionError) CreateInventoryItems(context context.Context, input []CreateInventoryItemInput) ([]InventoryItemDTO, *utils.ApplictaionError) CreateInventoryLevel(context context.Context, data CreateInventoryLevelInput) (InventoryLevelDTO, *utils.ApplictaionError) CreateInventoryLevels(context context.Context, data []CreateInventoryLevelInput) ([]InventoryLevelDTO, *utils.ApplictaionError) UpdateInventoryLevels(context context.Context, updates []BulkUpdateInventoryLevelInput) ([]InventoryLevelDTO, *utils.ApplictaionError) UpdateInventoryLevel(context context.Context, inventoryItemId uuid.UUID, locationId string, update UpdateInventoryLevelInput) (InventoryLevelDTO, *utils.ApplictaionError) UpdateInventoryItem(context context.Context, inventoryItemId uuid.UUID, input CreateInventoryItemInput) (InventoryItemDTO, *utils.ApplictaionError) UpdateReservationItem(context context.Context, reservationItemId uuid.UUID, input UpdateReservationItemInput) (ReservationItemDTO, *utils.ApplictaionError) DeleteReservationItemsByLineItem(context context.Context, lineItemId uuid.UUIDs) *utils.ApplictaionError DeleteReservationItem(context context.Context, reservationItemId uuid.UUIDs) *utils.ApplictaionError DeleteInventoryItem(context context.Context, inventoryItemId uuid.UUID) *utils.ApplictaionError RestoreInventoryItem(context context.Context, inventoryItemId uuid.UUID) *utils.ApplictaionError DeleteInventoryItemLevelByLocationID(context context.Context, locationId string) *utils.ApplictaionError DeleteReservationItemByLocationID(context context.Context, locationId string) *utils.ApplictaionError DeleteInventoryLevel(context context.Context, inventoryItemId uuid.UUID, locationId string) *utils.ApplictaionError AdjustInventory(context context.Context, inventoryItemId uuid.UUID, locationId uuid.UUID, adjustment int) (InventoryLevelDTO, *utils.ApplictaionError) ConfirmInventory(context context.Context, inventoryItemId uuid.UUID, locationIds uuid.UUIDs, quantity int) (bool, *utils.ApplictaionError) RetrieveAvailableQuantity(context context.Context, inventoryItemId uuid.UUID, locationIds uuid.UUIDs) (int, *utils.ApplictaionError) RetrieveStockedQuantity(context context.Context, inventoryItemId uuid.UUID, locationIds uuid.UUIDs) (int, *utils.ApplictaionError) RetrieveReservedQuantity(context context.Context, inventoryItemId uuid.UUID, locationIds uuid.UUIDs) (int, *utils.ApplictaionError) }
type INotificationService ¶
type INotificationService interface { SendNotification(event string, data interface{}, attachmentGenerator interface{}) (*ReturnedData, error) ResendNotification(notification interface{}, config interface{}, attachmentGenerator interface{}) (*ReturnedData, error) }
type IOauthService ¶
type IOauthService interface { GenerateToken(code string) (map[string]interface{}, error) RefreshToken(code string) (map[string]interface{}, error) DestroyToken(code string) (map[string]interface{}, error) }
IOauthService is an interface for file connectors
type IParser ¶
type IParser interface { // Parse parses the readable stream with the given options Parse(readableStream io.Reader, options interface{}) ([]interface{}, error) }
IParser is the generic parsing interface. All different parsing implementations (csv, json, etc.) should implement this interface
type IPaymentProcessor ¶
type IPaymentProcessor interface { GetIdentifier() string InitiatePayment(context *PaymentProcessorContext) (*PaymentProcessorSessionResponse, *PaymentProcessorError) UpdatePayment(context *PaymentProcessorContext) (*PaymentProcessorSessionResponse, *PaymentProcessorError) RefundPayment(paymentSessionData map[string]interface{}, refundAmount float64) (map[string]interface{}, *PaymentProcessorError) AuthorizePayment(paymentSessionData map[string]interface{}, context map[string]interface{}) (*models.PaymentSessionStatus, map[string]interface{}, *PaymentProcessorError) CapturePayment(paymentSessionData map[string]interface{}) (map[string]interface{}, *PaymentProcessorError) DeletePayment(paymentSessionData map[string]interface{}) (map[string]interface{}, *PaymentProcessorError) RetrievePayment(paymentSessionData map[string]interface{}) (map[string]interface{}, *PaymentProcessorError) CancelPayment(paymentSessionData map[string]interface{}) (map[string]interface{}, *PaymentProcessorError) GetPaymentStatus(paymentSessionData map[string]interface{}) (*models.PaymentSessionStatus, *PaymentProcessorError) UpdatePaymentData(sessionId uuid.UUID, data map[string]interface{}) (map[string]interface{}, *PaymentProcessorError) RetrieveSavedMethods(customer *models.Customer) []types.PaymentMethod }
type IPriceSelectionStrategy ¶
type IPriceSelectionStrategy interface { CalculateVariantPrice(data []Pricing, context *PricingContext) (map[uuid.UUID]PriceSelectionResult, *utils.ApplictaionError) OnVariantsPricesUpdate(variantIds uuid.UUIDs) error }
type IPricingModuleService ¶
type IPricingModuleService interface { CalculatePrices(sharedContext context.Context, context map[string]interface{}, ids uuid.UUIDs) ([]CalculatedPriceSet, *utils.ApplictaionError) Retrieve(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (PriceSet, *utils.ApplictaionError) List(sharedContext context.Context, context map[string]interface{}, filters PriceSet, config *sql.Options) ([]PriceSet, *utils.ApplictaionError) ListAndCount(sharedContext context.Context, context map[string]interface{}, filters PriceSet, config *sql.Options) ([]PriceSet, *int64, *utils.ApplictaionError) Create(sharedContext context.Context, context map[string]interface{}, data PriceSet) (PriceSet, *utils.ApplictaionError) Creates(sharedContext context.Context, context map[string]interface{}, data []PriceSet) ([]PriceSet, *utils.ApplictaionError) Update(sharedContext context.Context, context map[string]interface{}, data []PriceSet) ([]PriceSet, *utils.ApplictaionError) RemoveRules(sharedContext context.Context, context map[string]interface{}, data []PriceSet) *utils.ApplictaionError Delete(sharedContext context.Context, context map[string]interface{}, ids []string) *utils.ApplictaionError AddPrice(sharedContext context.Context, context map[string]interface{}, data PriceSet) (PriceSet, *utils.ApplictaionError) AddPrices(sharedContext context.Context, context map[string]interface{}, data []PriceSet) ([]PriceSet, *utils.ApplictaionError) AddRule(sharedContext context.Context, context map[string]interface{}, data RuleType) (PriceSet, *utils.ApplictaionError) AddRules(sharedContext context.Context, context map[string]interface{}, data []RuleType) ([]PriceSet, *utils.ApplictaionError) RetrieveMoneyAmount(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (models.MoneyAmount, *utils.ApplictaionError) ListMoneyAmounts(sharedContext context.Context, context map[string]interface{}, filters models.MoneyAmount, config *sql.Options) ([]models.MoneyAmount, *utils.ApplictaionError) ListAndCountMoneyAmounts(sharedContext context.Context, context map[string]interface{}, filters models.MoneyAmount, config *sql.Options) ([]models.MoneyAmount, *int64, *utils.ApplictaionError) CreateMoneyAmounts(sharedContext context.Context, context map[string]interface{}, data []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError) UpdateMoneyAmounts(sharedContext context.Context, context map[string]interface{}, data []models.MoneyAmount) ([]models.MoneyAmount, *utils.ApplictaionError) DeleteMoneyAmounts(sharedContext context.Context, context map[string]interface{}, ids []string) *utils.ApplictaionError RetrieveCurrency(sharedContext context.Context, context map[string]interface{}, code string, config *sql.Options) (models.Currency, *utils.ApplictaionError) ListCurrencies(sharedContext context.Context, context map[string]interface{}, filters models.Currency, config *sql.Options) ([]models.Currency, *utils.ApplictaionError) ListAndCountCurrencies(sharedContext context.Context, context map[string]interface{}, filters models.Currency, config *sql.Options) ([]models.Currency, *int64, *utils.ApplictaionError) CreateCurrencies(sharedContext context.Context, context map[string]interface{}, data []models.Currency) ([]models.Currency, *utils.ApplictaionError) UpdateCurrencies(sharedContext context.Context, context map[string]interface{}, data []models.Currency) ([]models.Currency, *utils.ApplictaionError) DeleteCurrencies(sharedContext context.Context, context map[string]interface{}, currencyCodes []string) *utils.ApplictaionError RetrieveRuleType(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (RuleType, *utils.ApplictaionError) ListRuleTypes(sharedContext context.Context, context map[string]interface{}, filters RuleType, config *sql.Options) ([]RuleType, *utils.ApplictaionError) ListAndCountRuleTypes(sharedContext context.Context, context map[string]interface{}, filters RuleType, config *sql.Options) ([]RuleType, *int64, *utils.ApplictaionError) CreateRuleTypes(sharedContext context.Context, context map[string]interface{}, data []RuleType) ([]RuleType, *utils.ApplictaionError) UpdateRuleTypes(sharedContext context.Context, context map[string]interface{}, data []RuleType) ([]RuleType, *utils.ApplictaionError) DeleteRuleTypes(sharedContext context.Context, context map[string]interface{}, ruleTypeIds []string) *utils.ApplictaionError RetrievePriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (PriceSetMoneyAmountRules, *utils.ApplictaionError) ListPriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, filters PriceSetMoneyAmount, config *sql.Options) ([]PriceSetMoneyAmountRules, *utils.ApplictaionError) ListAndCountPriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, filters PriceSetMoneyAmount, config *sql.Options) ([]PriceSetMoneyAmountRules, *int64, *utils.ApplictaionError) ListPriceSetMoneyAmounts(sharedContext context.Context, context map[string]interface{}, filters PriceSetMoneyAmount, config *sql.Options) ([]PriceSetMoneyAmount, *utils.ApplictaionError) ListAndCountPriceSetMoneyAmounts(sharedContext context.Context, context map[string]interface{}, filters PriceSetMoneyAmount, config *sql.Options) ([]PriceSetMoneyAmount, *int64, *utils.ApplictaionError) CreatePriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, data []PriceSetMoneyAmount) ([]PriceSetMoneyAmountRules, *utils.ApplictaionError) UpdatePriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, data []PriceSetMoneyAmount) ([]PriceSetMoneyAmountRules, *utils.ApplictaionError) DeletePriceSetMoneyAmountRules(sharedContext context.Context, context map[string]interface{}, ids []string) *utils.ApplictaionError RetrievePriceRule(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (PriceRule, *utils.ApplictaionError) ListPriceRules(sharedContext context.Context, context map[string]interface{}, filters PriceRule, config *sql.Options) ([]PriceRule, *utils.ApplictaionError) ListAndCountPriceRules(sharedContext context.Context, context map[string]interface{}, filters PriceRule, config *sql.Options) ([]PriceRule, *int64, *utils.ApplictaionError) CreatePriceRules(sharedContext context.Context, context map[string]interface{}, data []PriceRule) ([]PriceRule, *utils.ApplictaionError) UpdatePriceRules(sharedContext context.Context, context map[string]interface{}, data []PriceRule) ([]PriceRule, *utils.ApplictaionError) DeletePriceRules(sharedContext context.Context, context map[string]interface{}, priceRuleIds []string) *utils.ApplictaionError RetrievePriceList(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (models.PriceList, *utils.ApplictaionError) ListPriceLists(sharedContext context.Context, context map[string]interface{}, filters models.PriceList, config *sql.Options) ([]models.PriceList, *utils.ApplictaionError) ListAndCountPriceLists(sharedContext context.Context, context map[string]interface{}, filters models.PriceList, config *sql.Options) ([]models.PriceList, *int64, *utils.ApplictaionError) CreatePriceLists(sharedContext context.Context, context map[string]interface{}, data []models.PriceList) ([]models.PriceList, *utils.ApplictaionError) UpdatePriceLists(sharedContext context.Context, context map[string]interface{}, data []models.PriceList) ([]models.PriceList, *utils.ApplictaionError) DeletePriceLists(sharedContext context.Context, context map[string]interface{}, priceListIds []string) *utils.ApplictaionError RetrievePriceListRule(sharedContext context.Context, context map[string]interface{}, id uuid.UUID, config *sql.Options) (PriceListRule, *utils.ApplictaionError) ListPriceListRules(sharedContext context.Context, context map[string]interface{}, filters PriceListRule, config *sql.Options) ([]PriceListRule, *utils.ApplictaionError) ListAndCountPriceListRules(sharedContext context.Context, context map[string]interface{}, filters PriceListRule, config *sql.Options) ([]PriceListRule, *int64, *utils.ApplictaionError) CreatePriceListRules(sharedContext context.Context, context map[string]interface{}, data []PriceListRule) ([]PriceListRule, *utils.ApplictaionError) UpdatePriceListRules(sharedContext context.Context, context map[string]interface{}, data []PriceListRule) ([]PriceListRule, *utils.ApplictaionError) DeletePriceListRules(sharedContext context.Context, context map[string]interface{}, priceListRuleIds []string) *utils.ApplictaionError AddPriceListPrices(sharedContext context.Context, context map[string]interface{}, data []AddPriceListPrices) ([]models.PriceList, *utils.ApplictaionError) SetPriceListRules(sharedContext context.Context, context map[string]interface{}, data PriceListRule) (models.PriceList, *utils.ApplictaionError) RemovePriceListRules(sharedContext context.Context, context map[string]interface{}, data PriceListRule) (models.PriceList, *utils.ApplictaionError) }
type ISearchService ¶
type ISearchService interface {
// contains filtered or unexported methods
}
type IStockLocationService ¶
type IStockLocationService interface { List(context context.Context, selector FilterableStockLocation, config *sql.Options) ([]StockLocationDTO, *utils.ApplictaionError) ListAndCount(context context.Context, selector FilterableStockLocation, config *sql.Options) ([]StockLocationDTO, *int64, *utils.ApplictaionError) Retrieve(context context.Context, id uuid.UUID, config *sql.Options) (StockLocationDTO, *utils.ApplictaionError) Create(context context.Context, input CreateStockLocationInput) (StockLocationDTO, *utils.ApplictaionError) Update(context context.Context, id uuid.UUID, input UpdateStockLocationInput) (StockLocationDTO, *utils.ApplictaionError) Delete(context context.Context, id uuid.UUID) *utils.ApplictaionError }
type ITaxCalculationStrategy ¶
type ITaxCalculationStrategy interface {
Calculate(items []models.LineItem, taxLines []interface{}, calculationContext *TaxCalculationContext) float64
}
type ITaxService ¶
type ITaxService interface {
GetTaxLines(itemLines []ItemTaxCalculationLine, shippingLines []ShippingTaxCalculationLine, context *TaxCalculationContext) ([]types.ProviderTaxLine, *utils.ApplictaionError)
}
type InventoryItemDTO ¶
type InventoryLevelDTO ¶
type ItemTaxCalculationLine ¶
type ItemTaxCalculationLine struct { Item models.LineItem Rates []types.TaxServiceRate }
type LineContext ¶
type LineContext struct { LineNumber int Line interface{} }
type ModuleJoinerConfig ¶
type PaymentProcessorContext ¶
type PaymentProcessorError ¶
type PriceListRule ¶
type PriceListRuleValue ¶
type PriceListRuleValue struct { // The price list rule value's ID. Id uuid.UUID `json:"id"` // The rule's value. Value string `json:"value"` // The associated price list rule. PriceListRule PriceListRule `json:"price_list_rule"` }
type PriceSelectionResult ¶
type PriceSet ¶
type PriceSet struct { // The ID of the price set. Id uuid.UUID `json:"id"` // The prices that belong to this price set. MoneyAmounts []models.MoneyAmount `json:"money_amounts,omitempty"` // The rule types applied on this price set. RuleTypes []RuleType `json:"rule_types,omitempty"` }
type PriceSetMoneyAmount ¶
type PriceSetMoneyAmount struct { Id uuid.UUID Title string PriceSet PriceSet PriceList models.PriceList PriceSetId uuid.UUIDs PriceRules []PriceRule MoneyAmount models.MoneyAmount }
PriceSetMoneyAmount represents the data transfer object for price set money amount
type PriceSetMoneyAmountRules ¶
type PriceSetMoneyAmountRules struct { Id uuid.UUID PriceSetMoneyAmount PriceSetMoneyAmount RuleType RuleType Value string }
PriceSetMoneyAmountRules represents the data transfer object for price set money amount rules
type PricingContext ¶
type ProductPricing ¶
type ProductPricing struct { ProductId uuid.UUID Variants []models.ProductVariant }
type ReservationItemDTO ¶
type ReserveQuantityContext ¶
type ReturnedData ¶
type RuleType ¶
type RuleType struct { // The ID of the rule type. Id uuid.UUID `json:"id"` // The display name of the rule type. Name string `json:"name"` // The unique name used to later identify the rule_attribute. For example, it can be used in the `context` parameter of // the `calculatePrices` method to specify a rule for calculating the price. RuleAttribute string `json:"rule_attribute"` // The priority of the rule type. This is useful when calculating the price of a price set, and multiple rules satisfy // the provided context. The higher the value, the higher the priority of the rule type. DefaultPriority int `json:"default_priority"` }
type SharedContext ¶
type SharedContext struct {}
type ShippingTaxCalculationLine ¶
type ShippingTaxCalculationLine struct { ShippingMethod models.ShippingMethod Rates []types.TaxServiceRate }
type StockLocationAddressDTO ¶
type StockLocationAddressDTO struct { Id uuid.UUID `json:"id,omitempty"` Address1 string `json:"address_1"` Address2 *string `json:"address_2,omitempty"` Company *string `json:"company,omitempty"` City *string `json:"city,omitempty"` CountryCode string `json:"country_code"` Phone *string `json:"phone,omitempty"` PostalCode *string `json:"postal_code,omitempty"` Province *string `json:"province,omitempty"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt *string `json:"deleted_at,omitempty"` Metadata core.JSONB `json:"metadata,omitempty"` }
type StockLocationAddressInput ¶
type StockLocationAddressInput struct { Address1 string `json:"address_1"` Address2 *string `json:"address_2,omitempty"` City *string `json:"city,omitempty"` CountryCode string `json:"country_code"` Phone *string `json:"phone,omitempty"` PostalCode *string `json:"postal_code,omitempty"` Province *string `json:"province,omitempty"` Metadata core.JSONB `json:"metadata,omitempty"` }
*
- @schema AdminPostStockLocationsReqAddress
- type: object
- required:
- - address_1
- - country_code
- properties:
- address_1:
- type: string
- description: Stock location address
- example: 35, Jhon Doe Ave
- address_2:
- type: string
- description: Stock location address' complement
- example: apartment 4432
- company:
- type: string
- description: Stock location address' company
- city:
- type: string
- description: Stock location address' city
- example: Mexico city
- country_code:
- description: "The two character ISO code for the country."
- type: string
- externalDocs:
- url: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
- description: See a list of codes.
- phone:
- type: string
- description: Stock location address' phone number
- example: +1 555 61646
- postal_code:
- type: string
- description: Stock location address' postal code
- example: HD3-1G8
- province:
- type: string
- description: Stock location address' province
- example: Sinaloa
type StockLocationDTO ¶
type StockLocationDTO struct { Id uuid.UUID `json:"id"` Name string `json:"name"` Metadata map[string]interface{} `json:"metadata,omitempty"` AddressID string `json:"address_id"` Address *StockLocationAddressDTO `json:"address,omitempty"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` DeletedAt *string `json:"deleted_at,omitempty"` }
type StockLocationExpandedDTO ¶
type StockLocationExpandedDTO struct { StockLocationDTO SalesChannels []interface{} `json:"sales_channels,omitempty"` }
type StringComparisonOperator ¶
type StringComparisonOperator string
type TaxCalculationContext ¶
type UpdateStockLocationInput ¶
type UpdateStockLocationInput struct { Name *string `json:"name,omitempty"` AddressID *string `json:"address_id,omitempty"` Address *StockLocationAddressInput `json:"address,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
*
- @schema AdminPostStockLocationsLocationReq
- type: object
- description: "The details to update of the stock location."
- properties:
- name:
- description: the name of the stock location
- type: string
- address_id:
- description: the stock location address ID
- type: string
- metadata:
- type: object
- description: An optional key-value map with additional details
- example: {car: "white"}
- externalDocs:
- description: "Learn about the metadata attribute, and how to delete and update it."
- url: "https://docs.medusajs.com/development/entities/overview#metadata-attribute"
- address:
- description: The data of an associated address to create or update.
- $ref: "#/components/schemas/StockLocationAddressInput"
Source Files
¶
- abstract-parser.go
- batch-job-strategy.go
- cache-service.go
- cart-completion-strategy.go
- csv-parser.go
- file-service.go
- fulfillment-service.go
- inventory.go
- migration.go
- migrator.go
- notification-service.go
- oauth-service.go
- payment-processor.go
- price-module.go
- price-selection-strategy.go
- search.go
- stock-location.go
- tax-calculation-strategy.go
- tax-service.go
Click to show internal directories.
Click to hide internal directories.