def formatted_payload
      if @payload.key?("aps")
        @payload
      else
        payload = {}
        payload["aps"] = aps = {}
        @payload.each do |key, value|
          next if value.nil?
          key = key.to_s
          if APS_KEYS.include?(key)
            aps[key] = value
          else
            payload[key] = value
          end
        end
        payload
      end
    end
def formatted_payload
      if @payload.key?("aps")
        @payload
      else
        payload = {}
        payload["aps"] = aps = {}
        @payload.each do |key, value|
          next if value.nil?
          key = key.to_s
          if APS_KEYS.include?(key)
            aps[key] = value
          else
            payload[key] = value
          end
        end
        payload
      end
    end
Unless the payload contains an `aps` entry, the payload is assumed to be a mix of APN defined attributes and
 custom attributes and re-organized according to the specifications.

 @see https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH107-SW1

 @return [Hash]
         the payload organized according to the APN specification.