syntax = "proto3";

package wix.payment.api.pay.v2;

option java_package = "com.wix.payment.api.pay.v2";

import "wix/api/entity.proto";

message MandatoryField {

    option (wix.api.entity) = {
        fqdn: "wix.cashier.pay.v2.mandatory_field"
        segment: PUBLIC // no domain events produced
    };

    // enumeration with all possible domains
    enum Domain {
        UNDEFINED               = 0;
        ORDER                   = 1;
        CREDIT_CARD             = 2;
        SAVED_CREDIT_CARD       = 3;
        PAYMENT_METHOD          = 4;
    }

    // domain to which the field belongs
    Domain domain                       = 1;

    // field name
    string field_name                   = 2;

    // MF available values
    repeated MandatoryFieldValue values = 6;
}

message MandatoryFieldValue {
    // MF value
    string id   = 1;

    // MF value display name
    string name = 2;

    // Mandatory field icon url
    string icon_url = 3;
}
