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.
238 239 240 |
# File 'lib/aho_sdk/issuer.rb', line 238 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
245 246 247 |
# File 'lib/aho_sdk/issuer.rb', line 245 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
277 278 279 |
# File 'lib/aho_sdk/issuer.rb', line 277 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
263 264 265 |
# File 'lib/aho_sdk/issuer.rb', line 263 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
252 253 254 255 256 257 258 |
# File 'lib/aho_sdk/issuer.rb', line 252 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
270 271 272 |
# File 'lib/aho_sdk/issuer.rb', line 270 def update(id:, body: nil, idempotency_key: nil) @client.patch("/v1/issuer/data_source_mappings/#{id}", body: body, idempotency_key: idempotency_key) end |