Class: Bitex::KycProfile
- Inherits:
-
Object
- Object
- Bitex::KycProfile
- Defined in:
- lib/bitex/kyc_profile.rb
Instance Attribute Summary collapse
-
#accepted_usage_tier ⇒ Object
Returns the value of attribute accepted_usage_tier.
-
#birth_date ⇒ Object
Returns the value of attribute birth_date.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#home_address ⇒ Object
Returns the value of attribute home_address.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#legal_entity ⇒ Object
Returns the value of attribute legal_entity.
-
#nationality ⇒ Object
Returns the value of attribute nationality.
-
#occupation ⇒ Object
Returns the value of attribute occupation.
-
#personal_id_issuer ⇒ Object
Returns the value of attribute personal_id_issuer.
-
#personal_id_number ⇒ Object
Returns the value of attribute personal_id_number.
-
#personal_id_type ⇒ Object
Returns the value of attribute personal_id_type.
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
-
#politically_exposed_person ⇒ Object
Returns the value of attribute politically_exposed_person.
-
#tax_id ⇒ Object
Returns the value of attribute tax_id.
-
#usage_tier ⇒ Object
Returns the value of attribute usage_tier.
-
#work_address ⇒ Object
Returns the value of attribute work_address.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#accepted_usage_tier ⇒ Object
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_date ⇒ Object
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_name ⇒ Object
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def first_name @first_name end |
#gender ⇒ Object
Returns the value of attribute gender.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def gender @gender end |
#home_address ⇒ Object
Returns the value of attribute home_address.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def home_address @home_address end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def last_name @last_name end |
#legal_entity ⇒ Object
Returns the value of attribute legal_entity.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def legal_entity @legal_entity end |
#nationality ⇒ Object
Returns the value of attribute nationality.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def nationality @nationality end |
#occupation ⇒ Object
Returns the value of attribute occupation.
4 5 6 |
# File 'lib/bitex/kyc_profile.rb', line 4 def occupation @occupation end |
#personal_id_issuer ⇒ Object
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_number ⇒ Object
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_type ⇒ Object
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_numbers ⇒ Object
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_person ⇒ Object
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_id ⇒ Object
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_tier ⇒ Object
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_address ⇒ Object
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
.all ⇒ Object
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_files ⇒ Object
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 |