{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/woolworths-group/json-schema/woolworths-group-merchant-api-application-queries-view-models-wallet-wallet-view-model-schema.json",
  "title": "Merchant.API.Application.Queries.ViewModels.Wallet.WalletViewModel",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woolworths-group-wallet-services-api-openapi.yml#/components/schemas/Merchant.API.Application.Queries.ViewModels.Wallet.WalletViewModel",
  "required": [
    "buyer",
    "merchantId",
    "payToInstruments"
  ],
  "type": "object",
  "properties": {
    "merchantId": {
      "minLength": 1,
      "type": "string",
      "description": "ID of the merchant."
    },
    "buyer": {
      "$ref": "#/$defs/Merchant.API.Application.Queries.ViewModels.Wallet.WalletBuyerViewModel"
    },
    "payToInstruments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Merchant.API.Application.Queries.ViewModels.Wallet.InstrumentViewModel"
      }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Merchant.API.Application.Queries.ViewModels.Enums.InstrumentLabelType": {
      "title": "Instrument Label Type",
      "enum": [
        "BBAN",
        "PAYID"
      ],
      "type": "string",
      "description": "The instrument's label type. BBAN represents a Bank Account, PayID represents a PayID. For best customer experience, please use this when displaying the instrument to the consumer on store checkout or digital wallet web pages."
    },
    "Merchant.API.Application.Queries.ViewModels.Wallet.InstrumentViewModel": {
      "title": "Instrument View Model",
      "required": [
        "instrumentId",
        "instrumentLabel",
        "instrumentLabelType",
        "isOneOff"
      ],
      "type": "object",
      "properties": {
        "instrumentId": {
          "minLength": 1,
          "type": "string",
          "description": "ID of the PayTo instrument."
        },
        "instrumentLabelType": {
          "$ref": "#/$defs/Merchant.API.Application.Queries.ViewModels.Enums.InstrumentLabelType"
        },
        "instrumentLabel": {
          "minLength": 1,
          "type": "string",
          "description": "Instrument's label value that's recognisable by the consumer. Display this value when presenting the instrument to the consumer on store checkout or digital wallet web pages."
        },
        "isOneOff": {
          "type": "boolean",
          "description": "Indicates if this instrument can be used to make only one PayTo payment or multiple ones. True indicates that only one payment can be made by the instrument, False indicates multiple payments can be made by the instrument."
        }
      },
      "additionalProperties": false,
      "description": "This is the view model for the Instrument."
    },
    "Merchant.API.Application.Queries.ViewModels.Wallet.WalletBuyerViewModel": {
      "type": "object",
      "properties": {
        "buyerId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ID of the buyer for whom this session was created."
        },
        "buyerName": {
          "type": [
            "string",
            "null"
          ],
          "description": "The buyer or shopper full name as it is known to the merchant."
        }
      },
      "additionalProperties": false,
      "description": "This object contains the buyer details."
    }
  }
}