Class: Twizo::VerificationParams

Inherits:
Params
  • Object
show all
Defined in:
lib/twizo/modules/params/verification_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Params

#format_input, #format_to_array

Instance Attribute Details

#body_templateObject

Returns the value of attribute body_template.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def body_template
  @body_template
end

#dcsObject

Returns the value of attribute dcs.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def dcs
  @dcs
end

#recipientObject

Returns the value of attribute recipient.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def recipient
  @recipient
end

#senderObject

Returns the value of attribute sender.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def sender
  @sender
end

#sender_npiObject

Returns the value of attribute sender_npi.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def sender_npi
  @sender_npi
end

#sender_tonObject

Returns the value of attribute sender_ton.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def sender_ton
  @sender_ton
end

#session_idObject

Returns the value of attribute session_id.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def session_id
  @session_id
end

#tagObject

Returns the value of attribute tag.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def tag
  @tag
end

#token_lengthObject

Returns the value of attribute token_length.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def token_length
  @token_length
end

#token_typeObject

Returns the value of attribute token_type.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def token_type
  @token_type
end

#typeObject

Returns the value of attribute type.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def type
  @type
end

#validityObject

Returns the value of attribute validity.



7
8
9
# File 'lib/twizo/modules/params/verification_params.rb', line 7

def validity
  @validity
end

Instance Method Details

#to_jsonObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/twizo/modules/params/verification_params.rb', line 9

def to_json
  json = {
      :recipient          => recipient,
      :type               => type,
      :tokenLength        => token_length,
      :tokenType          => token_type,
      :bodyTemplate       => body_template,
      :sessionId          => session_id,
      :sender             => sender,
      :senderTon          => sender_ton,
      :senderNpi          => sender_npi,
      :tag                => tag,
      :validity           => validity,
      :dcs                => dcs
  }

  json.to_json
end