---
schema_version: "1"
id: aa200366a2efcb3613c9013485301466a82270bd98f36cfa2f5f0f4f658ccc85
title: ConsumptionCard Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_sfdw_ConsumptionCard.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4e57d2dc0ffb4235bd115d5e6878e51c77a40e48ca3e576d9ee538ddffa96467
description: Represents a Digital Wallet consumption card, including its consumption, total entitlement, and related consumption alerts.Creates a new instance of the ConsumptionCard class using the specified card details and alerts.The environment type of the org containing the card’s entitlement.The developer name for the consumption card.The consumption alerts already triggered for the consumption card.The total entitlement available for the consumption card.The number of units consumed for the consumption card.The buying model of the consumption card.
---
# ConsumptionCard Class

Represents a Digital Wallet consumption card, including its consumption, total entitlement, and related consumption alerts.

## Namespace

[sfdw](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_sfdw.htm "Contains classes that describe Digital Wallet consumption card status and the alerts triggered when consumption crosses a threshold.")

- **[ConsumptionCard Constructors](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_constructors)**
- **[ConsumptionCard Properties](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_properties)**

## ConsumptionCard Constructors

The following are constructors for ConsumptionCard.

- **[ConsumptionCard(cardDefinitionDeveloperName, businessEnvType, usageModel, unitsConsumed, totalEntitlement, consumptionAlerts)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_ctor)**  
    Creates a new instance of the ConsumptionCard class using the specified card details and alerts.

### ConsumptionCard(cardDefinitionDeveloperName, businessEnvType, usageModel, unitsConsumed, totalEntitlement, consumptionAlerts)

Creates a new instance of the ConsumptionCard class using the specified card details and alerts.

#### Signature

public ConsumptionCard(String cardDefinitionDeveloperName, String businessEnvType, String usageModel, Double unitsConsumed, Double totalEntitlement, List<sfdw.ConsumptionAlert> consumptionAlerts)

#### Parameters

cardDefinitionDeveloperName

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The developer name for the consumption card.

businessEnvType

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The environment type of the org containing the card’s entitlement.

usageModel

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

The buying model for the consumption card.

unitsConsumed

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

The number of units consumed for the consumption card.

totalEntitlement

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

The total entitlement available for the consumption card.

consumptionAlerts

Type: [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_System_List_methods) <sfdw.ConsumptionAlert>

The consumption alerts already triggered for the consumption card.

## ConsumptionCard Properties

The following are properties for ConsumptionCard.

- **[businessEnvType](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_businessEnvType)**  
    The environment type of the org containing the card’s entitlement.
- **[cardDefinitionDeveloperName](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_cardDefinitionDeveloperName)**  
    The developer name for the consumption card.
- **[consumptionAlerts](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_consumptionAlerts)**  
    The consumption alerts already triggered for the consumption card.
- **[totalEntitlement](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_totalEntitlement)**  
    The total entitlement available for the consumption card.
- **[unitsConsumed](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_unitsConsumed)**  
    The number of units consumed for the consumption card.
- **[usageModel](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdw_ConsumptionCard.htm#apex_sfdw_ConsumptionCard_usageModel)**  
    The buying model of the consumption card.

### businessEnvType

The environment type of the org containing the card’s entitlement.

#### Signature

public String businessEnvType {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### cardDefinitionDeveloperName

The developer name for the consumption card.

#### Signature

public String cardDefinitionDeveloperName {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### consumptionAlerts

The consumption alerts already triggered for the consumption card.

#### Signature

public List<sfdw.ConsumptionAlert> consumptionAlerts {get; set;}

#### Property Value

Type: List<sfdw.ConsumptionAlert>

### totalEntitlement

The total entitlement available for the consumption card.

#### Signature

public Double totalEntitlement {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### unitsConsumed

The number of units consumed for the consumption card.

#### Signature

public Double unitsConsumed {get; set;}

#### Property Value

Type: [Double](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_double.htm#apex_methods_system_double "Contains methods for the Double primitive data type.")

### usageModel

The buying model of the consumption card.

#### Signature

public String usageModel {get; set;}

#### Property Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")