openapi: 3.1.1
info:
  title: EV Charging — Charging Offer Attributes (v1)
  version: 1.0.0
  x-profile-id: profiles/ev-charging/ev_charging/v1.0/charging-offer
  description: >
    Attribute schemas for charging offers (Offer.attributes).
    These attributes are attached to Offer.attributes to provide tariff details beyond 
    core price fields including per-kWh or time-based pricing, idle fee policies, 
    and accepted payment methods.

components:
  schemas:
    ########################################################################
    # OFFER.ATTRIBUTES — ChargingOffer (pruned; EV/commercial bits)
    ########################################################################
    ChargingOffer:
      type: object
      additionalProperties: false
      x-jsonld:
        "@context": ./context.jsonld
        "@type": ChargingOffer
      properties:

        tariffModel:
          type: string
          enum: [PER_KWH, PER_MINUTE, SUBSCRIPTION, TIME_OF_DAY]
          description: Tariff model classification used by the provider.
          example: "PER_KWH"
          x-jsonld: { "@id": tariffModel }

        idleFeePolicy:
          allOf:
            - $ref: "https://raw.githubusercontent.com/beckn/protocol-specifications-v2/tags/core-2.0.0-rc-eos-release/schema/core/v2/attributes.yaml#/components/schemas/PriceSpecification"
            - type: object
              description: Idle fee policy specification (reuses Beckn PriceSpecification).
              x-jsonld: { "@id": idleFeePolicy }
          example:
            currency: "INR"
            value: 2
            applicableQuantity:
              unitCode: "MIN"
              unitText: "minutes"
              unitQuantity: 10