Class: Workarea::GlobalE::OrderApiEvents
- Inherits:
-
Object
- Object
- Workarea::GlobalE::OrderApiEvents
- Includes:
- ApplicationDocument
- Defined in:
- app/models/workarea/global_e/order_api_events.rb
Class Method Summary collapse
Class Method Details
.upsert_one(id, set: {}) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/models/workarea/global_e/order_api_events.rb', line 15 def self.upsert_one(id, set: {}) = Time.current collection.update_one( { _id: id.to_s }, { '$setOnInsert' => { created_at: }, '$set' => { updated_at: }.merge(set), }, upsert: true ) end |