Skip to content

Commit 0c841c0

Browse files
authored
Add new endpoints for Events and Webhooks (#63)
* Add new endpoints for Events and Webhooks * Add new endpoints for ApiKeys * change timeout * test ci * test ci * test ci * test ci * test ci * change mock url * update readme run tests * add order tests * change mock url
1 parent 2f07d72 commit 0c841c0

File tree

91 files changed

+8456
-1540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+8456
-1540
lines changed

.github/workflows/go.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3-
#
4-
# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech)
5-
6-
name: go CI
1+
name: Golang CI
72
on:
83
push:
9-
branches: [ main ]
4+
branches: [ main, master ]
105
pull_request:
11-
branches: [ main ]
6+
branches: [ main, master ]
127
jobs:
13-
test:
8+
tests:
9+
strategy:
10+
matrix:
11+
sdk: [1.16, 1.17, 1.18, 1.19, 1.20.x]
1412
runs-on: ubuntu-latest
13+
timeout-minutes: 5
1514
steps:
1615
- uses: actions/checkout@v3
17-
- name: Test
18-
run: DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose -f docker-compose.yml -p ${{ github.run_id }} run --rm service go test -v --race ./...
19-
- name: remove containers
20-
if: always()
21-
run: docker-compose -f docker-compose.yml -p ${{ github.run_id }} down
16+
- uses: actions/setup-go@v4
17+
with:
18+
go-version: ${{ matrix.sdk }}
19+
- name: Install Mockserver
20+
run: |
21+
npm install -g @mockoon/cli
22+
npx mockoon-cli start --data https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json --port 3000
23+
- name: Run tests
24+
run: go test -v --race ./...
25+
env:
26+
BASE_PATH: localhost:3000

.openapi-generator/FILES

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LICENSE
66
README.md
77
api/openapi.yaml
88
api_antifraud.go
9+
api_api_keys.go
910
api_charges.go
1011
api_companies.go
1112
api_customers.go
@@ -30,6 +31,12 @@ client.go
3031
conekta.png
3132
configuration.go
3233
docs/AntifraudApi.md
34+
docs/ApiKeyCreateResponse.md
35+
docs/ApiKeyCreateResponseAllOf.md
36+
docs/ApiKeyRequest.md
37+
docs/ApiKeyResponse.md
38+
docs/ApiKeyUpdateRequest.md
39+
docs/ApiKeysApi.md
3340
docs/BlacklistRuleResponse.md
3441
docs/ChargeDataPaymentMethodBankTransferResponse.md
3542
docs/ChargeDataPaymentMethodCardResponse.md
@@ -95,6 +102,8 @@ docs/CustomerUpdateShippingContacts.md
95102
docs/CustomersApi.md
96103
docs/CustomersResponse.md
97104
docs/CustomersResponseAllOf.md
105+
docs/DeleteApiKeysResponse.md
106+
docs/DeleteApiKeysResponseAllOf.md
98107
docs/DeletedBlacklistRuleResponse.md
99108
docs/DeletedWhitelistRuleResponse.md
100109
docs/Details.md
@@ -107,6 +116,9 @@ docs/EmailCheckoutRequest.md
107116
docs/ErrorAllOf.md
108117
docs/EventResponse.md
109118
docs/EventsApi.md
119+
docs/EventsResendResponse.md
120+
docs/GetApiKeysResponse.md
121+
docs/GetApiKeysResponseAllOf.md
110122
docs/GetChargesResponse.md
111123
docs/GetChargesResponseAllOf.md
112124
docs/GetCompaniesResponse.md
@@ -239,6 +251,11 @@ docs/WhitelistlistRuleResponse.md
239251
git_push.sh
240252
go.mod
241253
go.sum
254+
model_api_key_create_response.go
255+
model_api_key_create_response_all_of.go
256+
model_api_key_request.go
257+
model_api_key_response.go
258+
model_api_key_update_request.go
242259
model_blacklist_rule_response.go
243260
model_charge_data_payment_method_bank_transfer_response.go
244261
model_charge_data_payment_method_card_response.go
@@ -301,6 +318,8 @@ model_customer_update_fiscal_entities_request.go
301318
model_customer_update_shipping_contacts.go
302319
model_customers_response.go
303320
model_customers_response_all_of.go
321+
model_delete_api_keys_response.go
322+
model_delete_api_keys_response_all_of.go
304323
model_deleted_blacklist_rule_response.go
305324
model_deleted_whitelist_rule_response.go
306325
model_details.go
@@ -312,6 +331,9 @@ model_email_checkout_request.go
312331
model_error.go
313332
model_error_all_of.go
314333
model_event_response.go
334+
model_events_resend_response.go
335+
model_get_api_keys_response.go
336+
model_get_api_keys_response_all_of.go
315337
model_get_charges_response.go
316338
model_get_charges_response_all_of.go
317339
model_get_companies_response.go

Dockerfile

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,9 @@ func main() {
103103
## Running tests
104104
Navigate to conekta-go folder and run the following commands.
105105
```
106-
docker-compose up
107-
go test ./...
106+
docker-compose up -d
107+
go test -v --race ./...
108108
```
109-
110109
## Documentation for API Endpoints
111110

112111
All URIs are relative to *https://api.conekta.io*
@@ -119,6 +118,11 @@ Class | Method | HTTP request | Description
119118
*AntifraudApi* | [**DeleteRuleWhitelist**](docs/AntifraudApi.md#deleterulewhitelist) | **Delete** /antifraud/whitelists/{id} | Delete whitelisted rule
120119
*AntifraudApi* | [**GetRuleBlacklist**](docs/AntifraudApi.md#getruleblacklist) | **Get** /antifraud/blacklists | Get list of blacklisted rules
121120
*AntifraudApi* | [**GetRuleWhitelist**](docs/AntifraudApi.md#getrulewhitelist) | **Get** /antifraud/whitelists | Get a list of whitelisted rules
121+
*ApiKeysApi* | [**CreateApiKey**](docs/ApiKeysApi.md#createapikey) | **Post** /api_keys | Create Api Key
122+
*ApiKeysApi* | [**DeleteApiKey**](docs/ApiKeysApi.md#deleteapikey) | **Delete** /api_keys/{id} | Delete Api Key
123+
*ApiKeysApi* | [**GetApiKey**](docs/ApiKeysApi.md#getapikey) | **Get** /api_keys/{id} | Get Api Key
124+
*ApiKeysApi* | [**GetApiKeys**](docs/ApiKeysApi.md#getapikeys) | **Get** /api_keys | Get list of Api Keys
125+
*ApiKeysApi* | [**UpdateApiKey**](docs/ApiKeysApi.md#updateapikey) | **Put** /api_keys/{id} | Update Api Key
122126
*ChargesApi* | [**GetCharges**](docs/ChargesApi.md#getcharges) | **Get** /charges | Get A List of Charges
123127
*ChargesApi* | [**OrdersCreateCharge**](docs/ChargesApi.md#orderscreatecharge) | **Post** /orders/{id}/charges | Create charge
124128
*CompaniesApi* | [**GetCompanies**](docs/CompaniesApi.md#getcompanies) | **Get** /companies | Get List of Companies
@@ -135,6 +139,7 @@ Class | Method | HTTP request | Description
135139
*DiscountsApi* | [**OrdersUpdateDiscountLines**](docs/DiscountsApi.md#ordersupdatediscountlines) | **Put** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount
136140
*EventsApi* | [**GetEvent**](docs/EventsApi.md#getevent) | **Get** /events/{id} | Get Event
137141
*EventsApi* | [**GetEvents**](docs/EventsApi.md#getevents) | **Get** /events | Get list of Events
142+
*EventsApi* | [**ResendEvent**](docs/EventsApi.md#resendevent) | **Post** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event
138143
*LogsApi* | [**GetLogById**](docs/LogsApi.md#getlogbyid) | **Get** /logs/{id} | Get Log
139144
*LogsApi* | [**GetLogs**](docs/LogsApi.md#getlogs) | **Get** /logs | Get List Of Logs
140145
*OrdersApi* | [**CancelOrder**](docs/OrdersApi.md#cancelorder) | **Post** /orders/{id}/cancel | Cancel Order
@@ -193,11 +198,17 @@ Class | Method | HTTP request | Description
193198
*WebhooksApi* | [**DeleteWebhook**](docs/WebhooksApi.md#deletewebhook) | **Delete** /webhooks/{id} | Delete Webhook
194199
*WebhooksApi* | [**GetWebhook**](docs/WebhooksApi.md#getwebhook) | **Get** /webhooks/{id} | Get Webhook
195200
*WebhooksApi* | [**GetWebhooks**](docs/WebhooksApi.md#getwebhooks) | **Get** /webhooks | Get List of Webhooks
201+
*WebhooksApi* | [**TestWebhook**](docs/WebhooksApi.md#testwebhook) | **Post** /webhooks/{id}/test | Test Webhook
196202
*WebhooksApi* | [**UpdateWebhook**](docs/WebhooksApi.md#updatewebhook) | **Put** /webhooks/{id} | Update Webhook
197203

198204

199205
## Documentation For Models
200206

207+
- [ApiKeyCreateResponse](docs/ApiKeyCreateResponse.md)
208+
- [ApiKeyCreateResponseAllOf](docs/ApiKeyCreateResponseAllOf.md)
209+
- [ApiKeyRequest](docs/ApiKeyRequest.md)
210+
- [ApiKeyResponse](docs/ApiKeyResponse.md)
211+
- [ApiKeyUpdateRequest](docs/ApiKeyUpdateRequest.md)
201212
- [BlacklistRuleResponse](docs/BlacklistRuleResponse.md)
202213
- [ChargeDataPaymentMethodBankTransferResponse](docs/ChargeDataPaymentMethodBankTransferResponse.md)
203214
- [ChargeDataPaymentMethodCardResponse](docs/ChargeDataPaymentMethodCardResponse.md)
@@ -260,6 +271,8 @@ Class | Method | HTTP request | Description
260271
- [CustomerUpdateShippingContacts](docs/CustomerUpdateShippingContacts.md)
261272
- [CustomersResponse](docs/CustomersResponse.md)
262273
- [CustomersResponseAllOf](docs/CustomersResponseAllOf.md)
274+
- [DeleteApiKeysResponse](docs/DeleteApiKeysResponse.md)
275+
- [DeleteApiKeysResponseAllOf](docs/DeleteApiKeysResponseAllOf.md)
263276
- [DeletedBlacklistRuleResponse](docs/DeletedBlacklistRuleResponse.md)
264277
- [DeletedWhitelistRuleResponse](docs/DeletedWhitelistRuleResponse.md)
265278
- [Details](docs/Details.md)
@@ -270,6 +283,9 @@ Class | Method | HTTP request | Description
270283
- [EmailCheckoutRequest](docs/EmailCheckoutRequest.md)
271284
- [ErrorAllOf](docs/ErrorAllOf.md)
272285
- [EventResponse](docs/EventResponse.md)
286+
- [EventsResendResponse](docs/EventsResendResponse.md)
287+
- [GetApiKeysResponse](docs/GetApiKeysResponse.md)
288+
- [GetApiKeysResponseAllOf](docs/GetApiKeysResponseAllOf.md)
273289
- [GetChargesResponse](docs/GetChargesResponse.md)
274290
- [GetChargesResponseAllOf](docs/GetChargesResponseAllOf.md)
275291
- [GetCompaniesResponse](docs/GetCompaniesResponse.md)

0 commit comments

Comments
 (0)