Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
G
beasy-mobile
Commits
1802125e
Commit
1802125e
authored
May 28, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transactions history query and type
parent
17c764b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
transactions.ts
src/utils/requests/transactions.ts
+42
-0
No files found.
src/utils/requests/transactions.ts
0 → 100644
View file @
1802125e
import
{
LOG
}
from
"@logger"
;
import
axiosRequest
from
"../axios-request"
;
import
type
{
PaymentCode
}
from
"./Types"
;
const
log
=
LOG
.
extend
(
"transactions"
);
export
interface
Transaction
{
// biome-ignore lint/style/useNamingConvention: <api response>
type_paiement
:
number
;
// biome-ignore lint/style/useNamingConvention: <api response>
type_paiement_label
:
PaymentCode
;
marchand
:
string
;
// biome-ignore lint/style/useNamingConvention: <api response>
marchand_name
:
string
;
service
:
string
;
montant
:
number
;
date
:
string
;
commentaire
:
string
;
etat
:
boolean
;
status
:
"SUCCESS"
|
"INITIATED"
|
"FAILED"
;
reference
:
string
;
// biome-ignore lint/style/useNamingConvention: <api response>
transaction_id
:
number
;
// biome-ignore lint/style/useNamingConvention: <api response>
marchand_code
:
string
;
}
export
const
getTransactionsHistory
=
async
():
Promise
<
Transaction
[]
>
=>
{
log
.
http
(
"getTransactionsHistory"
);
try
{
const
response
=
await
axiosRequest
<
Transaction
[]
>
({
url
:
"/transactions/"
,
});
log
.
http
(
"getTransactionsHistory |"
,
JSON
.
stringify
(
response
,
null
,
2
));
return
response
;
}
catch
(
error
)
{
log
.
error
(
"getTransactionsHistory |"
,
error
);
throw
error
;
}
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment