class Vellum::UploadDocumentResponse

def self.from_json(json_object:)

Returns:
  • (UploadDocumentResponse) -

Parameters:
  • json_object (JSON) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  JSON.parse(json_object)
  document_id = struct.document_id
  new(document_id: document_id, additional_properties: struct)
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.document_id.is_a?(String) != false || raise("Passed value for field obj.document_id is not the expected type, validation failed.")
end

def initialize(document_id:, additional_properties: nil)

Returns:
  • (UploadDocumentResponse) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • document_id (String) -- The ID of the newly created document.
def initialize(document_id:, additional_properties: nil)
  # @type [String] The ID of the newly created document.
  @document_id = document_id
  # @type [OpenStruct] Additional properties unmapped to the current class definition
  @additional_properties = additional_properties
end

def to_json(*_args)

Returns:
  • (JSON) -
def to_json(*_args)
  { "document_id": @document_id }.to_json
end