Class: CustomerioAPI::ObjectRelationshipResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/customerio_api/resources/object_relationship_resource.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#get_request, #handle_response, #initialize, #post_request, #put_request

Constructor Details

This class inherits a constructor from CustomerioAPI::Resource

Instance Method Details

#where(object_type_id:, object_id:, query_params: {}) ⇒ Object

Response: #<CustomerioAPI::ObjectRelationship cio_relationships=[#<OpenStruct object_type_id=“0”, identifiers=#<OpenStruct cio_id=“d7a90a000102”, email=“[email protected]”, id=“test1”>, attributes=#<OpenStruct>, timestamps=#<OpenStruct>>], next=“”>



11
12
13
14
# File 'lib/customerio_api/resources/object_relationship_resource.rb', line 11

def where(object_type_id:, object_id:, query_params: {})
  response_body = get_request("objects/#{object_type_id}/#{object_id}/relationships", params: query_params).body
  ObjectRelationship.new(response_body)
end