// Copyright © 2022 Olo Inc. All rights reserved. // This software is made available under the Olo Pay SDK License (See LICENSE.md file) package com.olopaysdkreactnative.data class ErrorCodes { // IMPORTANT: THESE STRINGS MAP DIRECTLY TO TYPES DEFINED IN // THE NPM PACKAGE TYPESCRIPT INTERFACE. CHANGING THESE REQUIRES // CHANGES TO THE TYPESCRIPT INTERFACE companion object { // Method call rejection code keys const val InvalidParameter = "InvalidParameter" const val MissingParameter = "MissingParameter" const val UninitializedSdk = "SdkUninitialized" const val GooglePayUninitialized = "GooglePayUninitialized" const val GooglePayNotReady = "GooglePayNotReady" const val ViewNotFound = "ViewNotFound" const val GeneralError = "generalError" // Error codes based on API exceptions const val ApiError = "ApiError" const val InvalidRequest = "InvalidRequest" const val Connection = "ConnectionError" const val RateLimit = "RateLimitError" // Error codes base on card exceptions const val InvalidCardDetails = "InvalidCardDetails" const val InvalidNumber = "InvalidNumber" const val InvalidExpiration = "InvalidExpiration" const val InvalidCvv = "InvalidCVV" const val InvalidPostalCode = "InvalidPostalCode" const val ExpiredCard = "ExpiredCard" const val CardDeclined = "CardDeclined" const val ProcessingError = "ProcessingError" const val UnknownCardError = "UnknownCardError" } }