syntax = "proto3";

package com.wixpress.appservice.api.upstream.wix.billing.spi.v1;
option java_package = "com.wixpress.appservice.api.upstream.wix.billing.spi.v1";

import "google/api/annotations.proto";
import "wix/api/entity.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "wix/spi/definitions.proto";


message TaxCalculatorSpiConfig {
    option (.wix.api.decomposite_of) = "wix.billing.spi.v1.TaxCalculatorSpiConfig";
  // URI where the SPI Implementer is deployed
  string deployment_uri = 1 [(.wix.spi.base_uri) = true];//the calc deployment url
  // User-friendly name of the tax calculator
  string calculator_display_name = 2; // the calc name
  TaxCountriesConfig tax_countries_config = 3; // list of countries and boolean represents if its a white list or black list (supported or unsupported countries)
}

message TaxCountriesConfig {
  repeated string countries = 1 [(.wix.api.format) = COUNTRY]; // list of countries
  bool is_supported = 2; // represents if the calculator supports tax in those countries or not
}