Exception: WhatsappSdk::Api::Medias::InvalidMediaTypeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/whatsapp_sdk/api/medias.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(media_type:) ⇒ InvalidMediaTypeError

Returns a new instance of InvalidMediaTypeError.



26
27
28
29
30
31
# File 'lib/whatsapp_sdk/api/medias.rb', line 26

def initialize(media_type:)
  @media_type = media_type
  message =  "Invalid Media Type #{media_type}. See the supported types in the official documentation " \
             "https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media#supported-media-types."
  super(message)
end

Instance Attribute Details

#media_typeObject (readonly)

Returns the value of attribute media_type.



24
25
26
# File 'lib/whatsapp_sdk/api/medias.rb', line 24

def media_type
  @media_type
end