   def new(command_id, command_status, sequence_number) do
     case CommandNames.name_by_id(command_id) do
       {:ok, name} ->
-        {:ok, %SMPPEX.Pdu{
+        {:ok, %Pdu{
           command_id: command_id,
           command_name: name,
           command_status: command_status,
           sequence_number: sequence_number
         }}
       :unknown ->
-        {:unknown, %SMPPEX.Pdu{
+        {:unknown, %Pdu{
           command_id: command_id,
           command_status: command_status,
           sequence_number: sequence_number,

defmodule SMPPEX.Pdu do
  alias SMPPEX.Protocol.CommandNames

  defstruct [
    command_id: 0,

  end

  def set_body(pdu, body) do
    %Pdu{ pdu | body: body }
  end

  def set_mandatory_fields(pdu, fields) do
    %Pdu{ pdu | mandatory: fields }
  end

  def set_optional_fields(pdu, tlvs) do
    %Pdu{ pdu | optional: tlvs }
  end
end
