syntax = "proto3";

package wix.payment.api.pay.v2;

import "wix/api/annotations.proto";

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

// Describing physical or business location
message Address {
    // first name
    string first_name             = 1[(.wix.api.pii) = true];
    // last name
    string last_name              = 2[(.wix.api.pii) = true];
    // company name
    string company                = 3[(.wix.api.pii) = true];

    // address string (must not exceed 100 characters)
    string address                = 4[(.wix.api.pii) = true];
    // detailed address (optional)
    AddressDetails addressDetails = 5;
    string city                   = 6;
    string state                  = 7;
    // ZIP code
    string zipCode                = 8[(.wix.api.pii) = true];
    // three-letters country code (ISO 3166-1 alpha-3)
    string countryCode            = 9;

    // phone number (must not exceed 100 characters)
    string phone                  = 10[(.wix.api.pii) = true];
    // fax number (must not exceed 100 characters)
    string fax                    = 11[(.wix.api.pii) = true];
    // email (must not exceed 100 characters)
    string email                  = 12[(.wix.api.pii) = true];
    // user id number (optional)
    TaxIdentifier taxIdentifier   = 13;

    // address details (like street and house number)
    message AddressDetails {
        // street
        string street      = 1[(.wix.api.pii) = true];
        // house number
        string houseNumber = 2[(.wix.api.pii) = true];
    }

    // tax identifier
    message TaxIdentifier {
        // identification number, for example: 111-2222-333 (must not exceed 100 characters)
        string id   = 1;
        // id number type, required if more than 1 type is available in country
        //
        // examples: `CPF`, `CNPJ`
        //
        // must not exceed 100 characters
        string type = 2;
    }
}
