Module: Animoto::Support::StandardEnvelope::ClassMethods

Defined in:
lib/animoto/support/standard_envelope.rb

Instance Method Summary collapse

Instance Method Details

#payload_key(key = nil) ⇒ String

Get or set the payload key for this class. When building an instance of this class from a response body, the payload key determines which object in the response payload holds the attributes for the instance.



64
65
66
67
# File 'lib/animoto/support/standard_envelope.rb', line 64

def payload_key key = nil
  @payload_key = key if key
  @payload_key || infer_content_type
end