Class: Twizo::WidgetParams

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Params

#format_input, #format_to_array

Instance Attribute Details

#allowed_typesObject

Returns the value of attribute allowed_types.



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

def allowed_types
  @allowed_types
end

#backup_code_identifierObject

Returns the value of attribute backup_code_identifier.



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

def backup_code_identifier
  @backup_code_identifier
end

#body_templateObject

Returns the value of attribute body_template.



7
8
9
# File 'lib/twizo/modules/params/widget_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/widget_params.rb', line 7

def dcs
  @dcs
end

#recipientObject

Returns the value of attribute recipient.



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

def recipient
  @recipient
end

#senderObject

Returns the value of attribute sender.



7
8
9
# File 'lib/twizo/modules/params/widget_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/widget_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/widget_params.rb', line 7

def sender_ton
  @sender_ton
end

#tagObject

Returns the value of attribute tag.



7
8
9
# File 'lib/twizo/modules/params/widget_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/widget_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/widget_params.rb', line 7

def token_type
  @token_type
end

Instance Method Details

#to_jsonObject



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

def to_json
  json = {
      :allowedTypes          => allowed_types,
      :recipient              => recipient,
      :backupCodeIdentifier => backup_code_identifier,
      :tokenLength            => token_length,
      :tokenType              => token_type,
      :bodyTemplate           => body_template,
      :sender                 => sender,
      :senderTon              => sender_ton,
      :senderNpi              => sender_npi,
      :tag                    => tag,
      :dcs                    => dcs
  }

  json.to_json
end