Class EstatePricing
java.lang.Object
com.eqixiac.equinix.design.estate.EstatePricing
Prices existing resources through a
RateCard and turns each quote into a CostLine
with a range that reflects its provenance: live Equinix, contract (CUSTOM) and provider-API
prices are exact; reference prices get ± EstateThresholds.referencePriceRangePercent();
estimates get ± EstateThresholds.estimatePriceRangePercent().
Every line is restated in one reporting currency (currency(), USD unless set) through
CurrencyConverters, so every finding's saving is in that currency and savings can be totalled: a line
quoted in another currency (live Fabric pricing quotes London in GBP) keeps its original amount and currency,
the rate and the rate's source and date in CostLine.conversion(). A price whose currency no rate
source covers is unpriced with that reason.
A lookup that cannot be priced returns a EstatePricing.Priced with a reason, never a zero. Lookups are
cached for the life of this object, so a rule that prices the same tier many times makes one
request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe result of a price lookup: a cost line, or the reason there is none. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEstatePricing(RateCard rateCard, EstateThresholds thresholds) Creates pricing over a rate card, reporting in USD with the default rate sources (live ECB rates, then the bundled table).EstatePricing(RateCard rateCard, EstateThresholds thresholds, String currency, CurrencyConverter supplied, CurrencyConverter defaultRates) Creates pricing over a rate card in a stated reporting currency. -
Method Summary
Modifier and TypeMethodDescriptionPrices one virtual connection.The converter in use (for its fallback notes).currency()The currency every priced line is restated in.What happened to currencies so far: one advisory per source currency converted, and any rate source that fell back.Prices one Cloud Router.static TermThe term a resource is billed on today.static EstatePricingPricing that prices nothing, for analyses run without a rate card.
-
Field Details
-
DEFAULT_CURRENCY
-
-
Constructor Details
-
EstatePricing
Creates pricing over a rate card, reporting in USD with the default rate sources (live ECB rates, then the bundled table).- Parameters:
rateCard- the rate card, ornullto leave everything unpricedthresholds- the thresholds (for the price ranges)
-
EstatePricing
public EstatePricing(RateCard rateCard, EstateThresholds thresholds, String currency, CurrencyConverter supplied, CurrencyConverter defaultRates) Creates pricing over a rate card in a stated reporting currency.- Parameters:
rateCard- the rate card, ornullto leave everything unpricedthresholds- the thresholds (for the price ranges)currency- the ISO 4217 reporting currency;nullfor USDsupplied- a converter ranked above the default rate sources, ornulldefaultRates- replaces the default rate sources (for exampleCurrencyConverters.bundledOnly());nullfor the defaults
-
-
Method Details
-
currency
-
converter
The converter in use (for its fallback notes).- Returns:
- the converter chain
-
currencyNotes
What happened to currencies so far: one advisory per source currency converted, and any rate source that fell back.- Returns:
- the notes, empty when every price was already in
currency()
-
connection
public EstatePricing.Priced connection(String label, String type, Integer bandwidthMbps, String metro, Term term) Prices one virtual connection.- Parameters:
label- the cost-line labeltype- the connection type as the API reports it (for exampleEVPL_VC)bandwidthMbps- the bandwidthmetro- the metro code, ornullterm- the term- Returns:
- the priced line, or the reason it could not be priced
-
router
Prices one Cloud Router.- Parameters:
label- the cost-line labelpackageCode- the package codemetro- the metro code, ornullterm- the term- Returns:
- the priced line, or the reason it could not be priced
-
termOf
The term a resource is billed on today.- Parameters:
termMonths- the recorded term length, ornull- Returns:
- the matching term (
Term.MONTH_1for on-demand or an unlisted length)
-