Class: Edi::AmazonVc::OrderMessageRetriever
- Inherits:
-
BaseEdiService
- Object
- BaseService
- BaseEdiService
- Edi::AmazonVc::OrderMessageRetriever
- Defined in:
- app/services/edi/amazon_vc/order_message_retriever.rb
Constant Summary
Constants included from Edi::AddressAbbreviator
Edi::AddressAbbreviator::MAX_LENGTH
Instance Attribute Summary
Attributes inherited from BaseEdiService
Instance Method Summary collapse
-
#process ⇒ Object
Retrieves messages according to the partner config.
Methods inherited from BaseEdiService
#duplicate_po_already_notified?, #initialize, #mark_duplicate_po_as_notified, #report_order_creation_issues, #safe_process_edi_communication_log
Methods included from Edi::AddressAbbreviator
#abbreviate_street, #collect_street_originals, #record_address_abbreviation_notes
Methods inherited from BaseService
#initialize, #log_debug, #log_error, #log_info, #log_warning, #logger, #options, #tagged_logger
Constructor Details
This class inherits a constructor from Edi::BaseEdiService
Instance Method Details
#process ⇒ Object
Retrieves messages according to the partner config
4 5 6 7 8 9 10 11 |
# File 'app/services/edi/amazon_vc/order_message_retriever.rb', line 4 def process Edi::AmazonVc::Retriever.new().process transporter: orchestrator.transporter, transporter_profile: orchestrator.transporter_profile, data_type: 'json', remote_path: "#{orchestrator.}?shipFromPartyId=#{orchestrator.warehouse_code}&limit=100&createdAfter=#{CGI.escape([Date.parse(Edi::AmazonVc::Orchestrator::GOLIVE_DATE_STR), 7.days.ago].max.to_date.iso8601)}&createdBefore=#{CGI.escape(Time.current.to_date.iso8601)}&status=NEW&sortOrder=DESC&includeDetails=true", partner: orchestrator.partner, category: :order_batch end |