Class: BridgeBankin::Category
- Inherits:
-
BridgeObject
- Object
- BridgeObject
- BridgeBankin::Category
- Extended by:
- API::Resource
- Defined in:
- lib/bridge_bankin/category.rb
Overview
Category resource
Constant Summary collapse
- RESOURCE_TYPE =
"category"
Constants inherited from BridgeObject
BridgeObject::HIDDEN_ATTRIBUTES
Class Method Summary collapse
-
.find(id:, **params) ⇒ Category
Retrieve a single category.
-
.list(**params) ⇒ Array<Category>
List all categories supported by the Bridge API.
Methods inherited from BridgeObject
#==, convert_to_bridge_object, #initialize, #to_hash, #to_json
Constructor Details
This class inherits a constructor from BridgeBankin::BridgeObject
Class Method Details
.find(id:, **params) ⇒ Category
Retrieve a single category
33 34 35 36 |
# File 'lib/bridge_bankin/category.rb', line 33 def find(id:, **params) data = api_client.get("/v2/categories/#{id}", **params) convert_to_bridge_object(**data) end |
.list(**params) ⇒ Array<Category>
List all categories supported by the Bridge API
20 21 22 23 |
# File 'lib/bridge_bankin/category.rb', line 20 def list(**params) data = api_client.get("/v2/categories", **params) convert_to_bridge_object(**data) end |