syntax = "proto2";

package maps_adv.billing_proxy.proto.orders_charge;

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


message OrderChargeInput {
    required uint64 order_id = 1;
    oneof charge_compat {
        common.MoneyQuantity OBSOLETE__charged_amount = 2;
        string charged_amount = 3;
    }
}


message OrdersChargeInput {
    repeated OrderChargeInput orders_charge = 1;
    required google.protobuf.Timestamp bill_for_timestamp = 2;
}


message OrderChargeOutput {
    required uint64 order_id = 1;
    required bool success = 2;
}


message OrdersChargeOutput {
    repeated OrderChargeOutput charge_result = 1;
    optional bool applied = 2;  // False in case of valid duplicate
}
