syntax = "proto3";

package wix.catalog.api.v1;

import "wix/api/validations.proto";
import "google/protobuf/wrappers.proto";

option java_package = "com.wix.ecommerce.catalog.api.v1";

message CostAndProfitData {
    // Item cost.
    google.protobuf.DoubleValue item_cost = 1 [(wix.api.min) = 0, (wix.api.max) = 999999999.99];
    // Item cost formatted with currency symbol.
    string formatted_item_cost = 2 [(wix.api.readOnly) = true];
    // Profit. Calculated by reducing `cost` from `discounted_price`.
    double profit = 3 [(wix.api.readOnly) = true, (wix.api.min) = 0, (wix.api.max) = 999999999.99];
    // Profit formatted with currency symbol.
    string formatted_profit = 4 [(wix.api.readOnly) = true];
    // Profit Margin. Calculated by dividing `profit` by `discounted_price`.
    // The result is rounded to 4 decimal places.
    double profit_margin = 5 [(wix.api.readOnly) = true, (wix.api.min) = 0, (wix.api.max) = 1];
}
