Skip to content

Commit

Permalink
Specify enum values for status in GetFBOReturns method
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm committed Jul 6, 2023
1 parent f54aa64 commit 7adaa92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 15 additions & 0 deletions ozon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,3 +464,18 @@ const (
CancelledWithCompensation GetFBSReturnsFilterStatus = "cancelled_with_compensation"
ReadyForShipment GetFBSReturnsFilterStatus = "ready_for_shipment"
)

type GetFBOReturnsFilterStatus string

const (
GetFBOReturnsFilterStatusReturnedToOzon GetFBOReturnsFilterStatus = "ReturnedToOzon"
GetFBOReturnsFilterStatusCancelled GetFBOReturnsFilterStatus = "Cancelled"
)

type GetFBOReturnsReturnStatus string

const (
GetFBOReturnsReturnStatusCancelled GetFBOReturnsReturnStatus = "Возврат отменен"
GetFBOReturnsReturnStatusAcceptedFromCustomer GetFBOReturnsReturnStatus = "Принят от покупателя"
GetFBOReturnsReturnStatusReceivedAtOzon GetFBOReturnsReturnStatus = "Получен в Ozon"
)
5 changes: 3 additions & 2 deletions ozon/returns.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ type GetFBOReturnsFilter struct {
// Shipment number
PostingNumber string `json:"posting_number"`

Status []string `json:"status"`
// Return status
Status []GetFBOReturnsFilterStatus `json:"status"`
}

type GetFBOReturnsResponse struct {
Expand Down Expand Up @@ -73,7 +74,7 @@ type GetFBOReturnsReturn struct {
SKU int64 `json:"sku"`

// Return status
Status string `json:"status_name"`
Status GetFBOReturnsReturnStatus `json:"status_name"`
}

// Method for getting information on returned products that are sold from the Ozon warehouse
Expand Down

0 comments on commit 7adaa92

Please sign in to comment.