syntax = "proto2";

package maps_adv.billing_proxy.proto.orders_for_stat;

import "google/protobuf/timestamp.proto";
import "maps_adv/billing_proxy/proto/common.proto";

// Orders balance information request payload
message OrdersStatInfoInput {
    repeated uint64 order_ids = 1;
}

// Order balance information
message OrderStatInfo {
    required uint64 order_id = 1;
    optional common.MoneyQuantity OBSOLETE__balance = 2;
    optional string balance = 3;
}

message OrdersStatInfo {
    repeated OrderStatInfo orders_info = 1;
}

message OrdersDiscountInfoInput {
    repeated uint64 order_ids = 1;
    required google.protobuf.Timestamp billed_at = 2;
}

message OrderDiscountInfo {
    required uint64 order_id = 1;
    required string discount = 2;
}

message OrdersDiscountInfo {
    repeated OrderDiscountInfo discount_info = 1;
}

message OrdersDebitsInfoInput {
    repeated uint64 order_ids = 1;
    required google.protobuf.Timestamp billed_after = 2;
}

message DebitInfo {
    required google.protobuf.Timestamp billed_at = 1;
    required string amount = 2;
}

message OrderDebitsInfo {
    required uint64 order_id = 1;
    repeated DebitInfo debits = 2;
}

message OrdersDebitsInfo {
    repeated OrderDebitsInfo orders_debits = 1;
}
