Documentation ¶
Index ¶
- Constants
- type AuthResponse
- type AuthService
- type Callback
- type Client
- func (c *Client) Delete(ctx context.Context, uri string, content interface{}) (*Response, error)
- func (c *Client) Get(ctx context.Context, uri string, options interface{}) (*Response, error)
- func (c Client) GetHost() string
- func (c Client) GetRequestHeaders() http.Header
- func (c *Client) Post(ctx context.Context, uri string, content interface{}) (*Response, error)
- func (c *Client) Put(ctx context.Context, uri string, content interface{}) (*Response, error)
- func (c *Client) SetAccessToken(accessToken string, expireAt *string)
- type Config
- type FeedService
- type FulfillmentService
- type GetTokenDetailResponse
- type InventoryService
- type OrderService
- type Response
- type Token
Constants ¶
View Source
const ( AuthenticateBasePath = "/v3/token" GetTokenDetailBasePath = "/v3/token/detail" )
View Source
const ( RequestAuthContentType = "application/x-www-form-urlencoded" RequestContentType = "application/json" RequestAccept = "application/json" BaseUrlProd = "https://marketplace.walmartapis.com/" BaseUrlSandbox = "https://sandbox.walmartapis.com" GetAccessTokenUri = "v3/token" )
View Source
const ( FulfillmentBasePath = "/v3/fulfillment" FulfillmentInboundShipmentBasePath = FulfillmentBasePath + "/inbound-shipments" FulfillmentInboundShipmentErrorsBasePath = FulfillmentBasePath + "/inbound-shipment-errors" FulfillmentInboundShipmentItemsBasePath = FulfillmentBasePath + "/inbound-shipment-items" FulfillmentShipmentQuantitiesBasePath = FulfillmentBasePath + "/shipment-quantities" FulfillmentShipmentLabelBasePath = FulfillmentBasePath + "/label" FulfillmentShipmentTrackingBasePath = FulfillmentBasePath + "/shipment-tracking" )
View Source
const ( GetInventoryBasePath = "/v3/inventory" UpdateInventoryBasePath = "/v3/inventory" )
View Source
const ( AcknowledgeOrderBasePath = "/v3/orders/%s/acknowledge" ShipOrderBasePath = "/v3/orders/%s/shipping" CancelOrderBasePath = "/v3/orders/%s/cancel" GetReleasedOrdersBasePath = "/v3/orders/released" GetAllOrdersBasePath = "/v3/orders" )
View Source
const (
FeedBasePath = "/v3/feeds"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResponse ¶
type AuthService ¶
type AuthService interface { Authenticate(ctx context.Context) (*AuthResponse, error) GetTokenDetail(ctx context.Context) (*GetTokenDetailResponse, error) }
func NewAuthService ¶
func NewAuthService(client *Client) AuthService
type Client ¶
type Client struct { Config Config Token *Token InventoryService AuthService OrderService FeedService FulfillmentService // contains filtered or unexported fields }
func (Client) GetRequestHeaders ¶
func (*Client) SetAccessToken ¶
type FeedService ¶
type FeedService interface {
ConvertItemsForWFS(ctx context.Context, content feed_dto.ConvertItemsPayload) (*feed_dto.ConvertItemsResponse, error)
}
func NewFeedService ¶
func NewFeedService(client *Client) FeedService
type FulfillmentService ¶
type FulfillmentService interface { CreateInboundShipment(ctx context.Context, content fulfillment_dto.CreateInboundShipmentPayload) (*fulfillment_dto.CreateInboundShipmentResponse, error) GetInboundShipmentErrors(ctx context.Context, params fulfillment_dto.GetInboundShipmentErrorsParams) (*fulfillment_dto.GetInboundShipmentErrorsResponse, error) GetShipments(ctx context.Context, params fulfillment_dto.GetShipmentParams) (*fulfillment_dto.GetShipmentResponse, error) GetInboundShipmentItems(ctx context.Context, params fulfillment_dto.GetInboundShipmentItemsParams) (*fulfillment_dto.GetInboundShipmentItemsResponse, error) UpdateShipmentQuantities(ctx context.Context, params fulfillment_dto.UpdateShipmentQuantitiesPayload) (*fulfillment_dto.BasicResponse, error) CreateInboundShipmentLabel(ctx context.Context, shipmentID string) error UpdateShipmentTracking(ctx context.Context, content fulfillment_dto.UpdateShipmentTrackingPayload) (*fulfillment_dto.BasicResponse, error) CancelInboundShipment(ctx context.Context, inboundOrderId string) (*fulfillment_dto.BasicResponse, error) }
func NewFulfillmentService ¶
func NewFulfillmentService(client *Client) FulfillmentService
type GetTokenDetailResponse ¶
type GetTokenDetailResponse struct { ExpireAt string `json:"expire_at"` IssuedAt string `json:"issued_at"` IsValid bool `json:"is_valid"` Scopes struct { Reports string `json:"reports"` Item string `json:"item"` Price string `json:"price"` Lagtime string `json:"lagtime"` Feeds string `json:"feeds"` Returns string `json:"returns"` Orders string `json:"orders"` Inventory string `json:"inventory"` Content string `json:"content"` } `json:"scopes"` }
type InventoryService ¶
type InventoryService interface { GetInventory(ctx context.Context, params inventory_dto.InventoryGetParams) (*inventory_dto.InventoryResponse, error) UpdateInventory(ctx context.Context, content inventory_dto.InventoryUpdatePayload) (*inventory_dto.InventoryResponse, error) }
func NewInventoryService ¶
func NewInventoryService(client *Client) InventoryService
type OrderService ¶
type OrderService interface { Acknowledge(ctx context.Context, purchaseOrderID string) (*order_dto.OrderResponse, error) Ship(ctx context.Context, purchaseOrderID string, payload order_dto.OrderShipmentPayload) (*order_dto.OrderResponse, error) Cancel(ctx context.Context, purchaseOrderID string, payload order_dto.OrderCancellationPayload) (*order_dto.OrderResponse, error) GetReleasedOrders(ctx context.Context, params *order_dto.GetReleasedOrdersParams, nextCursor *string) (*order_dto.OrdersResponse, error) GetAllOrders(ctx context.Context, params *order_dto.GetAllOrdersParams, nextCursor *string) (*order_dto.OrdersResponse, error) }
func NewOrderService ¶
func NewOrderService(client *Client) OrderService
Source Files ¶
Click to show internal directories.
Click to hide internal directories.