Sha256: e33b387d148c8dddc08556adb59b6e1466ffe5c955ac273f8fc638c4d1f90847
Contents?: true
Size: 851 Bytes
Versions: 4
Compression:
Stored size: 851 Bytes
Contents
# frozen_string_literal: true module CustomerioAPI class CustomerioObjectResource < Resource # attributes = { # "object_type_id": '1', # "filter": { # "and": [ # { # "object_attribute": { # "field": 'name', # "operator": 'eq', # "type_id": '1', # "value": 'PostCo' # } # } # ] # } # } # client.object.where(attributes: attributes) # Response: # #<CustomerioAPI::CustomerioObject identifiers=[#<OpenStruct cio_object_id="obd7a90a0102", object_id="PostCo">], ids=["PostCo"], next=""> def where(attributes:, start: nil, limit: nil) response_body = post_request("objects?start=#{start}&limit=#{limit}", body: attributes).body CustomerioObject.new(response_body) end end end
Version data entries
4 entries across 4 versions & 1 rubygems