common.restriction

io.token.proto.common.restriction common/src/main/proto/restriction.proto


syntax = "proto3";
package io.token.proto.common.restriction;

option java_outer_classname = "RestrictionProtos";
option csharp_namespace = "Tokenio.Proto.Common.RestrictionProtos";

enum RestrictedProductType {
  UNKNOWN_PRODUCT_TYPE = 0;
  SINGLE_IMMEDIATE_PAYMENT = 1;
  IP_ADDRESS = 2;
  GEO_LOCATION = 3;
  PIS_PAYMENT_NETWORK = 4;
}

message RestrictionPayload {
  RestrictedProductType product_type = 1;
  repeated RulePayload rule_payloads = 2;
}

message RulePayload {
  string name = 1;
  string text = 2;
}

message Rule {
  string id = 1;
  string name = 2;
  string text = 3;
  bool enabled = 4;
  string created_at = 5;
}

message Restriction {
  string id = 1;
  string target_member_id = 2;
  string owner_member_id = 3;
  RestrictedProductType product_type = 4;
  string created_at = 5;
  string updated_at = 6;
  bool enabled = 7;
  repeated Rule rules = 8;
}

message RejectedProduct {
  string id = 1;
  string product_id = 2;
  string product_type = 3;
  string restriction_id = 4;
  string rule_id = 5;
  string data = 6;
  string created_at = 7;
}

message Country {
  string code = 1;
  string name = 2;
}

message Region {
  string id = 1;
  string country = 2;
  string name = 3;
}