Class: EasyBroker::IntegrationPartners::Properties
- Inherits:
-
Object
- Object
- EasyBroker::IntegrationPartners::Properties
- Defined in:
- lib/easy_broker/integration_partners/properties.rb
Constant Summary collapse
- ENDPOINT =
'/integration_partners/properties'
Instance Attribute Summary collapse
-
#api_client ⇒ Object
readonly
Returns the value of attribute api_client.
Instance Method Summary collapse
- #find(property_id) ⇒ Object
-
#initialize(api_client) ⇒ Properties
constructor
A new instance of Properties.
Constructor Details
#initialize(api_client) ⇒ Properties
Returns a new instance of Properties.
10 11 12 |
# File 'lib/easy_broker/integration_partners/properties.rb', line 10 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object (readonly)
Returns the value of attribute api_client.
8 9 10 |
# File 'lib/easy_broker/integration_partners/properties.rb', line 8 def api_client @api_client end |
Instance Method Details
#find(property_id) ⇒ Object
14 15 16 17 |
# File 'lib/easy_broker/integration_partners/properties.rb', line 14 def find(property_id) response = api_client.get("#{ENDPOINT}/#{property_id}") JSON.parse(response.body, object_class: OpenStruct) end |