Log in
Interface

MessageInterface

Magento\GiftMessage\Api\Data\MessageInterface

What it does

This interface defines the data structure for gift messages that customers can attach to orders or individual items in Magento 2.

Developers use this interface when working with gift message data through the API, accessing properties like sender name, recipient name, message text, and customer ID.

It's primarily used in checkout flows and order management where gift messaging features are enabled.

Public Methods

  • getGiftMessageId()
  • setGiftMessageId()
  • getCustomerId()
  • setCustomerId()
  • getSender()
  • setSender()
  • getRecipient()
  • setRecipient()
  • getMessage()
  • setMessage()
  • getExtensionAttributes()
  • setExtensionAttributes()