Sha256: 80c6bbb4022345c75f311957433dc53af9f6f5a669a75465067cb3abdd928b33

Contents?: true

Size: 684 Bytes

Versions: 11

Compression:

Stored size: 684 Bytes

Contents

module DHLEcommerceAPI
  class Event < Base
    STATUS_CODES = {
      "71005": "awaiting_parcel_handover_to_dhl_data_submitted",
      "77123": "awaiting_parcel_handover_to_dhl_shipment_data_received",
      "77206": "shipment_picked_up",
      "77015": "processed_at_facility",
      "77027": "sorted_to_delivery_facility",
      "77169": "departed_from_facility",
      "77178": "arrived_at_facility",
      "77184": "processed_at_delivery_facility",
      "77090": "out_for_delivery",
      "77093": "successfully_delivered",
    }

    def initialize(attributes = {}, persisted = false)
      super
    end

    def status_slug
      STATUS_CODES[status.to_sym]
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dhl_ecommerce_api-0.1.19 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.18 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.17 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.16 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.15 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.14 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.13 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.12 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.11 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.9 lib/dhl_ecommerce_api/resources/event.rb
dhl_ecommerce_api-0.1.8 lib/dhl_ecommerce_api/resources/event.rb