Class: AhoSdk::Issuer::DataSourceMappingsResource Private
- Inherits:
-
Object
- Object
- AhoSdk::Issuer::DataSourceMappingsResource
- Defined in:
- lib/aho_sdk/issuer.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Data_source_mappings resource operations
Instance Method Summary collapse
-
#create(body: nil, idempotency_key: nil) ⇒ Hash
private
Create a data source mapping.
-
#delete(id:) ⇒ Hash
private
Delete a mapping.
-
#get(id:) ⇒ Hash
private
Get mapping details.
-
#initialize(client) ⇒ DataSourceMappingsResource
constructor
private
A new instance of DataSourceMappingsResource.
-
#list(data_source: nil, credential_schema: nil, page: nil, per_page: nil) ⇒ Hash
private
List data source mappings.
-
#update(id:, body: nil, idempotency_key: nil) ⇒ Hash
private
Update a mapping.
Constructor Details
#initialize(client) ⇒ DataSourceMappingsResource
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 DataSourceMappingsResource.
277 278 279 |
# File 'lib/aho_sdk/issuer.rb', line 277 def initialize(client) @client = client end |
Instance Method Details
#create(body: nil, idempotency_key: nil) ⇒ Hash
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.
Create a data source mapping
284 285 286 |
# File 'lib/aho_sdk/issuer.rb', line 284 def create(body: nil, idempotency_key: nil) @client.post("/v1/issuer/data_source_mappings", body: body, idempotency_key: idempotency_key) end |
#delete(id:) ⇒ Hash
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.
Delete a mapping
316 317 318 |
# File 'lib/aho_sdk/issuer.rb', line 316 def delete(id:) @client.delete("/v1/issuer/data_source_mappings/#{id}") end |
#get(id:) ⇒ Hash
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.
Get mapping details
302 303 304 |
# File 'lib/aho_sdk/issuer.rb', line 302 def get(id:) @client.get("/v1/issuer/data_source_mappings/#{id}") end |
#list(data_source: nil, credential_schema: nil, page: nil, per_page: nil) ⇒ Hash
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.
List data source mappings
291 292 293 294 295 296 297 |
# File 'lib/aho_sdk/issuer.rb', line 291 def list(data_source: nil, credential_schema: nil, page: nil, per_page: nil) fetch_page = ->(p) { response = @client.get("/v1/issuer/data_source_mappings", params: { data_source: data_source, credential_schema: credential_schema, page: p, per_page: per_page }) Page.new(data: response[:data], meta: response[:meta], fetch_next: fetch_page) } fetch_page.call(page) end |
#update(id:, body: nil, idempotency_key: nil) ⇒ Hash
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.
Update a mapping
309 310 311 |
# File 'lib/aho_sdk/issuer.rb', line 309 def update(id:, body: nil, idempotency_key: nil) @client.patch("/v1/issuer/data_source_mappings/#{id}", body: body, idempotency_key: idempotency_key) end |