Sha256: 4d7b86f3cd29433f94f0f253d9ec75cc837940d7fc440c3905ede62437a2288b

Contents?: true

Size: 378 Bytes

Versions: 18

Compression:

Stored size: 378 Bytes

Contents

module Xdelivery
  module API
    module Response
      class Orders < Base

        class Order < OpenStruct
          def valid?
            valid == true || errors.empty?
          end

          def errors
            super || []
          end
        end

        def orders
          data['orders'].map { |order| Order.new(order) }
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
xdelivery-2.0.3 lib/xdelivery/api/response/orders.rb
xdelivery-2.0.1 lib/xdelivery/api/response/orders.rb
xdelivery-2.0.0 lib/xdelivery/api/response/orders.rb
xdelivery-1.0.2 lib/xdelivery/api/response/orders.rb
xdelivery-1.0.1 lib/xdelivery/api/response/orders.rb
xdelivery-1.0.0 lib/xdelivery/api/response/orders.rb
xdelivery-0.2.4 lib/xdelivery/api/response/orders.rb
xdelivery-0.2.3 lib/xdelivery/api/response/orders.rb
xdelivery-0.2.2 lib/xdelivery/api/response/orders.rb
xdelivery-0.2.1 lib/xdelivery/api/response/orders.rb
xdelivery-0.2.0 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.6 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.5 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.4 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.3 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.2 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.1 lib/xdelivery/api/response/orders.rb
xdelivery-0.1.0 lib/xdelivery/api/response/orders.rb