syntax = "proto3"; package io.token.proto.common.consent; option java_outer_classname = "ConsentProtos"; option csharp_namespace = "Tokenio.Proto.Common.ConsentProtos"; import "account.proto"; import "extensions/field.proto"; import "money.proto"; import "token.proto"; import "transferinstructions.proto"; message Consent { string id = 1; // Same as the corresponding token id Beneficiary beneficiary = 2; string member_id = 3; oneof type { InformationAccess information_access = 5; Payment payment = 6; StandingOrder standing_order = 9; BulkPayment bulk_payment = 10; } string initiator_id = 7; // ID of the member requesting consent (e.g. merchant) string initiator_ref_id = 8; // Reference ID set by the member requesting consent message InformationAccess { repeated ResourceAccess resource_access = 1; message ResourceAccess { io.token.proto.common.account.BankAccount account = 1; repeated ResourceType resources = 2; enum ResourceType { INVALID_RESOURCE_TYPE = 0; ACCOUNT = 1; BALANCE = 2; TRANSACTIONS = 3; TRANSFER_DESTINATIONS = 4; FUNDS_CONFIRMATIONS = 5; STANDING_ORDERS = 6; } } } message Payment { io.token.proto.common.account.BankAccount account = 1; io.token.proto.common.money.Money lifetime_amount = 2; io.token.proto.common.money.Money amount = 3; repeated io.token.proto.common.transferinstructions.TransferEndpoint destinations = 4 [deprecated=true]; repeated io.token.proto.common.transferinstructions.TransferDestination transfer_destinations = 5; } message StandingOrder { io.token.proto.common.account.BankAccount account = 1; io.token.proto.common.money.Money amount = 2; // amount per charge string frequency = 3; // ISO 20022: DAIL, WEEK, TOWK, MNTH, TOMN, QUTR, SEMI, YEAR repeated io.token.proto.common.transferinstructions.TransferDestination transfer_destinations = 4; } message BulkPayment { repeated Payment payments = 1; io.token.proto.common.account.BankAccount account = 2; message Payment { string amount = 1; string currency = 2; string ref_id = 3; string description = 4; transferinstructions.TransferDestination destination = 5; } } message Beneficiary { io.token.proto.common.token.TokenMember member = 1; io.token.proto.common.token.ActingAs acting_as = 2; } }