CustomerFileResponse

public struct CustomerFileResponse : Decodable, Sendable

Response returned when uploading or retrieving customer files.

This response is returned by POST /customer/files and GET /customer/files requests in SEP-12. It contains metadata about uploaded files including the file ID that can be used to reference the file in subsequent PUT /customer requests.

Files can be referenced in PUT /customer requests using the pattern {field_name}_file_id. For example, if uploading a photo ID front, use “photo_id_front_file_id” in the request.

See SEP-12 Customer Files

  • Unique identifier for the object.

    Declaration

    Swift

    public let fileId: String
  • The Content-Type of the file.

    Declaration

    Swift

    public let contentType: String
  • The size in bytes of the file object.

    Declaration

    Swift

    public let size: Int
  • (optional) The date and time the file will be discarded by the server if not referenced by the client in a PUT /customer request.

    Declaration

    Swift

    public let expiresAt: Date?
  • (optional) The id of the customer this file is associated with. If the customer record does not yet exist this will be null.

    Declaration

    Swift

    public let customerId: String?
  • Initializer - creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder containing the data