Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.59 KB

ChargeRequestPaymentMethod.md

File metadata and controls

37 lines (28 loc) · 1.59 KB

ChargeRequestPaymentMethod

oneOf schemas

Example

// Import classes:
import com.conekta.model.ChargeRequestPaymentMethod;
import com.conekta.model.PaymentMethodCardRequest;
import com.conekta.model.PaymentMethodGeneralRequest;

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

        // create a new PaymentMethodCardRequest
        PaymentMethodCardRequest examplePaymentMethodCardRequest = new PaymentMethodCardRequest();
        // set ChargeRequestPaymentMethod to PaymentMethodCardRequest
        exampleChargeRequestPaymentMethod.setActualInstance(examplePaymentMethodCardRequest);
        // to get back the PaymentMethodCardRequest set earlier
        PaymentMethodCardRequest testPaymentMethodCardRequest = (PaymentMethodCardRequest) exampleChargeRequestPaymentMethod.getActualInstance();

        // create a new PaymentMethodGeneralRequest
        PaymentMethodGeneralRequest examplePaymentMethodGeneralRequest = new PaymentMethodGeneralRequest();
        // set ChargeRequestPaymentMethod to PaymentMethodGeneralRequest
        exampleChargeRequestPaymentMethod.setActualInstance(examplePaymentMethodGeneralRequest);
        // to get back the PaymentMethodGeneralRequest set earlier
        PaymentMethodGeneralRequest testPaymentMethodGeneralRequest = (PaymentMethodGeneralRequest) exampleChargeRequestPaymentMethod.getActualInstance();
    }
}