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,6 +3,7 @@ syntax = "proto3";
package wallet;
import "authorization_message.proto";
import "base_message.proto";
/*
INTERNAL DATA
@ -41,7 +42,6 @@ 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;
@ -240,5 +307,3 @@ message SaleManualReq {
string rrn = 5;
string national_id = 6;
}