Record Class ContractualSituation

java.lang.Object
java.lang.Record
energy.eddie.regionconnector.fr.enedis.dto.situation.ContractualSituation

public record ContractualSituation(@Nullable String usagePointId, @Nullable String contractStart, @Nullable String contractType, @Nullable String contractor, @Nullable String balanceResponsibleParty, @Nullable String pricingStructure, @Nullable String distributionTariff, @Nullable String supplierTariffProfile, @Nullable String distributionTariffProfile, @Nullable String supplierMobilePeak, @Nullable String distributionMobilePeak, @Nullable String subscribedPower, @Nullable List<String> segments, @Nullable Customer customer, @Nullable ContactData contactData, @Nullable Person person, @Nullable Organization organization) extends Record
One element of the situation contractuelle API response (GET /situation_contrat_auto/v1/{usage_point_id}), which returns an array of these.

Shaped from the real response, where contact_data, person and organization are siblings of customer rather than nested inside it.

  • Constructor Details

    • ContractualSituation

      public ContractualSituation(@Nullable String usagePointId, @Nullable String contractStart, @Nullable String contractType, @Nullable String contractor, @Nullable String balanceResponsibleParty, @Nullable String pricingStructure, @Nullable String distributionTariff, @Nullable String supplierTariffProfile, @Nullable String distributionTariffProfile, @Nullable String supplierMobilePeak, @Nullable String distributionMobilePeak, @Nullable String subscribedPower, @Nullable List<String> segments, @Nullable Customer customer, @Nullable ContactData contactData, @Nullable Person person, @Nullable Organization organization)
      Creates an instance of a ContractualSituation record class.
      Parameters:
      usagePointId - the value for the usagePointId record component
      contractStart - the value for the contractStart record component
      contractType - the value for the contractType record component
      contractor - the value for the contractor record component
      balanceResponsibleParty - the value for the balanceResponsibleParty record component
      pricingStructure - the value for the pricingStructure record component
      distributionTariff - the value for the distributionTariff record component
      supplierTariffProfile - the value for the supplierTariffProfile record component
      distributionTariffProfile - the value for the distributionTariffProfile record component
      supplierMobilePeak - the value for the supplierMobilePeak record component
      distributionMobilePeak - the value for the distributionMobilePeak record component
      subscribedPower - the value for the subscribedPower record component
      segments - the value for the segments record component
      customer - the value for the customer record component
      contactData - the value for the contactData record component
      person - the value for the person record component
      organization - the value for the organization record component
  • 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.
    • usagePointId

      public @Nullable String usagePointId()
      Returns the value of the usagePointId record component.
      Returns:
      the value of the usagePointId record component
    • contractStart

      public @Nullable String contractStart()
      Returns the value of the contractStart record component.
      Returns:
      the value of the contractStart record component
    • contractType

      public @Nullable String contractType()
      Returns the value of the contractType record component.
      Returns:
      the value of the contractType record component
    • contractor

      public @Nullable String contractor()
      Returns the value of the contractor record component.
      Returns:
      the value of the contractor record component
    • balanceResponsibleParty

      public @Nullable String balanceResponsibleParty()
      Returns the value of the balanceResponsibleParty record component.
      Returns:
      the value of the balanceResponsibleParty record component
    • pricingStructure

      public @Nullable String pricingStructure()
      Returns the value of the pricingStructure record component.
      Returns:
      the value of the pricingStructure record component
    • distributionTariff

      public @Nullable String distributionTariff()
      Returns the value of the distributionTariff record component.
      Returns:
      the value of the distributionTariff record component
    • supplierTariffProfile

      public @Nullable String supplierTariffProfile()
      Returns the value of the supplierTariffProfile record component.
      Returns:
      the value of the supplierTariffProfile record component
    • distributionTariffProfile

      public @Nullable String distributionTariffProfile()
      Returns the value of the distributionTariffProfile record component.
      Returns:
      the value of the distributionTariffProfile record component
    • supplierMobilePeak

      public @Nullable String supplierMobilePeak()
      Returns the value of the supplierMobilePeak record component.
      Returns:
      the value of the supplierMobilePeak record component
    • distributionMobilePeak

      public @Nullable String distributionMobilePeak()
      Returns the value of the distributionMobilePeak record component.
      Returns:
      the value of the distributionMobilePeak record component
    • subscribedPower

      public @Nullable String subscribedPower()
      Returns the value of the subscribedPower record component.
      Returns:
      the value of the subscribedPower record component
    • segments

      public @Nullable List<String> segments()
      Returns the value of the segments record component.
      Returns:
      the value of the segments record component
    • customer

      public @Nullable Customer customer()
      Returns the value of the customer record component.
      Returns:
      the value of the customer record component
    • contactData

      public @Nullable ContactData contactData()
      Returns the value of the contactData record component.
      Returns:
      the value of the contactData record component
    • person

      public @Nullable Person person()
      Returns the value of the person record component.
      Returns:
      the value of the person record component
    • organization

      public @Nullable Organization organization()
      Returns the value of the organization record component.
      Returns:
      the value of the organization record component