# ZDCAppCost

``@interface ZDCAppCost : NSObject``

Provides a calculation of the app’s raw cloud costs.

Instances of this class are created via `-[ZDCUserBill calculateCost:]`.

• ``` finalCost ```

If ZDCUserBill.isFinal is true, then this value will be non-nil. This is the case when the bill is for a previous month.

#### Declaration

Objective-C

``@property (readonly, nonatomic, nullable) ZDCAppCostDetails *finalCost;``

Swift

``var finalCost: ZDCAppCostDetails? { get }``
• ``` accumulatedCost ```

If ZDCUserBill.isFinal is false, then this value will be non-nil. This is the case when the bill is for the current month.

#### Declaration

Objective-C

``@property (readonly, nonatomic, nullable) ZDCAppCostDetails *accumulatedCost;``

Swift

``var accumulatedCost: ZDCAppCostDetails? { get }``
• ``` estimatedCost ```

If ZDCUserBill.isFinal is false, then this value will be non-nil. This is the case when the bill is for the current month.

The estimatedCost gives us a rough estimate of what the cost may be at the end of the month. For example, if we’re half-way thru the current month, then the estimate essentially doubles the current values.

A good analogy here is your electric bill. If you look at your electric meter halfway thru the month, it will tell you how much electricity you’ve used so far. This is the equivalent of the accumulated cost. Assuming your electricity usage so far this month isn’t out-of-the-ordinary, you can calculate a decent estimate of your end-of-the-month usage. And this is equivalent of the estimated cost.

#### Declaration

Objective-C

``@property (readonly, nonatomic, nullable) ZDCAppCostDetails *estimatedCost;``

Swift

``var estimatedCost: ZDCAppCostDetails? { get }``
• ``` estimatedBill ```

If ZDCUserBill.isFinal is false, then this value will be non-nil. This is the case when the bill is for the current month.

The estimatedBill gives us a rough estimate of what we guess will be the tallies at the end of the month. For example, if we’re half-way thru the current month, then the estimate essentially doubles the current values.

A good analogy here is your electric bill. If you look at your electric meter halfway thru the month, it will tell you how much electricity you’ve used so far. This is the equivalent of the accumulated cost. Assuming your electricity usage so far this month isn’t out-of-the-ordinary, you can calculate a decent estimate of your end-of-the-month usage. And this is equivalent of the estimated cost.

#### Declaration

Objective-C

``@property (readonly, nonatomic, nullable) ZDCAppBill *estimatedBill;``

Swift

``var estimatedBill: ZDCAppBill? { get }``
• ``` monthStart ```

Timestamp of when the month started.

#### Declaration

Objective-C

``@property (readonly, nonatomic) NSDate *_Nonnull monthStart;``

Swift

``var monthStart: Date { get }``
• ``` monthEnd ```

Timestamp of when the month ended.

#### Declaration

Objective-C

``@property (readonly, nonatomic) NSDate *_Nonnull monthEnd;``

Swift

``var monthEnd: Date { get }``
• ``` elapsed ```

The number of seconds that have elapsed so far (for the month).

This is useful when the bill is for the current month. (i.e. ZDCUserBill.isFinal == false) It gives you an idea of how far thru the month we are, and thus how accurate the estimated costs are.

#### Declaration

Objective-C

``@property (readonly, nonatomic) NSTimeInterval elapsed;``

Swift

``var elapsed: TimeInterval { get }``
• ``` remaining ```

The number of seconds that are remaining (for the month).

This is useful when the bill is for the current month. (i.e. ZDCUserBill.isFinal == false) It gives you an idea of how far thru the month we are, and thus how accurate the estimated costs are.

#### Declaration

Objective-C

``@property (readonly, nonatomic) NSTimeInterval remaining;``

Swift

``var remaining: TimeInterval { get }``