Class: EasyBroker::IntegrationPartners::PropertyIntegrations

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_broker/integration_partners/property_integrations.rb

Constant Summary collapse

ENDPOINT =
"/integration_partners/properties/%{property_id}/property_integration"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client) ⇒ PropertyIntegrations



10
11
12
# File 'lib/easy_broker/integration_partners/property_integrations.rb', line 10

def initialize(api_client)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject (readonly)

Returns the value of attribute api_client.



8
9
10
# File 'lib/easy_broker/integration_partners/property_integrations.rb', line 8

def api_client
  @api_client
end

Instance Method Details

#update(property_id, body: {}) ⇒ Object



14
15
16
17
# File 'lib/easy_broker/integration_partners/property_integrations.rb', line 14

def update(property_id, body: {})
  response = api_client.put(format(ENDPOINT, property_id: property_id), body: body)
  JSON.parse(response.body, object_class: OpenStruct)
end