Class: Twilio::REST::Memory::V1::ImportList::CreateProfilesImportV2Request

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/memory/v1/import.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CreateProfilesImportV2Request

Returns a new instance of CreateProfilesImportV2Request.



27
28
29
30
31
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 27

def initialize(payload)
        @filename = payload["filename"]
        @file_size = payload["file_size"]
        @column_mappings = payload["column_mappings"]
end

Instance Attribute Details

#column_mappingsObject

Parameters:

  • : (filename)
    String

    The name of the file to generate a presigned URL

  • : (file_size)
    String

    The size of the file in bytes (1 byte to 100 MiB)

  • : (column_mappings)
    Array<ImportList.ColumnMappingItem>

    Mappings of CSV header columns to traits’ fields



26
27
28
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 26

def column_mappings
  @column_mappings
end

#file_sizeObject

Parameters:

  • : (filename)
    String

    The name of the file to generate a presigned URL

  • : (file_size)
    String

    The size of the file in bytes (1 byte to 100 MiB)

  • : (column_mappings)
    Array<ImportList.ColumnMappingItem>

    Mappings of CSV header columns to traits’ fields



26
27
28
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 26

def file_size
  @file_size
end

#filenameObject

Parameters:

  • : (filename)
    String

    The name of the file to generate a presigned URL

  • : (file_size)
    String

    The size of the file in bytes (1 byte to 100 MiB)

  • : (column_mappings)
    Array<ImportList.ColumnMappingItem>

    Mappings of CSV header columns to traits’ fields



26
27
28
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 26

def filename
  @filename
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
38
# File 'lib/twilio-ruby/rest/memory/v1/import.rb', line 32

def to_json(options = {})
{
        "filename": @filename,
        "fileSize": @file_size,
        "columnMappings": @column_mappings,
}.to_json(options)
end