Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

installation for the customer.

Code Block
[

   {

       "Id":        <value>            <value>     // Data: SonWin installation number (AINSD.INSTNR), as string

       "Address":   <value>       <value>     // Data: street + house number (AINSD.ADRESSE + AINSD.HUSNUMMER)

       "ZipCode":   <value>       <value>     // Data: postal code (AINSD.POSTNUM)

       "City":      <value>          <value>     // Data: city name (IPOST.NAVN, falling back to AINSD.STED; empty string if both null)

       "Properties": null       // Hardcoded null: BrightLocationProperties is never populated by the mapper

                             //   (PropertyType, NumberOfResidents, Size, HouseAge, Cars[], Heating,

                             //    HeatingSecondary, Gadgets[] are all unused today)

    "PriceZone": <value>    Hardcoded null
    "PriceZone": <value>     // Derived: from ZipCode -> "DK1" if zip >= 6000, "DK2" if zip < 6000,

                             //   null if the zip code cannot be parsed

       "Services": [                       // Data: the electricity service(s) for this installation (empty array if none)

           {

               "Id":                    <value>                     <value>  // Data: metering point id / EAN (IndividualMPoints.MeteringPointId, aka AftageNr)

               "Type":                   <value>  // Derived: mapped from SonWin forsyningsart. For electricity this is

                                          //   always "consumption_trade". (Other types map<value> to water/heating/

                                          //   cooling/tv/broadband/waste/gas_trade, but only El is queried today.)

        Hardcoded "consumption_trade" 
        "Status":                "Active" // Hardcoded: BrightServiceStatus.Active.ToString().

                                          //   NOTE: this emits the enum NAME "Active" (capital A), NOT the

                                          "Active" //   display valueHardcoded: "activeActive".
 TODO in code: derive real status from SonWin.

        "MeasurementResolution": <value> <value>  // Hardcoded Derived"15min" from
 forsyningsart: electricity => "hour"

                                          //   (broadband => "noneMeasurementId";:  other types default to "none" - TODO).

        "MeasurementId":         <value>  <value>  // Data: metering point id (same value as Service.Id / AftageNr)

               "DeliveryPointId":       null           null     // Hardcoded null:
   never set by the mapper

        "CostResolution":        null            null     // Hardcoded null:
   never set by the mapper

        "CostId":                null                    null     // Hardcoded null:
   never set by the mapper

        "Properties":            null                null     // Hardcoded null: BrightServiceProperties (ShowCost,

                                          //   RealtimeMeasurements) is never populated

               "StartDate":             <value>              <value>  // Data: current supply start date (SWMarket MeteringPointRoleOccurrence.FromDate),

                                          //   as DateTimeOffset (UTC/zero offset). Required - null fails validation.

               "EndDate":               <value>                <value>  // Data: current supply end date (SWMarket ...ToDate), as DateTimeOffset.

                                                                                   //     OMITTED from the JSON entirely when null (JsonIgnore WhenWritingNull);

                                                                                   //     null/absent means the supply has no scheduled end (still active).

           }

       ],

       "Longitude": null        null        // Hardcoded null:
 never set by the mapper

    "Latitude":   null  null        // Hardcoded null: never set by// theHardcoded mappernull

   }
]
]

Notes:

  - Properties, Longitude and Latitude on the location are always null/absent.

...