public async Task <EFCommandResponse> CreateDeposit(EFDepositCommand command)
 {
     return(await BaseUrl
            .WithClient(Client)
            .AppendPathSegment(
                "/api/efiscal/deposit"
                )
            .AcceptJson()
            .WithOAuthBearerToken(Token)
            .UseUri()
            .PostJsonAsync(command)
            .ReceiveJson <EFTCRCommandResponse>());
 }
예제 #2
0
        public static EFDepositCommand ToXMLModel(this EFIDeposit deposit)
        {
            //set user
            Func <EFIUser, EFUser> SetUser = user =>
                                             new EFUser()
            {
                UserName = user.UserName,
                UserCode = user.UserCode
            };

            var command = new EFDepositCommand()
            {
                Uid           = deposit.Uid.ToString(),
                ENUIdentifier = deposit.TCRCode,
                Type          = "JSON",//EFiscalReceiptCommandType
                DateSend      = deposit.Time,
                User          = SetUser(deposit.User),
                Amount        = deposit.Amount,
                DepositType   = deposit.DepositType
            };

            return(command);
        }