Documentation ¶
Index ¶
- type CreateSwap
- func (c *CreateSwap) Create(config *medusa.Config) (*CreateSwapResponse, error)
- func (c *CreateSwap) SetAdditionalItems(items []any) *CreateSwap
- func (c *CreateSwap) SetOrderId(orderId string) *CreateSwap
- func (c *CreateSwap) SetReturnItems(items []any) *CreateSwap
- func (c *CreateSwap) SetReturnShippingOption(shippingOpions string) *CreateSwap
- type CreateSwapData
- type CreateSwapResponse
- type RetrieveSwapData
- type RetrieveSwapResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSwap ¶
type CreateSwap struct { // The ID of the Order to create the Swap for. OrderId string `json:"order_id"` // The items to include in the Return. ReturnItems []any `json:"return_items"` // The items to exchange the returned items to. AdditionalItems []any `json:"additional_items"` // The ID of the Shipping Option to create the Shipping Method from. ReturnShippingOption string `json:"return_shipping_option,omitempty"` }
func NewCreateSwap ¶
func NewCreateSwap() *CreateSwap
func (*CreateSwap) Create ¶
func (c *CreateSwap) Create(config *medusa.Config) (*CreateSwapResponse, error)
func (*CreateSwap) SetAdditionalItems ¶
func (c *CreateSwap) SetAdditionalItems(items []any) *CreateSwap
func (*CreateSwap) SetOrderId ¶
func (c *CreateSwap) SetOrderId(orderId string) *CreateSwap
func (*CreateSwap) SetReturnItems ¶
func (c *CreateSwap) SetReturnItems(items []any) *CreateSwap
func (*CreateSwap) SetReturnShippingOption ¶
func (c *CreateSwap) SetReturnShippingOption(shippingOpions string) *CreateSwap
type CreateSwapData ¶
type CreateSwapResponse ¶
type CreateSwapResponse struct { // Success response Data *CreateSwapData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
type RetrieveSwapData ¶
type RetrieveSwapResponse ¶
type RetrieveSwapResponse struct { // Success response Data *RetrieveSwapData // Error response Error *response.Error // Errors in case of multiple errors Errors *response.Errors }
func RetrieveByCartId ¶
func RetrieveByCartId(cartId string, config *medusa.Config) (*RetrieveSwapResponse, error)
Click to show internal directories.
Click to hide internal directories.