Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions _build/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3443,6 +3443,140 @@ paths:
summary: Get Company Documents
tags:
- Companies
/settings/payment-methods:
get:
description: "Retrieves the enablement status of each payment method for the\
\ currently authenticated company. For every payment method the response indicates\
\ whether it is enabled by Conekta (`admin`), enabled by the merchant (`merchant`),\
\ and the resulting state (`effective`)."
operationId: getPaymentMethodSettings
parameters:
- description: Use for knowing which language to use
examples:
es:
summary: for spanish request/response
value: es
en:
summary: for english request/response
value: en
explode: false
in: header
name: Accept-Language
required: false
schema:
default: es
enum:
- es
- en
type: string
style: simple
responses:
"200":
content:
application/vnd.conekta-v2.3.0+json:
example:
card_payment:
admin: true
merchant: true
effective: true
apple_payment:
admin: true
merchant: true
effective: true
google_payment:
admin: true
merchant: true
effective: true
cash_payment:
admin: true
merchant: true
effective: true
bank_transfer_payment:
admin: true
merchant: true
effective: true
bnpl_payment:
admin: true
merchant: false
effective: false
pay_by_bank_payment:
admin: false
merchant: true
effective: false
schema:
$ref: "#/components/schemas/payment_method_settings_response"
description: successful
headers:
Date:
description: The date and time that the response was sent
explode: false
schema:
example: "Fri, 03 Feb 2023 16:57:48 GMT"
type: string
style: simple
Content-Type:
description: The format of the response body
explode: false
schema:
example: application/json; charset=utf-8
type: string
style: simple
Content-Length:
description: The length of the response body in bytes
explode: false
schema:
example: "512"
type: string
style: simple
Connection:
description: The type of connection used to transfer the response
explode: false
schema:
example: keep-alive
type: string
style: simple
Conekta-Media-Type:
description: The version of the API used to process the request and
the format of the response body
explode: false
schema:
example: conekta-v2.3.0; format=application/json
type: string
style: simple
"401":
content:
application/vnd.conekta-v2.3.0+json:
example:
details:
- message: Please include your access key in your request.
code: conekta.errors.authentication.missing_key
log_id: 507f1f77bcf86cd799439011
object: error
type: authentication_error
schema:
$ref: "#/components/schemas/error"
description: authentication error
"500":
content:
application/vnd.conekta-v2.3.0+json:
example:
details:
- debug_message: There was a runtime error and Conekta engineers have
been notified.
message: There was a runtime error and Conekta engineers have been
notified.
code: conekta.errors.api.system.general_failure
object: error
type: api_error
log_id: 641b6f2b3cd9a50001515098
schema:
$ref: "#/components/schemas/error"
description: internal server error
security:
- bearerAuth: []
summary: Get Payment Method Settings
tags:
- Companies
/customers:
get:
description: "The purpose of business is to create and maintain a client, you\
Expand Down Expand Up @@ -18255,6 +18389,55 @@ components:
- file_name
- status
title: CompanyDocumentResponse
payment_method_setting:
description: Enablement flags for a single payment method.
properties:
admin:
description: Indicates if the payment method is enabled by Conekta for the
company.
example: true
type: boolean
merchant:
description: Indicates if the payment method is enabled by the merchant
in its own settings.
example: true
type: boolean
effective:
description: Final state of the payment method. It is only true when both
`admin` and `merchant` are enabled.
example: true
type: boolean
required:
- admin
- effective
- merchant
title: payment_method_setting
payment_method_settings_response:
description: Enablement status of each payment method available for the company.
properties:
card_payment:
$ref: "#/components/schemas/payment_method_setting"
apple_payment:
$ref: "#/components/schemas/payment_method_setting"
google_payment:
$ref: "#/components/schemas/payment_method_setting"
cash_payment:
$ref: "#/components/schemas/payment_method_setting"
bank_transfer_payment:
$ref: "#/components/schemas/payment_method_setting"
bnpl_payment:
$ref: "#/components/schemas/payment_method_setting"
pay_by_bank_payment:
$ref: "#/components/schemas/payment_method_setting"
required:
- apple_payment
- bank_transfer_payment
- bnpl_payment
- card_payment
- cash_payment
- google_payment
- pay_by_bank_payment
title: payment_method_settings_response
customer_antifraud_info_response:
nullable: true
properties:
Expand Down
2 changes: 2 additions & 0 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ paths:
$ref: './resources/companies/company_document.yml'
'/companies/{company_id}/documents':
$ref: './resources/companies/company_documents.yml'
/settings/payment-methods:
$ref: "./resources/companies/payment_method_settings.yml"
/customers:
$ref: "./resources/customers/create_customer.yml"
/customers/{id}:
Expand Down
76 changes: 76 additions & 0 deletions resources/companies/payment_method_settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
get:
tags:
- Companies
operationId: getPaymentMethodSettings
summary: Get Payment Method Settings
description: Retrieves the enablement status of each payment method for the currently authenticated company. For every payment method the response indicates whether it is enabled by Conekta (`admin`), enabled by the merchant (`merchant`), and the resulting state (`effective`).
responses:
200:
description: successful
content:
application/vnd.conekta-v2.3.0+json:
schema:
$ref: '../../schemas/companies/payment_method_settings_response.yml'
example:
card_payment:
admin: true
merchant: true
effective: true
apple_payment:
admin: true
merchant: true
effective: true
google_payment:
admin: true
merchant: true
effective: true
cash_payment:
admin: true
merchant: true
effective: true
bank_transfer_payment:
admin: true
merchant: true
effective: true
bnpl_payment:
admin: true
merchant: false
effective: false
pay_by_bank_payment:
admin: false
merchant: true
effective: false
headers:
Date:
description: The date and time that the response was sent
schema:
type: string
example: "Fri, 03 Feb 2023 16:57:48 GMT"
Content-Type:
description: The format of the response body
schema:
type: string
example: "application/json; charset=utf-8"
Content-Length:
description: The length of the response body in bytes
schema:
type: string
example: "512"
Connection:
description: The type of connection used to transfer the response
schema:
type: string
example: "keep-alive"
Conekta-Media-Type:
description: The version of the API used to process the request and the format of the response body
schema:
type: string
example: conekta-v2.3.0; format=application/json
401:
$ref: '../errors/401.yml'
500:
$ref: '../errors/500.yml'
security:
- bearerAuth: []
parameters:
- $ref: '../../parameters/commons/headers/accept_language.yml'
20 changes: 20 additions & 0 deletions schemas/companies/payment_method_setting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type: object
title: payment_method_setting
description: Enablement flags for a single payment method.
properties:
admin:
type: boolean
description: Indicates if the payment method is enabled by Conekta for the company.
example: true
merchant:
type: boolean
description: Indicates if the payment method is enabled by the merchant in its own settings.
example: true
effective:
type: boolean
description: Final state of the payment method. It is only true when both `admin` and `merchant` are enabled.
example: true
required:
- admin
- merchant
- effective
26 changes: 26 additions & 0 deletions schemas/companies/payment_method_settings_response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
type: object
title: payment_method_settings_response
description: Enablement status of each payment method available for the company.
properties:
card_payment:
$ref: './payment_method_setting.yml'
apple_payment:
$ref: './payment_method_setting.yml'
google_payment:
$ref: './payment_method_setting.yml'
cash_payment:
$ref: './payment_method_setting.yml'
bank_transfer_payment:
$ref: './payment_method_setting.yml'
bnpl_payment:
$ref: './payment_method_setting.yml'
pay_by_bank_payment:
$ref: './payment_method_setting.yml'
required:
- card_payment
- apple_payment
- google_payment
- cash_payment
- bank_transfer_payment
- bnpl_payment
- pay_by_bank_payment
Loading