Class: Bitex::KycProfile
- Inherits:
-
Object
- Object
- Bitex::KycProfile
- Defined in:
- lib/bitex/kyc_profile.rb
Overview
Documentation here!
Instance Attribute Summary collapse
-
#accepted_usage_tier ⇒ Symbol
Current usage tier as accepted by our compliance officers.
-
#birth_date ⇒ Time
Birth date.
-
#first_name ⇒ String
Name.
-
#gender ⇒ Symbol
Gender.
-
#home_address ⇒ String
Home address.
-
#id ⇒ Integer
This KycProfile’s unique ID.
-
#last_name ⇒ String
Last Name.
-
#legal_entity ⇒ Boolean
Is legal entity.
-
#nationality ⇒ String
Nationality.
- #occupation ⇒ String
-
#personal_id_issuer ⇒ String
ISO country code for the issuer of this ID.
-
#personal_id_number ⇒ String
Personal ID Number.
-
#personal_id_type ⇒ symbol
Type of ID.
-
#phone_numbers ⇒ String
Phone numbers.
-
#politically_exposed_person ⇒ Boolean
Is politically exposed.
-
#tax_id ⇒ Intger
Tax ID.
-
#usage_tier ⇒ Symbol
Requested usage tier.
-
#work_address ⇒ String
Work address.
Class Method Summary collapse
- .all ⇒ Object
-
.create!(params) ⇒ Object
rubocop:enable Metrics/AbcSize.
- .find(id) ⇒ Object
- .sanitize(params) ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#accepted_usage_tier ⇒ Symbol
Returns Current usage tier as accepted by our compliance officers.
76 77 78 |
# File 'lib/bitex/kyc_profile.rb', line 76 def accepted_usage_tier @accepted_usage_tier end |
#birth_date ⇒ Time
Returns Birth date.
36 37 38 |
# File 'lib/bitex/kyc_profile.rb', line 36 def birth_date @birth_date end |
#first_name ⇒ String
Returns Name.
12 13 14 |
# File 'lib/bitex/kyc_profile.rb', line 12 def first_name @first_name end |
#gender ⇒ Symbol
Returns Gender.
44 45 46 |
# File 'lib/bitex/kyc_profile.rb', line 44 def gender @gender end |
#home_address ⇒ String
Returns Home address.
52 53 54 |
# File 'lib/bitex/kyc_profile.rb', line 52 def home_address @home_address end |
#id ⇒ Integer
Returns This KycProfile’s unique ID.
8 9 10 |
# File 'lib/bitex/kyc_profile.rb', line 8 def id @id end |
#last_name ⇒ String
Returns Last Name.
16 17 18 |
# File 'lib/bitex/kyc_profile.rb', line 16 def last_name @last_name end |
#legal_entity ⇒ Boolean
Returns Is legal entity.
64 65 66 |
# File 'lib/bitex/kyc_profile.rb', line 64 def legal_entity @legal_entity end |
#nationality ⇒ String
Returns Nationality.
40 41 42 |
# File 'lib/bitex/kyc_profile.rb', line 40 def nationality @nationality end |
#occupation ⇒ String
48 49 50 |
# File 'lib/bitex/kyc_profile.rb', line 48 def occupation @occupation end |
#personal_id_issuer ⇒ String
Returns ISO country code for the issuer of this ID.
24 25 26 |
# File 'lib/bitex/kyc_profile.rb', line 24 def personal_id_issuer @personal_id_issuer end |
#personal_id_number ⇒ String
Returns Personal ID Number.
20 21 22 |
# File 'lib/bitex/kyc_profile.rb', line 20 def personal_id_number @personal_id_number end |
#personal_id_type ⇒ symbol
Returns Type of ID. [:passport].
28 29 30 |
# File 'lib/bitex/kyc_profile.rb', line 28 def personal_id_type @personal_id_type end |
#phone_numbers ⇒ String
Returns Phone numbers.
60 61 62 |
# File 'lib/bitex/kyc_profile.rb', line 60 def phone_numbers @phone_numbers end |
#politically_exposed_person ⇒ Boolean
Returns Is politically exposed.
68 69 70 |
# File 'lib/bitex/kyc_profile.rb', line 68 def politically_exposed_person @politically_exposed_person end |
#tax_id ⇒ Intger
Returns Tax ID.
32 33 34 |
# File 'lib/bitex/kyc_profile.rb', line 32 def tax_id @tax_id end |
#usage_tier ⇒ Symbol
Returns Requested usage tier.
72 73 74 |
# File 'lib/bitex/kyc_profile.rb', line 72 def usage_tier @usage_tier end |
#work_address ⇒ String
Returns Work address.
56 57 58 |
# File 'lib/bitex/kyc_profile.rb', line 56 def work_address @work_address end |
Class Method Details
.all ⇒ Object
112 113 114 |
# File 'lib/bitex/kyc_profile.rb', line 112 def self.all Api.private(:get, '/private/kyc_profiles').map { |kyc| from_json(kyc) } end |
.create!(params) ⇒ Object
rubocop:enable Metrics/AbcSize
104 105 106 |
# File 'lib/bitex/kyc_profile.rb', line 104 def self.create!(params) from_json(Api.private(:post, '/private/kyc_profiles', sanitize(params))) end |
.find(id) ⇒ Object
108 109 110 |
# File 'lib/bitex/kyc_profile.rb', line 108 def self.find(id) from_json(Api.private(:get, "/private/kyc_profiles/#{id}")) end |
.sanitize(params) ⇒ Object
116 117 118 |
# File 'lib/bitex/kyc_profile.rb', line 116 def self.sanitize(params) params.merge(birth_date: params[:birth_date].strftime('%Y/%m/%d')) end |
Instance Method Details
#add_kyc_file!(path, content_type = nil) ⇒ Object
124 125 126 127 128 129 130 131 132 133 |
# File 'lib/bitex/kyc_profile.rb', line 124 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 |