syntax = "proto3";

package com.wix.ecommerce.commons.api;

import "wix/api/validations.proto";
import "wix/api/annotations.proto";

message FullName {
    // Customer's first name
    string first_name = 1 [(.wix.api.maxLength) = 1000, (.wix.api.pii) = true];
    // Customer's last name
    string last_name = 2 [(.wix.api.maxLength) = 1000, (.wix.api.pii) = true];
}

message Street {
    // Street number
    string number = 1 [(.wix.api.maxLength) = 500];
    // Street name
    string name = 2 [(.wix.api.maxLength) = 1000];
}

message VatId {
    // Customer's tax ID.
    string number = 1 [(.wix.api.maxLength) = 50];
    /* 
    Tax type.  
    + `CPF`: For individual tax payers.
    + `CNPJ`: For corporations.
    */
    VatType type = 2;
}

// Brazilian tax info types
enum VatType {
    // When the tax info type can't be classified, due to an error
    UNSPECIFIED_TAX_TYPE = 0;
    // CPF - for individual tax payers
    CPF = 1;
    // CNPJ - for corporations
    CNPJ = 2;
}
