chapa minor fixes swagger
This commit is contained in:
parent
46d70d7c8c
commit
4fdc76280a
538
docs/docs.go
538
docs/docs.go
|
|
@ -2208,50 +2208,6 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/payments/manual/verify/{tx_ref}": {
|
||||
"get": {
|
||||
"description": "Manually verify a payment using Chapa's API",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Verify a payment manually",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaVerificationResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/payments/receipt/{chapa_ref}": {
|
||||
"get": {
|
||||
"description": "Retrieve the Chapa payment receipt URL using the reference ID",
|
||||
|
|
@ -2452,6 +2408,189 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/cancel/{tx_ref}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Cancels an active Chapa transaction using its transaction reference",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Cancel a Chapa deposit transaction",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaCancelResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/events/{ref_id}": {
|
||||
"get": {
|
||||
"description": "Retrieve the timeline of events for a specific Chapa transaction",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Fetch transaction events",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "ref_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ChapaTransactionEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/manual/verify/{tx_ref}": {
|
||||
"get": {
|
||||
"description": "Manually verify a payment using Chapa's API",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Verify a payment manually",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaVerificationResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transactions": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Retrieves all transactions from Chapa payment gateway",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Get all Chapa transactions",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ChapaTransaction"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transfers": {
|
||||
"get": {
|
||||
"description": "Retrieve all transfer records from Chapa",
|
||||
|
|
@ -3216,6 +3355,50 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/betting-offers": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse preodds betting offers stored in the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"EnetPulse"
|
||||
],
|
||||
"summary": "Get all betting offers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreoddsBettingOffer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/fixtures": {
|
||||
"get": {
|
||||
"description": "Fetches all fixtures stored in the database",
|
||||
|
|
@ -3348,6 +3531,50 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/preodds-with-offers": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse pre-match odds along with their associated betting offers stored in the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"EnetPulse"
|
||||
],
|
||||
"summary": "Get all preodds with betting offers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreodds"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/results": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse match results stored in the database",
|
||||
|
|
@ -10630,6 +10857,52 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaCancelResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaCustomer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"mobile": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaDepositRequestPayload": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -10652,19 +10925,128 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaVerificationResponse": {
|
||||
"domain.ChapaTransaction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
"type": "string"
|
||||
},
|
||||
"charge": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"customer": {
|
||||
"$ref": "#/definitions/domain.ChapaCustomer"
|
||||
},
|
||||
"payment_method": {
|
||||
"type": "string"
|
||||
},
|
||||
"ref_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"trans_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaTransactionEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"item": {
|
||||
"type": "integer"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaVerificationResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"charge": {
|
||||
"type": "number"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"customization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"logo": {},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"meta": {},
|
||||
"method": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -10675,13 +11057,15 @@ const docTemplate = `{
|
|||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/domain.PaymentStatus"
|
||||
"description": "Currency string ` + "`" + `json:\"currency\"` + "`" + `",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.PaymentStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tx_ref": {
|
||||
"trx_ref": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -11251,6 +11635,12 @@ const docTemplate = `{
|
|||
"domain.EnetpulsePreodds": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bettingOffers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreoddsBettingOffer"
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -11301,6 +11691,50 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.EnetpulsePreoddsBettingOffer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "string"
|
||||
},
|
||||
"betting_offer_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"betting_offer_status_fk": {
|
||||
"type": "integer"
|
||||
},
|
||||
"coupon_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"odds": {
|
||||
"type": "number"
|
||||
},
|
||||
"odds_old": {
|
||||
"type": "number"
|
||||
},
|
||||
"odds_provider_fk": {
|
||||
"type": "integer"
|
||||
},
|
||||
"preodds_fk": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"updates_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.EnetpulseResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -2200,50 +2200,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/payments/manual/verify/{tx_ref}": {
|
||||
"get": {
|
||||
"description": "Manually verify a payment using Chapa's API",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Verify a payment manually",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaVerificationResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/payments/receipt/{chapa_ref}": {
|
||||
"get": {
|
||||
"description": "Retrieve the Chapa payment receipt URL using the reference ID",
|
||||
|
|
@ -2444,6 +2400,189 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/cancel/{tx_ref}": {
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Cancels an active Chapa transaction using its transaction reference",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Cancel a Chapa deposit transaction",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaCancelResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/events/{ref_id}": {
|
||||
"get": {
|
||||
"description": "Retrieve the timeline of events for a specific Chapa transaction",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Fetch transaction events",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "ref_id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ChapaTransactionEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transaction/manual/verify/{tx_ref}": {
|
||||
"get": {
|
||||
"description": "Manually verify a payment using Chapa's API",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Verify a payment manually",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Transaction Reference",
|
||||
"name": "tx_ref",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ChapaVerificationResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transactions": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Retrieves all transactions from Chapa payment gateway",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chapa"
|
||||
],
|
||||
"summary": "Get all Chapa transactions",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.ChapaTransaction"
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/chapa/transfers": {
|
||||
"get": {
|
||||
"description": "Retrieve all transfer records from Chapa",
|
||||
|
|
@ -3208,6 +3347,50 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/betting-offers": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse preodds betting offers stored in the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"EnetPulse"
|
||||
],
|
||||
"summary": "Get all betting offers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreoddsBettingOffer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/fixtures": {
|
||||
"get": {
|
||||
"description": "Fetches all fixtures stored in the database",
|
||||
|
|
@ -3340,6 +3523,50 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/preodds-with-offers": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse pre-match odds along with their associated betting offers stored in the database",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"EnetPulse"
|
||||
],
|
||||
"summary": "Get all preodds with betting offers",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreodds"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"502": {
|
||||
"description": "Bad Gateway",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/domain.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/enetpulse/results": {
|
||||
"get": {
|
||||
"description": "Fetches all EnetPulse match results stored in the database",
|
||||
|
|
@ -10622,6 +10849,52 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaCancelResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaCustomer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"mobile": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaDepositRequestPayload": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -10644,19 +10917,128 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaVerificationResponse": {
|
||||
"domain.ChapaTransaction": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
"type": "string"
|
||||
},
|
||||
"charge": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"customer": {
|
||||
"$ref": "#/definitions/domain.ChapaCustomer"
|
||||
},
|
||||
"payment_method": {
|
||||
"type": "string"
|
||||
},
|
||||
"ref_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"trans_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaTransactionEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"item": {
|
||||
"type": "integer"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.ChapaVerificationResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"charge": {
|
||||
"type": "number"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"customization": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"logo": {},
|
||||
"title": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"meta": {},
|
||||
"method": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"tx_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -10667,13 +11049,15 @@
|
|||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/definitions/domain.PaymentStatus"
|
||||
"description": "Currency string `json:\"currency\"`",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/domain.PaymentStatus"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tx_ref": {
|
||||
"trx_ref": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -11243,6 +11627,12 @@
|
|||
"domain.EnetpulsePreodds": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bettingOffers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/domain.EnetpulsePreoddsBettingOffer"
|
||||
}
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -11293,6 +11683,50 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"domain.EnetpulsePreoddsBettingOffer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"active": {
|
||||
"type": "string"
|
||||
},
|
||||
"betting_offer_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"betting_offer_status_fk": {
|
||||
"type": "integer"
|
||||
},
|
||||
"coupon_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"odds": {
|
||||
"type": "number"
|
||||
},
|
||||
"odds_old": {
|
||||
"type": "number"
|
||||
},
|
||||
"odds_provider_fk": {
|
||||
"type": "integer"
|
||||
},
|
||||
"preodds_fk": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"updates_count": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"domain.EnetpulseResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
|
|
@ -466,6 +466,36 @@ definitions:
|
|||
reference_number:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaCancelResponse:
|
||||
properties:
|
||||
amount:
|
||||
type: number
|
||||
created_at:
|
||||
type: string
|
||||
currency:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
tx_ref:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaCustomer:
|
||||
properties:
|
||||
email:
|
||||
type: string
|
||||
first_name:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
last_name:
|
||||
type: string
|
||||
mobile:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaDepositRequestPayload:
|
||||
properties:
|
||||
amount:
|
||||
|
|
@ -480,26 +510,98 @@ definitions:
|
|||
reference:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaVerificationResponse:
|
||||
domain.ChapaTransaction:
|
||||
properties:
|
||||
amount:
|
||||
type: number
|
||||
type: string
|
||||
charge:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
currency:
|
||||
type: string
|
||||
customer:
|
||||
$ref: '#/definitions/domain.ChapaCustomer'
|
||||
payment_method:
|
||||
type: string
|
||||
ref_id:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
tx_ref:
|
||||
trans_id:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaTransactionEvent:
|
||||
properties:
|
||||
created_at:
|
||||
type: string
|
||||
item:
|
||||
type: integer
|
||||
message:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaVerificationResponse:
|
||||
properties:
|
||||
data:
|
||||
properties:
|
||||
amount:
|
||||
type: number
|
||||
charge:
|
||||
type: number
|
||||
created_at:
|
||||
type: string
|
||||
currency:
|
||||
type: string
|
||||
customization:
|
||||
properties:
|
||||
description:
|
||||
type: string
|
||||
logo: {}
|
||||
title:
|
||||
type: string
|
||||
type: object
|
||||
email:
|
||||
type: string
|
||||
first_name:
|
||||
type: string
|
||||
last_name:
|
||||
type: string
|
||||
meta: {}
|
||||
method:
|
||||
type: string
|
||||
mode:
|
||||
type: string
|
||||
reference:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
tx_ref:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
type: object
|
||||
message:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaWebhookPayload:
|
||||
properties:
|
||||
amount:
|
||||
type: integer
|
||||
currency:
|
||||
type: string
|
||||
status:
|
||||
$ref: '#/definitions/domain.PaymentStatus'
|
||||
tx_ref:
|
||||
allOf:
|
||||
- $ref: '#/definitions/domain.PaymentStatus'
|
||||
description: Currency string `json:"currency"`
|
||||
trx_ref:
|
||||
type: string
|
||||
type: object
|
||||
domain.ChapaWithdrawalRequest:
|
||||
|
|
@ -889,6 +991,10 @@ definitions:
|
|||
type: object
|
||||
domain.EnetpulsePreodds:
|
||||
properties:
|
||||
bettingOffers:
|
||||
items:
|
||||
$ref: '#/definitions/domain.EnetpulsePreoddsBettingOffer'
|
||||
type: array
|
||||
createdAt:
|
||||
type: string
|
||||
dparam:
|
||||
|
|
@ -922,6 +1028,35 @@ definitions:
|
|||
updatesCount:
|
||||
type: integer
|
||||
type: object
|
||||
domain.EnetpulsePreoddsBettingOffer:
|
||||
properties:
|
||||
active:
|
||||
type: string
|
||||
betting_offer_id:
|
||||
type: string
|
||||
betting_offer_status_fk:
|
||||
type: integer
|
||||
coupon_key:
|
||||
type: string
|
||||
created_at:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
last_updated_at:
|
||||
type: string
|
||||
odds:
|
||||
type: number
|
||||
odds_old:
|
||||
type: number
|
||||
odds_provider_fk:
|
||||
type: integer
|
||||
preodds_fk:
|
||||
type: string
|
||||
updated_at:
|
||||
type: string
|
||||
updates_count:
|
||||
type: integer
|
||||
type: object
|
||||
domain.EnetpulseResult:
|
||||
properties:
|
||||
commentary:
|
||||
|
|
@ -5621,35 +5756,6 @@ paths:
|
|||
summary: Initiate a deposit
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/payments/manual/verify/{tx_ref}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Manually verify a payment using Chapa's API
|
||||
parameters:
|
||||
- description: Transaction Reference
|
||||
in: path
|
||||
name: tx_ref
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ChapaVerificationResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
summary: Verify a payment manually
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/payments/receipt/{chapa_ref}:
|
||||
get:
|
||||
consumes:
|
||||
|
|
@ -5781,6 +5887,124 @@ paths:
|
|||
summary: Initiate a currency swap
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/transaction/cancel/{tx_ref}:
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Cancels an active Chapa transaction using its transaction reference
|
||||
parameters:
|
||||
- description: Transaction Reference
|
||||
in: path
|
||||
name: tx_ref
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ChapaCancelResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
"404":
|
||||
description: Not Found
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Cancel a Chapa deposit transaction
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/transaction/events/{ref_id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Retrieve the timeline of events for a specific Chapa transaction
|
||||
parameters:
|
||||
- description: Transaction Reference
|
||||
in: path
|
||||
name: ref_id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/domain.ChapaTransactionEvent'
|
||||
type: array
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
summary: Fetch transaction events
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/transaction/manual/verify/{tx_ref}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Manually verify a payment using Chapa's API
|
||||
parameters:
|
||||
- description: Transaction Reference
|
||||
in: path
|
||||
name: tx_ref
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ChapaVerificationResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
summary: Verify a payment manually
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/transactions:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Retrieves all transactions from Chapa payment gateway
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/domain.ChapaTransaction'
|
||||
type: array
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get all Chapa transactions
|
||||
tags:
|
||||
- Chapa
|
||||
/api/v1/chapa/transfers:
|
||||
get:
|
||||
consumes:
|
||||
|
|
@ -6279,6 +6503,32 @@ paths:
|
|||
summary: Verify a direct deposit
|
||||
tags:
|
||||
- Direct Deposits
|
||||
/api/v1/enetpulse/betting-offers:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Fetches all EnetPulse preodds betting offers stored in the database
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/domain.Response'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/domain.EnetpulsePreoddsBettingOffer'
|
||||
type: array
|
||||
type: object
|
||||
"502":
|
||||
description: Bad Gateway
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
summary: Get all betting offers
|
||||
tags:
|
||||
- EnetPulse
|
||||
/api/v1/enetpulse/fixtures:
|
||||
get:
|
||||
consumes:
|
||||
|
|
@ -6358,6 +6608,33 @@ paths:
|
|||
summary: Get all preodds
|
||||
tags:
|
||||
- EnetPulse
|
||||
/api/v1/enetpulse/preodds-with-offers:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Fetches all EnetPulse pre-match odds along with their associated
|
||||
betting offers stored in the database
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/domain.Response'
|
||||
- properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/domain.EnetpulsePreodds'
|
||||
type: array
|
||||
type: object
|
||||
"502":
|
||||
description: Bad Gateway
|
||||
schema:
|
||||
$ref: '#/definitions/domain.ErrorResponse'
|
||||
summary: Get all preodds with betting offers
|
||||
tags:
|
||||
- EnetPulse
|
||||
/api/v1/enetpulse/results:
|
||||
get:
|
||||
consumes:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user