Skip to content

Latest commit

 

History

History
46 lines (36 loc) · 2.09 KB

ChargeOrderResponsePaymentMethod.md

File metadata and controls

46 lines (36 loc) · 2.09 KB

ChargeOrderResponsePaymentMethod

oneOf schemas

Example

// Import classes:
import com.conekta.model.ChargeOrderResponsePaymentMethod;
import com.conekta.model.PaymentMethodBankTransfer;
import com.conekta.model.PaymentMethodCard;
import com.conekta.model.PaymentMethodCash;

public class Example {
    public static void main(String[] args) {
        ChargeOrderResponsePaymentMethod exampleChargeOrderResponsePaymentMethod = new ChargeOrderResponsePaymentMethod();

        // create a new PaymentMethodBankTransfer
        PaymentMethodBankTransfer examplePaymentMethodBankTransfer = new PaymentMethodBankTransfer();
        // set ChargeOrderResponsePaymentMethod to PaymentMethodBankTransfer
        exampleChargeOrderResponsePaymentMethod.setActualInstance(examplePaymentMethodBankTransfer);
        // to get back the PaymentMethodBankTransfer set earlier
        PaymentMethodBankTransfer testPaymentMethodBankTransfer = (PaymentMethodBankTransfer) exampleChargeOrderResponsePaymentMethod.getActualInstance();

        // create a new PaymentMethodCard
        PaymentMethodCard examplePaymentMethodCard = new PaymentMethodCard();
        // set ChargeOrderResponsePaymentMethod to PaymentMethodCard
        exampleChargeOrderResponsePaymentMethod.setActualInstance(examplePaymentMethodCard);
        // to get back the PaymentMethodCard set earlier
        PaymentMethodCard testPaymentMethodCard = (PaymentMethodCard) exampleChargeOrderResponsePaymentMethod.getActualInstance();

        // create a new PaymentMethodCash
        PaymentMethodCash examplePaymentMethodCash = new PaymentMethodCash();
        // set ChargeOrderResponsePaymentMethod to PaymentMethodCash
        exampleChargeOrderResponsePaymentMethod.setActualInstance(examplePaymentMethodCash);
        // to get back the PaymentMethodCash set earlier
        PaymentMethodCash testPaymentMethodCash = (PaymentMethodCash) exampleChargeOrderResponsePaymentMethod.getActualInstance();
    }
}