Record Class ContractDetails

java.lang.Object
java.lang.Record
energy.eddie.regionconnector.es.datadis.dtos.ContractDetails
Record Components:
cups - CUPS identifier (metering point identifier)
distributor - Distributor
marketer - Retailer (only returned if the user launching the query is the owner of the CUPS)
tension - Voltage
accessFare - Access tariff description
province - Province
municipality - Municipality
postalCode - Postal code
contractedPowerkW - Contracted power in kW
timeDiscrimination - Time discrimination
modePowerControl - Power control mode (ICP/MaxĂ­metro)
startDate - Contract start date
endDate - Contract end date
codeFare - Access tariff code (CNMC codes)
selfConsumptionTypeCode - Self-consumption type code (CNMC codes). Only present if there is self-consumption.
selfConsumptionTypeDesc - Description of the self-consumption type. Only present if there is self-consumption.
section - Section. Only present if there is self-consumption.
subsection - Subsection. Only present if there is self-consumption.
partitionCoefficient - Distribution coefficient. Only present if there is self-consumption.
cau - CAU. Only present if there is self-consumption.
installedCapacity - Installed generation capacity. Only present if there is self-consumption.

public record ContractDetails(String cups, String distributor, String marketer, String tension, String accessFare, String province, String municipality, String postalCode, List<Double> contractedPowerkW, String timeDiscrimination, String modePowerControl, LocalDate startDate, Optional<LocalDate> endDate, String codeFare, Optional<String> selfConsumptionTypeCode, Optional<String> selfConsumptionTypeDesc, Optional<String> section, Optional<String> subsection, Optional<String> partitionCoefficient, Optional<String> cau, Optional<String> installedCapacity) extends Record
This class represents the contract details returned by the Datadis API. The api documentation can be found here.
  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cups

      public String cups()
      Returns the value of the cups record component.
      Returns:
      the value of the cups record component
    • distributor

      public String distributor()
      Returns the value of the distributor record component.
      Returns:
      the value of the distributor record component
    • marketer

      public String marketer()
      Returns the value of the marketer record component.
      Returns:
      the value of the marketer record component
    • tension

      public String tension()
      Returns the value of the tension record component.
      Returns:
      the value of the tension record component
    • accessFare

      public String accessFare()
      Returns the value of the accessFare record component.
      Returns:
      the value of the accessFare record component
    • province

      public String province()
      Returns the value of the province record component.
      Returns:
      the value of the province record component
    • municipality

      public String municipality()
      Returns the value of the municipality record component.
      Returns:
      the value of the municipality record component
    • postalCode

      public String postalCode()
      Returns the value of the postalCode record component.
      Returns:
      the value of the postalCode record component
    • contractedPowerkW

      public List<Double> contractedPowerkW()
      Returns the value of the contractedPowerkW record component.
      Returns:
      the value of the contractedPowerkW record component
    • timeDiscrimination

      public String timeDiscrimination()
      Returns the value of the timeDiscrimination record component.
      Returns:
      the value of the timeDiscrimination record component
    • modePowerControl

      public String modePowerControl()
      Returns the value of the modePowerControl record component.
      Returns:
      the value of the modePowerControl record component
    • startDate

      public LocalDate startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      public Optional<LocalDate> endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component
    • codeFare

      public String codeFare()
      Returns the value of the codeFare record component.
      Returns:
      the value of the codeFare record component
    • selfConsumptionTypeCode

      public Optional<String> selfConsumptionTypeCode()
      Returns the value of the selfConsumptionTypeCode record component.
      Returns:
      the value of the selfConsumptionTypeCode record component
    • selfConsumptionTypeDesc

      public Optional<String> selfConsumptionTypeDesc()
      Returns the value of the selfConsumptionTypeDesc record component.
      Returns:
      the value of the selfConsumptionTypeDesc record component
    • section

      public Optional<String> section()
      Returns the value of the section record component.
      Returns:
      the value of the section record component
    • subsection

      public Optional<String> subsection()
      Returns the value of the subsection record component.
      Returns:
      the value of the subsection record component
    • partitionCoefficient

      public Optional<String> partitionCoefficient()
      Returns the value of the partitionCoefficient record component.
      Returns:
      the value of the partitionCoefficient record component
    • cau

      public Optional<String> cau()
      Returns the value of the cau record component.
      Returns:
      the value of the cau record component
    • installedCapacity

      public Optional<String> installedCapacity()
      Returns the value of the installedCapacity record component.
      Returns:
      the value of the installedCapacity record component