I have a Rails Application (5.2.3).
There is a Model called Invoice.
The User can import Invoices through a view, uploading a XML file.
Now, the stakeholders are asking to have a mailbox where any User could send XML files, and the files will be automatically uploaded to the system.
The System is currently running on AWS, so a just created rule in the SES (SIMPLE EMAIL SERVICE) for a x@x.com mailbox to save all the messages in a S3 Bucket, to be parsed lather.
I could just do a plain script with everything(get files from S3, extract XML, Create Invoice) and schedule a runner. However, what is the Rails way for this kind of situation?
I read about Service Objects, but I'm not sure if it's the best place to have this task.
Thank you
Aucun commentaire:
Enregistrer un commentaire