New BNPL Added To wallet buf

This commit is contained in:
nfel 2024-07-24 14:09:47 +03:30
parent b8d8aac599
commit 95f6f8c032
Signed by: nfel
GPG Key ID: DCC0BF3F92B0D45F
3 changed files with 96 additions and 25 deletions

View File

@ -26,4 +26,10 @@ service WalletService {
rpc SaleGetToken(SaleGetTokenReq) returns(SaleGetTokenRes);
rpc SaleConfirm(SaleConfirmReq) returns(SaleConfirmRes);
rpc AdminManualSaleDeposit(SaleManualReq) returns (base.StatusRes);
// BNPL
rpc GetBNPLList(base.Empty) returns(BNPLList);
rpc GetBNPLInfo(base.IdReq) returns(BNPLInfo);
rpc GetUserBNPLInfo(GetUserBNPLInfoReq) returns(UserBNPLResp);
rpc SubmitBNPLForm(UserBNPLResp) returns(base.StatusRes);
}

View File

@ -3,17 +3,18 @@ syntax = "proto3";
package wallet;
import "authorization_message.proto";
import "base_message.proto";
/*
INTERNAL DATA
*/
INTERNAL DATA
*/
message InternalTransactionData {
int64 transaction_id = 1;
}
/*
Federation
Federation
*/
message Federation {
@ -34,14 +35,13 @@ message GetFederationReq {
}
/*
Asset
Asset
*/
message AssetList {
repeated Asset list = 1;
}
message Asset {
int64 id = 1;
string name = 2;
@ -76,6 +76,73 @@ message Asset {
int32 status = 31;
AssetMeta meta = 32;
}
/*
BNPL - not really but close name
*/
// enum BNPLPgState {
//
// }
message GetUserBNPLInfoReq{
authorization.InternalIAM iam =1 ;
base.IdReq id = 2;
}
message BNPLPayments {
int64 id = 1;
double amount = 2;
bool is_paied = 3;
string payment_date = 4;
string settlement_date = 5;
}
message UserBNPLResp {
int64 id = 1;
BNPLInfo bnpl = 2;
int32 current_step=3;
optional float amount = 4;
optional float payment_period = 5;
optional bool has_agreed_contract = 6;
repeated BNPLPayments payments = 7;
optional string employee_id = 8;
optional authorization.Company company = 10;
optional string updated_at = 12;
optional string created_at = 13;
}
message UserBNPLReq {
int64 id = 1;
int64 bnpl_id = 2;
string created_at = 3;
string employee_id = 4;
int64 company_id = 5;
float amount = 7;
float payment_period = 8;
bool has_agreed_contract = 9;
}
message PaymentPeriodInfo {
int64 id = 1;
string period = 2;
bool enabled = 3;
}
message BNPLInfo {
int64 id = 1;
string description = 3;
repeated Asset supported_assets = 2;
optional bool enabled = 4;
float amount_start = 5;
float amount_end = 6;
float amount_steps = 7;
repeated PaymentPeriodInfo payment_period = 8;
repeated authorization.Company possible_companies = 11;
string updated_at = 12;
string created_at = 13;
string expiers_at = 14;
}
message BNPLList {
repeated BNPLInfo list = 1;
}
message GetAssetReq {
optional int64 id = 1;
@ -101,7 +168,7 @@ message PropertyMeta {
}
/*
Wallet
Wallet
*/
message WalletList {
@ -127,7 +194,7 @@ message UserInitWalletReq {
}
/*
Transaction
Transaction
*/
message TransactionList {
@ -172,7 +239,7 @@ message UserGetTransactionListReq {
optional string tracking_code = 14;
}
/*
Buy
Buy
*/
message UserBuyAssetReq {
@ -182,11 +249,11 @@ message UserBuyAssetReq {
}
/*
Sell
Sell
*/
/*
Transfer
Transfer
*/
message UserTransferAssetReq {
@ -212,33 +279,31 @@ message SaleGetTokenReq {
// represent the information regarding the ipg gateway
message SaleGetTokenRes {
string url = 1;
int64 unit_price = 2;
int64 total_price = 3;
int64 unit_price = 2;
int64 total_price = 3;
double amount = 4;
string asset = 5;
}
message SaleConfirmReq {
string RefId=1;
string ResCode=2;
string SaleOrderId=3;
string SaleReferenceId=4;
string CardHolderInfo=5;
string CardHolderPan=6;
string FinalAmount=7;
string RefId = 1;
string ResCode = 2;
string SaleOrderId = 3;
string SaleReferenceId = 4;
string CardHolderInfo = 5;
string CardHolderPan = 6;
string FinalAmount = 7;
}
message SaleConfirmRes {
string receiptLink=1;
string receiptLink = 1;
}
message SaleManualReq {
authorization.InternalIAM iam = 1;
int64 asset_id = 2;
int64 asset_id = 2;
double amount = 3;
string paid_at = 4;
string rrn = 5;
string national_id = 6;
}