Class: ModernTreasury::Resources::Identifications
- Inherits:
-
Object
- Object
- ModernTreasury::Resources::Identifications
- Defined in:
- lib/modern_treasury/resources/identifications.rb,
sig/modern_treasury/resources/identifications.rbs
Instance Method Summary collapse
-
#create(id_number:, id_type:, legal_entity_id:, documents: nil, expiration_date: nil, issuing_country: nil, issuing_region: nil, request_options: {}) ⇒ ModernTreasury::Models::Identification
Some parameter documentations has been truncated, see Models::IdentificationCreateParams for more details.
-
#initialize(client:) ⇒ Identifications
constructor
private
A new instance of Identifications.
-
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::Identification
Get an existing Identification.
-
#update(id, expiration_date: nil, id_number: nil, id_type: nil, issuing_country: nil, issuing_region: nil, request_options: {}) ⇒ ModernTreasury::Models::Identification
Some parameter documentations has been truncated, see Models::IdentificationUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Identifications
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Identifications.
101 102 103 |
# File 'lib/modern_treasury/resources/identifications.rb', line 101 def initialize(client:) @client = client end |
Instance Method Details
#create(id_number:, id_type:, legal_entity_id:, documents: nil, expiration_date: nil, issuing_country: nil, issuing_region: nil, request_options: {}) ⇒ ModernTreasury::Models::Identification
Some parameter documentations has been truncated, see Models::IdentificationCreateParams for more details.
Create an Identification for a Legal Entity.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/modern_treasury/resources/identifications.rb', line 32 def create(params) parsed, = ModernTreasury::IdentificationCreateParams.dump_request(params) @client.request( method: :post, path: "api/identifications", body: parsed, model: ModernTreasury::Identification, options: ) end |
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::Identification
Get an existing Identification.
54 55 56 57 58 59 60 61 |
# File 'lib/modern_treasury/resources/identifications.rb', line 54 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/identifications/%1$s", id], model: ModernTreasury::Identification, options: params[:request_options] ) end |
#update(id, expiration_date: nil, id_number: nil, id_type: nil, issuing_country: nil, issuing_region: nil, request_options: {}) ⇒ ModernTreasury::Models::Identification
Some parameter documentations has been truncated, see Models::IdentificationUpdateParams for more details.
Update an existing Identification.
87 88 89 90 91 92 93 94 95 96 |
# File 'lib/modern_treasury/resources/identifications.rb', line 87 def update(id, params = {}) parsed, = ModernTreasury::IdentificationUpdateParams.dump_request(params) @client.request( method: :patch, path: ["api/identifications/%1$s", id], body: parsed, model: ModernTreasury::Identification, options: ) end |