com.globalcharge.android
Enum FailureType

java.lang.Object
  extended by java.lang.Enum<FailureType>
      extended by com.globalcharge.android.FailureType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<FailureType>

public enum FailureType
extends java.lang.Enum<FailureType>

The different client and server failures we may come across.


Enum Constant Summary
BILLED_BUT_ACCOUNT_NOT_CREDITED
          User has been billed Account not credited.
BILLING_REJECTED_BY_YOUR_NETWORK
          For unknown reason the billing has been rejected by the user's network operator
GENERAL_FAILURE
          Generic failure.
INVALID_PRODUCT
          this happen's if the developer's applications returns a product to the GAL that was not in the list of products originally passed by the GAL
INVALID_STATE_SEQUENCE
          This happens when billing requests are done in the wrong order.
NETWORK_OPERATOR_NOT_SUPPORTED
          Unsupported network operator, meaning GlobalCharge has no billing arrangements with this network operator.
NO_CREDIT
          User has no credit on their mobile account.
NO_NETWORK_CONNECTION_DETECTED
          No network connection, could be not 3G connection, WiFi or phone is on Airplane Mode, could also mean no SIM car on the handset.
NONE
          No failure recorded.
NUMBER_BARRED
          User phone number has been blacklisted by the operator or GlobalCharge Billing System
TIMEOUT
          connection to server has timed out
UNKNOWN_ACCOUNT
          AccountId may be disabled, unknown or suspended
WRONG_MODE_FOR_TEST_NUMBER
          Test number can only be set when application is running on EnviroNment.LOCAL mode.
 
Method Summary
static FailureType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static FailureType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final FailureType NONE
No failure recorded.


GENERAL_FAILURE

public static final FailureType GENERAL_FAILURE
Generic failure.


TIMEOUT

public static final FailureType TIMEOUT
connection to server has timed out


NO_NETWORK_CONNECTION_DETECTED

public static final FailureType NO_NETWORK_CONNECTION_DETECTED
No network connection, could be not 3G connection, WiFi or phone is on Airplane Mode, could also mean no SIM car on the handset.


NO_CREDIT

public static final FailureType NO_CREDIT
User has no credit on their mobile account. User may need to top up


NUMBER_BARRED

public static final FailureType NUMBER_BARRED
User phone number has been blacklisted by the operator or GlobalCharge Billing System


UNKNOWN_ACCOUNT

public static final FailureType UNKNOWN_ACCOUNT
AccountId may be disabled, unknown or suspended


NETWORK_OPERATOR_NOT_SUPPORTED

public static final FailureType NETWORK_OPERATOR_NOT_SUPPORTED
Unsupported network operator, meaning GlobalCharge has no billing arrangements with this network operator.


BILLED_BUT_ACCOUNT_NOT_CREDITED

public static final FailureType BILLED_BUT_ACCOUNT_NOT_CREDITED
User has been billed Account not credited. This normally happens if we bill the user and unable to connect to the client's server or receive confirmation from the client's server.


BILLING_REJECTED_BY_YOUR_NETWORK

public static final FailureType BILLING_REJECTED_BY_YOUR_NETWORK
For unknown reason the billing has been rejected by the user's network operator


WRONG_MODE_FOR_TEST_NUMBER

public static final FailureType WRONG_MODE_FOR_TEST_NUMBER
Test number can only be set when application is running on EnviroNment.LOCAL mode.


INVALID_PRODUCT

public static final FailureType INVALID_PRODUCT
this happen's if the developer's applications returns a product to the GAL that was not in the list of products originally passed by the GAL


INVALID_STATE_SEQUENCE

public static final FailureType INVALID_STATE_SEQUENCE
This happens when billing requests are done in the wrong order. i.e. trying to purchase a product before initiating a payment.

Method Detail

values

public static FailureType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FailureType c : FailureType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FailureType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null