Class: Calendly::RoutingFormSubmission

Inherits:
Object
  • Object
show all
Includes:
ModelUtils
Defined in:
lib/calendly/models/routing_form_submission.rb

Overview

Calendly’s routing form submission model.

Constant Summary collapse

UUID_RE =
%r{\A#{Client::API_HOST}/routing_form_submissions/(#{UUID_FORMAT})\z}.freeze
TIME_FIELDS =
%i[created_at updated_at].freeze

Constants included from ModelUtils

ModelUtils::UUID_FORMAT

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ModelUtils

#client, #id, included, #initialize, #inspect

Instance Attribute Details

#created_atTime

Moment when user record was first created.

Returns:

  • (Time)


37
38
39
# File 'lib/calendly/models/routing_form_submission.rb', line 37

def created_at
  @created_at
end

#questions_and_answersArray<Calendly::RoutingFormSubmissionQuestionAndAnswer>

All Routing Form Submission questions with answers.



49
50
51
# File 'lib/calendly/models/routing_form_submission.rb', line 49

def questions_and_answers
  @questions_and_answers
end

#resultCalendly::RoutingFormSubmissionEventTypeResult

Information about the event type Routing Form Submission result.



57
58
59
# File 'lib/calendly/models/routing_form_submission.rb', line 57

def result
  @result
end

#routing_formCalendly::RoutingForm

The routing form that’s associated with the submission.



45
46
47
# File 'lib/calendly/models/routing_form_submission.rb', line 45

def routing_form
  @routing_form
end

#submitterString?

The reference to the Invitee resource when routing form submission results in a scheduled meeting.

Returns:

  • (String, nil)


29
30
31
# File 'lib/calendly/models/routing_form_submission.rb', line 29

def submitter
  @submitter
end

#submitter_typeString?

Type of the respondent resource that submitted the form and scheduled a meeting.

Returns:

  • (String, nil)


33
34
35
# File 'lib/calendly/models/routing_form_submission.rb', line 33

def submitter_type
  @submitter_type
end

#trackingCalendly::RoutingFormSubmissionTracking

All Routing Form Submission questions with answers.



53
54
55
# File 'lib/calendly/models/routing_form_submission.rb', line 53

def tracking
  @tracking
end

#updated_atTime

Moment when user record was last updated.

Returns:

  • (Time)


41
42
43
# File 'lib/calendly/models/routing_form_submission.rb', line 41

def updated_at
  @updated_at
end

#uriString

Canonical reference (unique identifier) for the routing form submission.

Returns:

  • (String)


25
26
27
# File 'lib/calendly/models/routing_form_submission.rb', line 25

def uri
  @uri
end

#uuidString

unique id of the RoutingFormSubmission object.

Returns:

  • (String)


21
22
23
# File 'lib/calendly/models/routing_form_submission.rb', line 21

def uuid
  @uuid
end

Class Method Details

.associationObject



10
11
12
13
14
15
16
17
# File 'lib/calendly/models/routing_form_submission.rb', line 10

def self.association
  {
    routing_form: RoutingForm,
    questions_and_answers: RoutingFormSubmissionQuestionAndAnswer,
    tracking: RoutingFormSubmissionTracking,
    result: RoutingFormSubmissionEventTypeResult
  }
end

Instance Method Details

#fetchCalendly::RoutingFormSubmission

Get Routing Form Submission associated with self.

Returns:

Raises:

Since:

  • 0.12.0



66
67
68
# File 'lib/calendly/models/routing_form_submission.rb', line 66

def fetch
  client.routing_form_submission uuid
end