Conekta::CreateCustomerPaymentMethodsResponse
August 21, 2025 ยท View on GitHub
Class instance methods
openapi_one_of
Returns the list of classes defined in oneOf.
Example
require 'conekta'
Conekta::CreateCustomerPaymentMethodsResponse.openapi_one_of
# =>
# [
# :'PaymentMethodCardResponse',
# :'PaymentMethodCashRecurrentResponse',
# :'PaymentMethodCashResponse',
# :'PaymentMethodSpeiRecurrent'
# ]
openapi_discriminator_name
Returns the discriminator's property name.
Example
require 'conekta'
Conekta::CreateCustomerPaymentMethodsResponse.openapi_discriminator_name
# => :'type'
openapi_discriminator_name
Returns the discriminator's mapping.
Example
require 'conekta'
Conekta::CreateCustomerPaymentMethodsResponse.openapi_discriminator_mapping
# =>
# {
# :'card' => :'PaymentMethodCardResponse',
# :'cash' => :'PaymentMethodCashResponse',
# :'cash_recurrent' => :'PaymentMethodCashRecurrentResponse',
# :'spei_recurrent' => :'PaymentMethodSpeiRecurrent'
# }
build
Find the appropriate object from the openapi_one_of list and casts the data into it.
Example
require 'conekta'
Conekta::CreateCustomerPaymentMethodsResponse.build(data)
# => #<PaymentMethodCardResponse:0x00007fdd4aab02a0>
Conekta::CreateCustomerPaymentMethodsResponse.build(data_that_doesnt_match)
# => nil
Parameters
| Name | Type | Description |
|---|---|---|
| data | Mixed | data to be matched against the list of oneOf items |
Return type
PaymentMethodCardResponsePaymentMethodCashRecurrentResponsePaymentMethodCashResponsePaymentMethodSpeiRecurrentnil(if no type matches)