Skip to content

Commit

Permalink
Update October 16, 2024 (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
diPhantxm authored Oct 31, 2024
1 parent b6af642 commit 2164eff
Show file tree
Hide file tree
Showing 5 changed files with 519 additions and 1 deletion.
106 changes: 106 additions & 0 deletions ozon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -809,3 +809,109 @@ const (
PaymentTypeGroupPaymentToCurrentAccount PaymentTypeGroupName = "payment to current account"
PaymentTypeGroupSberpay PaymentTypeGroupName = "Sberpay"
)

type VisualStatus string

const (
// dispute with the customer has been opened
VisualStatusDisputeOpened VisualStatus = "DisputeOpened"

// pending with the seller
VisualStatusOnSellerApproval VisualStatus = "OnSellerApproval"

// at the pick-up point
VisualStatusArrivedAtReturnPlace VisualStatus = "ArrivedAtReturnPlace"

// pending clarification by the seller
VisualStatusOnSellerClarification VisualStatus = "OnSellerClarification"

// pending clarification by the seller after partial compensation
VisualStatusOnSellerClarificationPartial VisualStatus = "OnSellerClarificationAfterPartialCompensation"

// partial compensation offered
VisualStatusOfferedPartial VisualStatus = "OfferedPartialCompensation"

// refund approved
VisualStatusReturnMoneyApproved VisualStatus = "ReturnMoneyApproved"

// partial compensation provided
VisualStatusPartialReturned VisualStatus = "PartialCompensationReturned"

// refund rejected, dispute isn't opened
VisualStatusCancelledDisputeNotOpen VisualStatus = "CancelledDisputeNotOpen"

// request rejected
VisualStatusRejected VisualStatus = "Rejected"

// request rejected by Ozon
VisualStatusCrmRejected VisualStatus = "CrmRejected"

// request canceled
VisualStatusCancelled VisualStatus = "Cancelled"

// request approved by the seller
VisualStatusApproved VisualStatus = "Approved"

// request approved by Ozon
VisualStatusApprovedByOzon VisualStatus = "ApprovedByOzon"

// seller received the return
VisualStatusReceivedBySeller VisualStatus = "ReceivedBySeller"

// return is on its way to the seller
VisualStatusMovingToSeller VisualStatus = "MovingToSeller"

// seller received the refund
VisualStatusReturnCompensated VisualStatus = "ReturnCompensated"

// courier is taking the return to the seller
VisualStatusReturningByCourier VisualStatus = "ReturningByCourier"

// on disposal
VisualStatusUtilizing VisualStatus = "Utilizing"

// disposed of
VisualStatusUtilized VisualStatus = "Utilized"

// customer received full refund
VisualStatusMoneyReturned VisualStatus = "MoneyReturned"

// partial refund has been approved
VisualStatusPartialInProcess VisualStatus = "PartialCompensationInProcess"

// seller opened a dispute
VisualStatusDisputeYouOpened VisualStatus = "DisputeYouOpened"

// compensation rejected
VisualStatusCompensationRejected VisualStatus = "CompensationRejected"

// support request sent
VisualStatusDisputeOpening VisualStatus = "DisputeOpening"

// awaiting your decision on compensation
VisualStatusCompensationOffered VisualStatus = "CompensationOffered"

// awaiting compensation
VisualStatusWaitingCompensation VisualStatus = "WaitingCompensation"

// an error occurred when sending the support request
VisualStatusSendingError VisualStatus = "SendingError"

// decision period has expired
VisualStatusCompensationRejectedBySla VisualStatus = "CompensationRejectedBySla"

// seller has refused compensation
VisualStatusCompensationRejectedBySeller VisualStatus = "CompensationRejectedBySeller"

// on the way to the Ozon warehouse
VisualStatusMovingToOzon VisualStatus = "MovingToOzon"

// arrived at the Ozon warehouse
VisualStatusReturnedToOzon VisualStatus = "ReturnedToOzon"

// quick refund
VisualStatusMoneyReturnedBySystem VisualStatus = "MoneyReturnedBySystem"

// awaiting shipping
VisualStatusWaitingShipment VisualStatus = "WaitingShipment"
)
13 changes: 13 additions & 0 deletions ozon/rating.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,26 @@ type GetCurrentSellerRatingInfoResponse struct {
// Rating groups list
Groups []GetCurrentSellerRatingInfoGroup `json:"groups"`

// Localization index details.
// If you had no sales in the last 14 days,
// the parameter fields will be empty
LocalizationIndex []LocalizationIndex `json:"localization_index"`

// An indication that the penalty points balance is exceeded
PenaltyScoreExceeded bool `json:"penalty_score_exceeded"`

// An indication that you participate in the Premium program
Premium bool `json:"premium"`
}

type LocalizationIndex struct {
// Date of localization index calculation
CalculationDate time.Time `json:"calculation_date"`

// Localization index value
LocalizationPercentage int32 `json:"localization_percentage"`
}

type GetCurrentSellerRatingInfoGroup struct {
// Ratings group name
GroupName string `json:"group_name"`
Expand Down
6 changes: 6 additions & 0 deletions ozon/rating_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ func TestGetCurrentRatingInfo(t *testing.T) {
]
}
],
"localization_index": [
{
"calculation_date": "2019-08-24T14:15:22Z",
"localization_percentage": 0
}
],
"penalty_score_exceeded": true,
"premium": true
}`,
Expand Down
Loading

0 comments on commit 2164eff

Please sign in to comment.