omise v0.4.0 Omise.Document
Provides Document API interfaces.
https://www.omise.co/documents-api
Summary
Types
Functions
Upload a document.
Returns {:ok, document}
if the request is successful, {:error, error}
otherwise.
Request Parameter:
file
- (required) The file to upload. Valid files include PNG and JPG images and PDF files. The uploaded file should also includes metadata such as filename and content type.
Examples
Omise.Document.create("disputes/dspt_test_4zgf15h89w8t775kcm8", file: "pictures/screenshot.jpg")
Destroy a document.
Returns {:ok, document}
if the request is successful, {:error, error}
otherwise.
Examples
Omise.Document.destroy("disputes/dspt_test_4zgf15h89w8t775kcm8", "docu_test_55a1e900ys2srz0xu2r")
List all documents.
Returns {:ok, documents}
if the request is successful, {:error, error}
otherwise.
Query Parameters:
offset
- (optional, default: 0) The offset of the first record returned.limit
- (optional, default: 20, maximum: 100) The maximum amount of records returned.from
- (optional, default: 1970-01-01T00:00:00Z, format: ISO 8601) The UTC date and time limiting the beginning of returned records.to
- (optional, default: current UTC Datetime, format: ISO 8601) The UTC date and time limiting the end of returned records.
Examples
Omise.Document.list("disputes/dspt_test_53f77r87n5czrdwldvz")
Omise.Document.list("disputes/dspt_test_53f77r87n5czrdwldvz", offset: 2)