Sha256: 83d57c5f9dbda2e53eda41671ce8f9896db9e7fcb6755fd342977834c015da5d
Contents?: true
Size: 1.96 KB
Versions: 14
Compression:
Stored size: 1.96 KB
Contents
module GeoCerts module Endpoints # :nodoc: module Events # :nodoc: def self.included(base) base.class_eval do endpoint GeoCerts::API::ENDPOINT do action :events, :url => '/events.xml' do parameter :start_at parameter :end_at parser Parsers::OrderParser do element :events do attribute 'start_at', :as => :start_at, :type => DateTime attribute 'end_at', :as => :end_at, :type => DateTime elements :event do element 'event-id', :as => :id, :type => Integer element 'order-id', :as => :order_id element :name element 'created-at', :as => :created_at, :type => DateTime end end end end action :order_events, :url => '/orders/:order_id/events.xml' do parameter :start_at parameter :end_at parser Parsers::OrderParser do element :events do attribute 'start_at', :as => :start_at, :type => DateTime attribute 'end_at', :as => :end_at, :type => DateTime elements :event do element 'event-id', :as => :id, :type => Integer element 'order-id', :as => :order_id element :name element 'created-at', :as => :created_at, :type => DateTime end end end end end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems