Class: Bitex::KycProfile

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accepted_usage_tierObject

Returns the value of attribute accepted_usage_tier.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def accepted_usage_tier
  @accepted_usage_tier
end

#birth_dateObject

Returns the value of attribute birth_date.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def birth_date
  @birth_date
end

#first_nameObject

Returns the value of attribute first_name.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def first_name
  @first_name
end

#genderObject

Returns the value of attribute gender.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def gender
  @gender
end

#home_addressObject

Returns the value of attribute home_address.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def home_address
  @home_address
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def id
  @id
end

#last_nameObject

Returns the value of attribute last_name.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def last_name
  @last_name
end

Returns the value of attribute legal_entity.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def legal_entity
  @legal_entity
end

#nationalityObject

Returns the value of attribute nationality.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def nationality
  @nationality
end

#occupationObject

Returns the value of attribute occupation.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def occupation
  @occupation
end

#personal_id_issuerObject

Returns the value of attribute personal_id_issuer.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def personal_id_issuer
  @personal_id_issuer
end

#personal_id_numberObject

Returns the value of attribute personal_id_number.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def personal_id_number
  @personal_id_number
end

#personal_id_typeObject

Returns the value of attribute personal_id_type.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def personal_id_type
  @personal_id_type
end

#phone_numbersObject

Returns the value of attribute phone_numbers.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def phone_numbers
  @phone_numbers
end

#politically_exposed_personObject

Returns the value of attribute politically_exposed_person.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def politically_exposed_person
  @politically_exposed_person
end

#tax_idObject

Returns the value of attribute tax_id.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def tax_id
  @tax_id
end

#usage_tierObject

Returns the value of attribute usage_tier.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def usage_tier
  @usage_tier
end

#work_addressObject

Returns the value of attribute work_address.



4
5
6
# File 'lib/bitex/kyc_profile.rb', line 4

def work_address
  @work_address
end

Class Method Details

.allObject



44
45
46
# File 'lib/bitex/kyc_profile.rb', line 44

def self.all
  Api.private(:get, "/private/kyc_profiles").collect{|x| from_json(x) }
end

.create!(params) ⇒ Object



34
35
36
37
38
# File 'lib/bitex/kyc_profile.rb', line 34

def self.create!(params)
  params = params.dup
    .merge(birth_date: params[:birth_date].strftime('%Y/%m/%d'))
  from_json(Api.private(:post, "/private/kyc_profiles", params))
end

.find(id) ⇒ Object



40
41
42
# File 'lib/bitex/kyc_profile.rb', line 40

def self.find(id)
  from_json(Api.private(:get, "/private/kyc_profiles/#{id}"))
end

Instance Method Details

#add_kyc_file!(path, content_type = nil) ⇒ Object



54
55
56
57
58
# File 'lib/bitex/kyc_profile.rb', line 54

def add_kyc_file!(path, content_type = nil)
  response = Api.private(:post, "/private/kyc_profiles/#{id}/kyc_files",
    {document_content_type: content_type}, {document: path})
  KycFile.from_json(response)
end

#kyc_filesObject



60
61
62
63
# File 'lib/bitex/kyc_profile.rb', line 60

def kyc_files
  Api.private(:get, "/private/kyc_profiles/#{id}/kyc_files")
    .collect{|x| KycFile.from_json(x)}
end

#update!(params) ⇒ Object



48
49
50
51
52
# File 'lib/bitex/kyc_profile.rb', line 48

def update!(params)
  params = params.dup
    .merge(birth_date: params[:birth_date].strftime('%Y/%m/%d'))
  self.class.from_json(Api.private(:put, "/private/kyc_profiles/#{id}", params))
end