Documentation ¶
Index ¶
- type CreateCustomer
- func (c *CreateCustomer) Create(config *medusa.Config) (*CreateCustomerResponse, error)
- func (c *CreateCustomer) SetEmail(email string) *CreateCustomer
- func (c *CreateCustomer) SetFirstName(firstName string) *CreateCustomer
- func (c *CreateCustomer) SetLastName(lastName string) *CreateCustomer
- func (c *CreateCustomer) SetPassword(password string) *CreateCustomer
- func (c *CreateCustomer) SetPhone(phone string) *CreateCustomer
- type CreateCustomerData
- type CreateCustomerResponse
- type ListOrderData
- type ListOrderQuery
- func (l *ListOrderQuery) List(config *medusa.Config) (*ListOrderResponse, error)
- func (l *ListOrderQuery) SetCancledAt(canceledAt *common.DateComparison) *ListOrderQuery
- func (l *ListOrderQuery) SetCartId(cartId string) *ListOrderQuery
- func (l *ListOrderQuery) SetCreatedAt(createdAt *common.DateComparison) *ListOrderQuery
- func (l *ListOrderQuery) SetCurrencyCode(currencyCode string) *ListOrderQuery
- func (l *ListOrderQuery) SetEmail(email string) *ListOrderQuery
- func (l *ListOrderQuery) SetExpand(expand string) *ListOrderQuery
- func (l *ListOrderQuery) SetFields(fields string) *ListOrderQuery
- func (l *ListOrderQuery) SetFulfillmentStatus(fulfillmentStatus []string) *ListOrderQuery
- func (l *ListOrderQuery) SetId(id []string) *ListOrderQuery
- func (l *ListOrderQuery) SetLimit(limit int) *ListOrderQuery
- func (l *ListOrderQuery) SetOffset(offset int) *ListOrderQuery
- func (l *ListOrderQuery) SetPaymentStatus(paymentStatus []string) *ListOrderQuery
- func (l *ListOrderQuery) SetQ(q string) *ListOrderQuery
- func (l *ListOrderQuery) SetRegionId(regionId string) *ListOrderQuery
- func (l *ListOrderQuery) SetStatus(status []string) *ListOrderQuery
- func (l *ListOrderQuery) SetTaxRate(taxRate string) *ListOrderQuery
- func (l *ListOrderQuery) SetUpdatedAt(updatedAt *common.DateComparison) *ListOrderQuery
- type ListOrderResponse
- type RequestPasswordReset
- type RequestPasswordResetResponse
- type ResetPassword
- type ResetPasswordData
- type ResetPasswordResponse
- type RetrieveCustomerData
- type RetrieveCustomerResponse
- type UpdateCustomer
- func (u *UpdateCustomer) SetBillingAddress(billingAddr any) *UpdateCustomer
- func (u *UpdateCustomer) SetEmail(email string) *UpdateCustomer
- func (u *UpdateCustomer) SetFirstName(firstName string) *UpdateCustomer
- func (u *UpdateCustomer) SetLastName(lastName string) *UpdateCustomer
- func (u *UpdateCustomer) SetMetadata(metaData map[string]any) *UpdateCustomer
- func (u *UpdateCustomer) SetPassword(password string) *UpdateCustomer
- func (u *UpdateCustomer) SetPhone(phone string) *UpdateCustomer
- func (u *UpdateCustomer) Update(config *medusa.Config) (*UpdateCustomerResponse, error)
- type UpdateCustomerData
- type UpdateCustomerResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateCustomer ¶
type CreateCustomer struct { // The Customer's first name. FirstName string `json:"first_name"` // The Customer's last name. LastName string `json:"last_name"` // The email of the customer. Email string `json:"email"` // The Customer's password. Password string `json:"password"` // The Customer's phone number. Phone string `json:"phone,omitempty"` }
func NewCreateCustomer ¶
func NewCreateCustomer() *CreateCustomer
func (*CreateCustomer) Create ¶
func (c *CreateCustomer) Create(config *medusa.Config) (*CreateCustomerResponse, error)
Creates a Customer account.
func (*CreateCustomer) SetEmail ¶
func (c *CreateCustomer) SetEmail(email string) *CreateCustomer
func (*CreateCustomer) SetFirstName ¶
func (c *CreateCustomer) SetFirstName(firstName string) *CreateCustomer
func (*CreateCustomer) SetLastName ¶
func (c *CreateCustomer) SetLastName(lastName string) *CreateCustomer
func (*CreateCustomer) SetPassword ¶
func (c *CreateCustomer) SetPassword(password string) *CreateCustomer
func (*CreateCustomer) SetPhone ¶
func (c *CreateCustomer) SetPhone(phone string) *CreateCustomer
type CreateCustomerData ¶
type CreateCustomerResponse ¶
type CreateCustomerResponse struct { // Success response Data *CreateCustomerData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
type ListOrderData ¶
type ListOrderQuery ¶
type ListOrderQuery struct { // Query used for searching orders. Q string `json:"q,omitempty" url:"q,omitempty"` // Id of the order to search for. Id []string `json:"id,omitempty" url:"id,omitempty"` // The offset in the resulting orders. Offset int `json:"offset" url:"offset"` // How many orders to return. Limit int `json:"limit" url:"limit"` // (Comma separated string) Which relations should be expanded in the resulting orders. Expand string `json:"expand,omitempty" url:"expand,omitempty"` // (Comma separated string) Which fields should be included in the resulting orders. Fields string `json:"fields,omitempty" url:"fields,omitempty"` // Status to search for. Status []string `json:"status,omitempty" url:"status,omitempty"` // Fulfillment status to search for. FulfillmentStatus []string `json:"fulfillment_status,omitempty" url:"fulfillment_status,omitempty"` // Payment status to search for. PaymentStatus []string `json:"payment_status,omitempty" url:"payment_status,omitempty"` // Display id to search for. DisplayId string `json:"display_id,omitempty" url:"display_id,omitempty"` // Cart id CartId string `json:"cart_id,omitempty" url:"cart_id,omitempty"` // Email Email string `json:"email,omitempty" url:"email,omitempty"` // Region id RegionId string `json:"region_id,omitempty" url:"region_id,omitempty"` // The 3 character ISO currency code to set prices based on. CurrencyCode string `json:"currency_code,omitempty" url:"currency_code,omitempty"` // Tax rate TaxRate string `json:"tax_rate,omitempty" url:"tax_rate,omitempty"` // Date comparison for when resulting collections were created. CreatedAt *common.DateComparison `json:"created_at,omitempty" url:"created_at,omitempty"` // Date comparison for when resulting collections were updated. UpdatedAt *common.DateComparison `json:"updated_at,omitempty" url:"updated_at,omitempty"` // Date comparison for when resulting collections were canceled. CanceledAt *common.DateComparison `json:"canceled_at,omitempty" url:"canceled_at,omitempty"` }
func NewListOrderQuery ¶
func NewListOrderQuery() *ListOrderQuery
func (*ListOrderQuery) List ¶
func (l *ListOrderQuery) List(config *medusa.Config) (*ListOrderResponse, error)
Retrieves a list of a Customer's Orders.
func (*ListOrderQuery) SetCancledAt ¶
func (l *ListOrderQuery) SetCancledAt(canceledAt *common.DateComparison) *ListOrderQuery
func (*ListOrderQuery) SetCartId ¶
func (l *ListOrderQuery) SetCartId(cartId string) *ListOrderQuery
func (*ListOrderQuery) SetCreatedAt ¶
func (l *ListOrderQuery) SetCreatedAt(createdAt *common.DateComparison) *ListOrderQuery
func (*ListOrderQuery) SetCurrencyCode ¶
func (l *ListOrderQuery) SetCurrencyCode(currencyCode string) *ListOrderQuery
func (*ListOrderQuery) SetEmail ¶
func (l *ListOrderQuery) SetEmail(email string) *ListOrderQuery
func (*ListOrderQuery) SetExpand ¶
func (l *ListOrderQuery) SetExpand(expand string) *ListOrderQuery
func (*ListOrderQuery) SetFields ¶
func (l *ListOrderQuery) SetFields(fields string) *ListOrderQuery
func (*ListOrderQuery) SetFulfillmentStatus ¶
func (l *ListOrderQuery) SetFulfillmentStatus(fulfillmentStatus []string) *ListOrderQuery
func (*ListOrderQuery) SetId ¶
func (l *ListOrderQuery) SetId(id []string) *ListOrderQuery
func (*ListOrderQuery) SetLimit ¶
func (l *ListOrderQuery) SetLimit(limit int) *ListOrderQuery
func (*ListOrderQuery) SetOffset ¶
func (l *ListOrderQuery) SetOffset(offset int) *ListOrderQuery
func (*ListOrderQuery) SetPaymentStatus ¶
func (l *ListOrderQuery) SetPaymentStatus(paymentStatus []string) *ListOrderQuery
func (*ListOrderQuery) SetQ ¶
func (l *ListOrderQuery) SetQ(q string) *ListOrderQuery
func (*ListOrderQuery) SetRegionId ¶
func (l *ListOrderQuery) SetRegionId(regionId string) *ListOrderQuery
func (*ListOrderQuery) SetStatus ¶
func (l *ListOrderQuery) SetStatus(status []string) *ListOrderQuery
func (*ListOrderQuery) SetTaxRate ¶
func (l *ListOrderQuery) SetTaxRate(taxRate string) *ListOrderQuery
func (*ListOrderQuery) SetUpdatedAt ¶
func (l *ListOrderQuery) SetUpdatedAt(updatedAt *common.DateComparison) *ListOrderQuery
type ListOrderResponse ¶
type ListOrderResponse struct { // Success response Data *ListOrderData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
type RequestPasswordReset ¶
type RequestPasswordReset struct {
Email string `json:"email"`
}
func NewRequestPasswordReset ¶
func NewRequestPasswordReset() *RequestPasswordReset
func (*RequestPasswordReset) RequestReset ¶
func (r *RequestPasswordReset) RequestReset(config *medusa.Config) (*RequestPasswordResetResponse, error)
func (*RequestPasswordReset) SetEmail ¶
func (r *RequestPasswordReset) SetEmail(email string) *RequestPasswordReset
type ResetPassword ¶
type ResetPassword struct { // The email of the customer. Email string `json:"email"` // The Customer's password. Password string `json:"password"` // The reset password token Token string `json:"token"` }
func NewResetPassword ¶
func NewResetPassword() *ResetPassword
func (*ResetPassword) Reset ¶
func (r *ResetPassword) Reset(config *medusa.Config) (*ResetPasswordResponse, error)
Resets a Customer's password using a password token created by a previous /password-token request.
func (*ResetPassword) SetEmail ¶
func (r *ResetPassword) SetEmail(email string) *ResetPassword
func (*ResetPassword) SetPassword ¶
func (r *ResetPassword) SetPassword(password string) *ResetPassword
func (*ResetPassword) SetToken ¶
func (r *ResetPassword) SetToken(token string) *ResetPassword
type ResetPasswordData ¶
type ResetPasswordResponse ¶
type ResetPasswordResponse struct { // Success response Data *ResetPasswordData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
type RetrieveCustomerData ¶
type RetrieveCustomerResponse ¶
type RetrieveCustomerResponse struct { // Success response Data *RetrieveCustomerData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
type UpdateCustomer ¶
type UpdateCustomer struct { // The email of the customer. Email string `json:"email,omitempty"` // The email of the customer. FirstName string `json:"first_name,omitempty"` // The Customer's last name. LastName string `json:"last_name,omitempty"` // The Address to be used for billing purposes. BillingAddress any `json:"billing_address,omitempty"` // The Customer's phone number. Phone string `json:"phone,omitempty"` // The Customer's password. Password string `json:"password,omitempty"` // Metadata about the customer. Metadata map[string]any `json:"metadata,omitempty"` }
func NewUpdateCustomer ¶
func NewUpdateCustomer() *UpdateCustomer
func (*UpdateCustomer) SetBillingAddress ¶
func (u *UpdateCustomer) SetBillingAddress(billingAddr any) *UpdateCustomer
func (*UpdateCustomer) SetEmail ¶
func (u *UpdateCustomer) SetEmail(email string) *UpdateCustomer
func (*UpdateCustomer) SetFirstName ¶
func (u *UpdateCustomer) SetFirstName(firstName string) *UpdateCustomer
func (*UpdateCustomer) SetLastName ¶
func (u *UpdateCustomer) SetLastName(lastName string) *UpdateCustomer
func (*UpdateCustomer) SetMetadata ¶
func (u *UpdateCustomer) SetMetadata(metaData map[string]any) *UpdateCustomer
func (*UpdateCustomer) SetPassword ¶
func (u *UpdateCustomer) SetPassword(password string) *UpdateCustomer
func (*UpdateCustomer) SetPhone ¶
func (u *UpdateCustomer) SetPhone(phone string) *UpdateCustomer
func (*UpdateCustomer) Update ¶
func (u *UpdateCustomer) Update(config *medusa.Config) (*UpdateCustomerResponse, error)
type UpdateCustomerData ¶
type UpdateCustomerResponse ¶
type UpdateCustomerResponse struct { // Success response Data *UpdateCustomerData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
Click to show internal directories.
Click to hide internal directories.