Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update October 16, 2024 #107

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading