Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Document API #46

Merged
merged 4 commits into from
Feb 10, 2021
Merged

Add Document API #46

merged 4 commits into from
Feb 10, 2021

Conversation

som-m
Copy link
Contributor

@som-m som-m commented Feb 4, 2021

Summary

  • Add to Dispute (Omise doc)
    • Create a document
    • List documents
  • Add Document API (Omise doc)
    • Retrieve
    • Reload
    • Destroy
  • Add tests

QA

You should be able to do the following actions.

  • Create a document

    • Retrieve a dispute
      dispute = omise.Dispute.retrieve('dspt_test_5mtsn1g8iplijhmlkpe')
    • Add a document to the dispute
      files = {'file': open('evidence.png', 'rb')}
      document = dispute.upload_document(files)
  • List documents
    documents = dispute.list_documents()

  • Retrieve a document
    document = dispute.documents.retrieve('docu_test_5mtsqwj0lbak4qsfrcj')

  • Reload a document
    document.reload()

  • Destroy a document
    document.destroy()

@som-m som-m marked this pull request as ready for review February 5, 2021 11:41
@som-m som-m merged commit baabea7 into omise:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants