Class TransactionData

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, TransactionDataOrBuilder, Serializable

    public final class TransactionData
    extends com.google.protobuf.GeneratedMessageV3
    implements TransactionDataOrBuilder
     Transaction data associated with a payment protected by reCAPTCHA Enterprise.
     All fields are optional.
     
    Protobuf type google.cloud.recaptchaenterprise.v1beta1.TransactionData
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasTransactionId

        public boolean hasTransactionId()
         Unique identifier for the transaction. This custom identifier can be used
         to reference this transaction in the future, for example, labeling a refund
         or chargeback event. Two attempts at the same transaction should use the
         same transaction id.
         
        optional string transaction_id = 11;
        Specified by:
        hasTransactionId in interface TransactionDataOrBuilder
        Returns:
        Whether the transactionId field is set.
      • getTransactionId

        public String getTransactionId()
         Unique identifier for the transaction. This custom identifier can be used
         to reference this transaction in the future, for example, labeling a refund
         or chargeback event. Two attempts at the same transaction should use the
         same transaction id.
         
        optional string transaction_id = 11;
        Specified by:
        getTransactionId in interface TransactionDataOrBuilder
        Returns:
        The transactionId.
      • getTransactionIdBytes

        public com.google.protobuf.ByteString getTransactionIdBytes()
         Unique identifier for the transaction. This custom identifier can be used
         to reference this transaction in the future, for example, labeling a refund
         or chargeback event. Two attempts at the same transaction should use the
         same transaction id.
         
        optional string transaction_id = 11;
        Specified by:
        getTransactionIdBytes in interface TransactionDataOrBuilder
        Returns:
        The bytes for transactionId.
      • getPaymentMethod

        public String getPaymentMethod()
         The payment method for the transaction. The allowed values are:
        
         * credit-card
         * debit-card
         * gift-card
         * processor-{name} (If a third-party is used, for example,
         processor-paypal)
         * custom-{name} (If an alternative method is used, for example,
         custom-crypto)
         
        string payment_method = 1;
        Specified by:
        getPaymentMethod in interface TransactionDataOrBuilder
        Returns:
        The paymentMethod.
      • getPaymentMethodBytes

        public com.google.protobuf.ByteString getPaymentMethodBytes()
         The payment method for the transaction. The allowed values are:
        
         * credit-card
         * debit-card
         * gift-card
         * processor-{name} (If a third-party is used, for example,
         processor-paypal)
         * custom-{name} (If an alternative method is used, for example,
         custom-crypto)
         
        string payment_method = 1;
        Specified by:
        getPaymentMethodBytes in interface TransactionDataOrBuilder
        Returns:
        The bytes for paymentMethod.
      • getCardBin

        public String getCardBin()
         The Bank Identification Number - generally the first 6 or 8 digits of the
         card.
         
        string card_bin = 2;
        Specified by:
        getCardBin in interface TransactionDataOrBuilder
        Returns:
        The cardBin.
      • getCardBinBytes

        public com.google.protobuf.ByteString getCardBinBytes()
         The Bank Identification Number - generally the first 6 or 8 digits of the
         card.
         
        string card_bin = 2;
        Specified by:
        getCardBinBytes in interface TransactionDataOrBuilder
        Returns:
        The bytes for cardBin.
      • getCardLastFourBytes

        public com.google.protobuf.ByteString getCardLastFourBytes()
         The last four digits of the card.
         
        string card_last_four = 3;
        Specified by:
        getCardLastFourBytes in interface TransactionDataOrBuilder
        Returns:
        The bytes for cardLastFour.
      • getCurrencyCodeBytes

        public com.google.protobuf.ByteString getCurrencyCodeBytes()
         The currency code in ISO-4217 format.
         
        string currency_code = 4;
        Specified by:
        getCurrencyCodeBytes in interface TransactionDataOrBuilder
        Returns:
        The bytes for currencyCode.
      • getValue

        public double getValue()
         The decimal value of the transaction in the specified currency.
         
        double value = 5;
        Specified by:
        getValue in interface TransactionDataOrBuilder
        Returns:
        The value.
      • getShippingValue

        public double getShippingValue()
         The value of shipping in the specified currency. 0 for free or no shipping.
         
        double shipping_value = 12;
        Specified by:
        getShippingValue in interface TransactionDataOrBuilder
        Returns:
        The shippingValue.
      • hasShippingAddress

        public boolean hasShippingAddress()
         Destination address if this transaction involves shipping a physical item.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.Address shipping_address = 6;
        Specified by:
        hasShippingAddress in interface TransactionDataOrBuilder
        Returns:
        Whether the shippingAddress field is set.
      • getShippingAddress

        public TransactionData.Address getShippingAddress()
         Destination address if this transaction involves shipping a physical item.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.Address shipping_address = 6;
        Specified by:
        getShippingAddress in interface TransactionDataOrBuilder
        Returns:
        The shippingAddress.
      • hasBillingAddress

        public boolean hasBillingAddress()
         Address associated with the payment method when applicable.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.Address billing_address = 7;
        Specified by:
        hasBillingAddress in interface TransactionDataOrBuilder
        Returns:
        Whether the billingAddress field is set.
      • getBillingAddress

        public TransactionData.Address getBillingAddress()
         Address associated with the payment method when applicable.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.Address billing_address = 7;
        Specified by:
        getBillingAddress in interface TransactionDataOrBuilder
        Returns:
        The billingAddress.
      • hasUser

        public boolean hasUser()
         Information about the user paying/initiating the transaction.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.User user = 8;
        Specified by:
        hasUser in interface TransactionDataOrBuilder
        Returns:
        Whether the user field is set.
      • getUser

        public TransactionData.User getUser()
         Information about the user paying/initiating the transaction.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.User user = 8;
        Specified by:
        getUser in interface TransactionDataOrBuilder
        Returns:
        The user.
      • getMerchantsCount

        public int getMerchantsCount()
         Information about the user or users fulfilling the transaction.
         
        repeated .google.cloud.recaptchaenterprise.v1beta1.TransactionData.User merchants = 13;
        Specified by:
        getMerchantsCount in interface TransactionDataOrBuilder
      • getMerchants

        public TransactionData.User getMerchants​(int index)
         Information about the user or users fulfilling the transaction.
         
        repeated .google.cloud.recaptchaenterprise.v1beta1.TransactionData.User merchants = 13;
        Specified by:
        getMerchants in interface TransactionDataOrBuilder
      • getItemsCount

        public int getItemsCount()
         Items purchased in this transaction.
         
        repeated .google.cloud.recaptchaenterprise.v1beta1.TransactionData.Item items = 14;
        Specified by:
        getItemsCount in interface TransactionDataOrBuilder
      • hasGatewayInfo

        public boolean hasGatewayInfo()
         Information about the payment gateway's response to the transaction.
         
        .google.cloud.recaptchaenterprise.v1beta1.TransactionData.GatewayInfo gateway_info = 10;
        Specified by:
        hasGatewayInfo in interface TransactionDataOrBuilder
        Returns:
        Whether the gatewayInfo field is set.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static TransactionData parseFrom​(ByteBuffer data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(ByteBuffer data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(com.google.protobuf.ByteString data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(com.google.protobuf.ByteString data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(byte[] data)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(byte[] data,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static TransactionData parseFrom​(com.google.protobuf.CodedInputStream input,
                                                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                         throws IOException
        Throws:
        IOException
      • newBuilderForType

        public TransactionData.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public TransactionData.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected TransactionData.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • parser

        public static com.google.protobuf.Parser<TransactionData> parser()
      • getParserForType

        public com.google.protobuf.Parser<TransactionData> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public TransactionData getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder