return_

package
v1.37.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Types

type Document

type Document struct {
	Id_    string
	UserId string

	ProductIds string

	BillingAddressLine1       string
	BillingAddressLine2       string
	BillingAddressCity        string
	BillingAddressState       string
	BillingAddressCountryCode string
	BillingAddressCountry     string
	BillingAddressPostalCode  string

	ShippingAddressLine1       string
	ShippingAddressLine2       string
	ShippingAddressCity        string
	ShippingAddressState       string
	ShippingAddressCountryCode string
	ShippingAddressCountry     string
	ShippingAddressPostalCode  string

	Type string

	CreatedAt time.Time
	UpdatedAt time.Time

	Currency    string
	Total       float64
	CouponCodes string
	ReferrerId  string

	Status            string
	PaymentStatus     string
	FulfillmentStatus string
	Preorder          string
	Confirmed         string
}

func (Document) Id

func (d Document) Id() string

type Return

type Return struct {
	mixin.Model[Return]

	// Store this was sold from (if any)
	StoreId string `json:"storeId,omitempty"`

	// Associated Crowdstart user or buyer.
	UserId string `json:"userId,omitempty"`

	// Associated order ID, if any
	OrderId string `json:"orderId,omitempty"`

	// External ID
	ExternalID string `json:"externalId,omitempty"`

	// Individual line items
	Items  []lineitem.LineItem `json:"items" datastore:"-"`
	Items_ string              `json:"-" datastore:",noindex"`

	// Fulfillment information
	Fulfillment fulfillment.Fulfillment `json:"fulfillment"`

	// Series of events that have occured relevant to this order
	History []Event `json:"-,omitempty" datastore:",noindex"`

	// Make a custom string for this when we figure out the states...
	Status string `json:"status"`

	// Save notes on order
	Summary string `json:"summary,omitempty"`

	// Arbitrary key/value pairs associated with this order
	Metadata  Map    `json:"metadata" datastore:"-"`
	Metadata_ string `json:"-" datastore:",noindex"`

	CancelledAt time.Time `json:"cancelledAt"`
	CompletedAt time.Time `json:"completedAt"`
	ExpectedAt  time.Time `json:"expectedAt"`
	DeliveredAt time.Time `json:"deliveredAt"`
	PickedUpAt  time.Time `json:"pickedUpAt"`
	ProcessedAt time.Time `json:"processedAt"`
	ReturnedAt  time.Time `json:"returnedAt"`
	SubmittedAt time.Time `json:"submittedAt"`
}

func Fake

func Fake(db *datastore.Datastore, userId string) *Return

func New

func New(db *datastore.Datastore) *Return

func (*Return) Defaults

func (r *Return) Defaults()

func (*Return) Load

func (c *Return) Load(ps []datastore.Property) (err error)

func (*Return) Save

func (c *Return) Save() (ps []datastore.Property, err error)

func (*Return) Validator

func (c *Return) Validator() *val.Validator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL