docs/ChargeRequestPaymentMethod.md in conekta-6.0.3 vs docs/ChargeRequestPaymentMethod.md in conekta-6.0.4

- old
+ new

@@ -1,28 +1,49 @@ # Conekta::ChargeRequestPaymentMethod -## Properties +## Class instance methods -| Name | Type | Description | Notes | -| ---- | ---- | ----------- | ----- | -| **expires_at** | **Integer** | Method expiration date as unix timestamp | [optional] | -| **monthly_installments** | **Integer** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] | -| **type** | **String** | | | -| **token_id** | **String** | | [optional] | -| **payment_source_id** | **String** | | [optional] | -| **contract_id** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] | +### `openapi_one_of` -## Example +Returns the list of classes defined in oneOf. +#### Example + ```ruby require 'conekta' -instance = Conekta::ChargeRequestPaymentMethod.new( - expires_at: 1677196303, - monthly_installments: null, - type: card, - token_id: tok_2897348234, - payment_source_id: src_2tLkkyfMPh6v7pFry, - contract_id: S781317595 -) +Conekta::ChargeRequestPaymentMethod.openapi_one_of +# => +# [ +# :'PaymentMethodCardRequest', +# :'PaymentMethodGeneralRequest' +# ] ``` + +### build + +Find the appropriate object from the `openapi_one_of` list and casts the data into it. + +#### Example + +```ruby +require 'conekta' + +Conekta::ChargeRequestPaymentMethod.build(data) +# => #<PaymentMethodCardRequest:0x00007fdd4aab02a0> + +Conekta::ChargeRequestPaymentMethod.build(data_that_doesnt_match) +# => nil +``` + +#### Parameters + +| Name | Type | Description | +| ---- | ---- | ----------- | +| **data** | **Mixed** | data to be matched against the list of oneOf items | + +#### Return type + +- `PaymentMethodCardRequest` +- `PaymentMethodGeneralRequest` +- `nil` (if no type matches)