001// --------------------------------------------------------------------------------
002// Copyright 2002-2026 Echo Three, LLC
003//
004// Licensed under the Apache License, Version 2.0 (the "License");
005// you may not use this file except in compliance with the License.
006// You may obtain a copy of the License at
007//
008//     http://www.apache.org/licenses/LICENSE-2.0
009//
010// Unless required by applicable law or agreed to in writing, software
011// distributed under the License is distributed on an "AS IS" BASIS,
012// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013// See the License for the specific language governing permissions and
014// limitations under the License.
015// --------------------------------------------------------------------------------
016
017package com.echothree.model.control.payment.server.graphql;
018
019import com.echothree.model.control.graphql.server.graphql.BaseObject;
020import com.echothree.model.data.payment.server.entity.PaymentMethodCreditCard;
021import graphql.annotations.annotationTypes.GraphQLDescription;
022import graphql.annotations.annotationTypes.GraphQLField;
023import graphql.annotations.annotationTypes.GraphQLName;
024import graphql.annotations.annotationTypes.GraphQLNonNull;
025
026@GraphQLDescription("payment method creditCard object")
027@GraphQLName("PaymentMethodCreditCard")
028public class PaymentMethodCreditCardObject
029        extends BaseObject
030        implements PaymentMethodInterface {
031
032    private final PaymentMethodCreditCard paymentMethodCreditCard; // Always Present
033
034    public PaymentMethodCreditCardObject(PaymentMethodCreditCard paymentMethodCreditCard) {
035        this.paymentMethodCreditCard = paymentMethodCreditCard;
036    }
037
038    @GraphQLField
039    @GraphQLDescription("request name on card")
040    @GraphQLNonNull
041    public boolean getRequestNameOnCard() {
042        return paymentMethodCreditCard.getRequestNameOnCard();
043    }
044
045    @GraphQLField
046    @GraphQLDescription("require name on card")
047    @GraphQLNonNull
048    public boolean getRequireNameOnCard() {
049        return paymentMethodCreditCard.getRequireNameOnCard();
050    }
051
052    @GraphQLField
053    @GraphQLDescription("check card number")
054    @GraphQLNonNull
055    public boolean getCheckCardNumber() {
056        return paymentMethodCreditCard.getCheckCardNumber();
057    }
058
059    @GraphQLField
060    @GraphQLDescription("request expiration date")
061    @GraphQLNonNull
062    public boolean getRequestExpirationDate() {
063        return paymentMethodCreditCard.getRequestExpirationDate();
064    }
065
066    @GraphQLField
067    @GraphQLDescription("require expiration date")
068    @GraphQLNonNull
069    public boolean getRequireExpirationDate() {
070        return paymentMethodCreditCard.getRequireExpirationDate();
071    }
072
073    @GraphQLField
074    @GraphQLDescription("check expiration date")
075    @GraphQLNonNull
076    public boolean getCheckExpirationDate() {
077        return paymentMethodCreditCard.getCheckExpirationDate();
078    }
079
080    @GraphQLField
081    @GraphQLDescription("request security code")
082    @GraphQLNonNull
083    public boolean getRequestSecurityCode() {
084        return paymentMethodCreditCard.getRequestSecurityCode();
085    }
086
087    @GraphQLField
088    @GraphQLDescription("require security code")
089    @GraphQLNonNull
090    public boolean getRequireSecurityCode() {
091        return paymentMethodCreditCard.getRequireSecurityCode();
092    }
093
094    @GraphQLField
095    @GraphQLDescription("card number validation pattern")
096    public String getCardNumberValidationPattern() {
097        return paymentMethodCreditCard.getCardNumberValidationPattern();
098    }
099
100    @GraphQLField
101    @GraphQLDescription("security code validation pattern")
102    public String getSecurityCodeValidationPattern() {
103        return paymentMethodCreditCard.getSecurityCodeValidationPattern();
104    }
105
106    @GraphQLField
107    @GraphQLDescription("retain credit card")
108    @GraphQLNonNull
109    public boolean getRetainCreditCard() {
110        return paymentMethodCreditCard.getRetainCreditCard();
111    }
112
113    @GraphQLField
114    @GraphQLDescription("retain security code")
115    @GraphQLNonNull
116    public boolean getRetainSecurityCode() {
117        return paymentMethodCreditCard.getRetainSecurityCode();
118    }
119
120    @GraphQLField
121    @GraphQLDescription("request billing")
122    @GraphQLNonNull
123    public boolean getRequestBilling() {
124        return paymentMethodCreditCard.getRequestBilling();
125    }
126
127    @GraphQLField
128    @GraphQLDescription("require billing")
129    @GraphQLNonNull
130    public boolean getRequireBilling() {
131        return paymentMethodCreditCard.getRequireBilling();
132    }
133
134    @GraphQLField
135    @GraphQLDescription("request issuer")
136    @GraphQLNonNull
137    public boolean getRequestIssuer() {
138        return paymentMethodCreditCard.getRequestIssuer();
139    }
140
141    @GraphQLField
142    @GraphQLDescription("require issuer")
143    @GraphQLNonNull
144    public boolean getRequireIssuer() {
145        return paymentMethodCreditCard.getRequireIssuer();
146    }
147
148}