Sha256: 2c79514b27debb8002fd42330868ae36d752849d27ae92a2001a453a9d235160

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

module SurveyGizmo; module API
  # @see SurveyGizmo::Resource::ClassMethods
  class Response
    include SurveyGizmo::Resource

    # @macro [attach] virtus_attribute
    #   @return [$2] the attribute +$1+ as a $2
    attribute :id,                   Integer
    attribute :survey_id,            Integer
    attribute :contact_id,           Integer
    attribute :data,                 String
    attribute :status,               String
    attribute :date_submitted,       DateTime
    attribute :is_test_data,         Boolean
    attribute :sResponseComment,     String
    attribute :variable,             Hash       # READ-ONLY
    attribute :meta,                 Hash       # READ-ONLY
    attribute :shown,                Hash       # READ-ONLY
    attribute :url,                  Hash       # READ-ONLY
    attribute :answers,              Hash       # READ-ONLY

    # routing
    route '/survey/:survey_id/surveyresponse',     :via => :create
    route '/survey/:survey_id/surveyresponse/:id', :via => [:get, :update, :delete]

    # @see SurveyGizmo::Resource#to_param_options
    def to_param_options
      {:id => self.id, :survey_id => self.survey_id}
    end

  end
end; end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
survey-gizmo-ruby-0.9.6 lib/survey_gizmo/api/response.rb