Sha256: 6354dec49e34065d3968ff4ce1312f0fa63e6ab8363e243c17e14e917fb56504

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

module Workarea
  decorate Order, with: :orderbot do
    decorated do
      field :orderbot_order_id, type: String
      field :orderbot_exported_at, type: Time
    end

    def orderbot_exported?
      !!orderbot_exported_at
    end

    def set_orderbot_exported_data!(order_id)
      update!(
        orderbot_exported_at: Time.current,
        orderbot_order_id: order_id
      )
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
workarea-orderbot-1.0.2 app/models/workarea/order.decorator
workarea-orderbot-1.0.1 app/models/workarea/order.decorator
workarea-orderbot-1.0.0 app/models/workarea/order.decorator