Module: GenesisRuby::Api::Mixins::Requests::NonFinancial::Kyc::IdentityDocumentAttributes
- Defined in:
- lib/genesis_ruby/api/mixins/requests/non_financial/kyc/identity_document_attributes.rb
Overview
Identity Documents Module for handling document-related operations
Constant Summary collapse
- MAX_DOCUMENTS =
4
Instance Method Summary collapse
-
#add_doc(base64_content, mime_type) ⇒ Object
Adds a document with base64 content and MIME type.
-
#clear_docs ⇒ Object
Clears all documents and resets the base64 content and MIME type.
-
#docs ⇒ Object
Initializes the document attributes.
Instance Method Details
#add_doc(base64_content, mime_type) ⇒ Object
Adds a document with base64 content and MIME type
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/genesis_ruby/api/mixins/requests/non_financial/kyc/identity_document_attributes.rb', line 20 def add_doc(base64_content, mime_type) if docs.size >= MAX_DOCUMENTS raise GenesisRuby::InvalidArgumentError, "Maximum of #{MAX_DOCUMENTS} documents allowed" end docs << { base64_content: base64_content, mime_type: mime_type } @docs end |
#clear_docs ⇒ Object
Clears all documents and resets the base64 content and MIME type
34 35 36 |
# File 'lib/genesis_ruby/api/mixins/requests/non_financial/kyc/identity_document_attributes.rb', line 34 def clear_docs @docs = [] end |
#docs ⇒ Object
Initializes the document attributes
15 16 17 |
# File 'lib/genesis_ruby/api/mixins/requests/non_financial/kyc/identity_document_attributes.rb', line 15 def docs @docs ||= [] end |