Class: Bitex::KycFile

Inherits:
Object
  • Object
show all
Defined in:
lib/bitex/kyc_file.rb

Overview

Documentation here!

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#content_typeString

Returns Content type.

Returns:

  • (String)

    Content type.



28
29
30
# File 'lib/bitex/kyc_file.rb', line 28

def content_type
  @content_type
end

#file_nameString

Returns file name.

Returns:

  • (String)

    file name.



20
21
22
# File 'lib/bitex/kyc_file.rb', line 20

def file_name
  @file_name
end

#file_sizeInteger

Returns file size.

Returns:

  • (Integer)

    file size.



24
25
26
# File 'lib/bitex/kyc_file.rb', line 24

def file_size
  @file_size
end

#idInteger

Returns This KycProfile’s unique ID.

Returns:

  • (Integer)

    This KycProfile’s unique ID.



8
9
10
# File 'lib/bitex/kyc_file.rb', line 8

def id
  @id
end

#kyc_profile_idObject

Returns the value of attribute kyc_profile_id.



12
13
14
# File 'lib/bitex/kyc_file.rb', line 12

def kyc_profile_id
  @kyc_profile_id
end

#urlString

Returns url to photo file.

Returns:

  • (String)

    url to photo file.



16
17
18
# File 'lib/bitex/kyc_file.rb', line 16

def url
  @url
end

Class Method Details

.allObject



36
37
38
# File 'lib/bitex/kyc_file.rb', line 36

def self.all
  Api.private(:get, '/private/kyc_files').map { |file| from_json(file) }
end

.from_json(json) ⇒ Object



30
31
32
33
34
# File 'lib/bitex/kyc_file.rb', line 30

def self.from_json(json)
  new.tap do |file|
    file.id, file.kyc_profile_id, file.url, file.file_name, file.content_type, file.file_size = json
  end
end