Class: HelloSign::Parameters::SignatureRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/hello_sign/parameters/signature_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSignatureRequest

Returns a new instance of SignatureRequest.



12
13
14
# File 'lib/hello_sign/parameters/signature_request.rb', line 12

def initialize
  @signers, @files, @form_fields_per_document = nil, nil, nil
end

Instance Attribute Details

#ccs=(value) ⇒ Object

Sets the attribute ccs

Parameters:

  • value

    the value to set the attribute ccs to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def ccs=(value)
  @ccs = value
end

#client_id=(value) ⇒ Object

Sets the attribute client_id

Parameters:

  • value

    the value to set the attribute client_id to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def client_id=(value)
  @client_id = value
end

#files=(value) ⇒ Object

Sets the attribute files

Parameters:

  • value

    the value to set the attribute files to.



10
11
12
# File 'lib/hello_sign/parameters/signature_request.rb', line 10

def files=(value)
  @files = value
end

#form_fields_per_document=(value) ⇒ Object

Sets the attribute form_fields_per_document

Parameters:

  • value

    the value to set the attribute form_fields_per_document to.



10
11
12
# File 'lib/hello_sign/parameters/signature_request.rb', line 10

def form_fields_per_document=(value)
  @form_fields_per_document = value
end

#message=(value) ⇒ Object

Sets the attribute message

Parameters:

  • value

    the value to set the attribute message to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def message=(value)
  @message = value
end

#signers=(value) ⇒ Object

Sets the attribute signers

Parameters:

  • value

    the value to set the attribute signers to.



10
11
12
# File 'lib/hello_sign/parameters/signature_request.rb', line 10

def signers=(value)
  @signers = value
end

#subject=(value) ⇒ Object

Sets the attribute subject

Parameters:

  • value

    the value to set the attribute subject to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def subject=(value)
  @subject = value
end

#test_mode=(value) ⇒ Object

Sets the attribute test_mode

Parameters:

  • value

    the value to set the attribute test_mode to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def test_mode=(value)
  @test_mode = value
end

#title=(value) ⇒ Object

Sets the attribute title

Parameters:

  • value

    the value to set the attribute title to.



7
8
9
# File 'lib/hello_sign/parameters/signature_request.rb', line 7

def title=(value)
  @title = value
end

Instance Method Details

#formattedObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/hello_sign/parameters/signature_request.rb', line 16

def formatted
  {
    test_mode:                test_mode || 0,
    title:                    title,
    subject:                  subject,
    message:                  message,
    cc_email_addresses:       ccs,
    signers:                  formatted_signers,
    file:                     formatted_files,
    form_fields_per_document: formatted_form_fields_per_document
  }.tap do |f|
    f.merge!(client_id: client_id) unless client_id.nil?
  end
end