Sha256: eb4d2f1e209ce93fe557cbe65ed5fee24e8cc72aa74f8e6a3a7eb97017ce04f0
Contents?: true
Size: 743 Bytes
Versions: 15
Compression:
Stored size: 743 Bytes
Contents
module Services module Hubspot module Contacts class Search def initialize(email:) @email = email end def call search_api = ::Hubspot::Crm::Contacts::SearchApi.new search_api.do_search(body: search_request, auth_names: 'oauth2').results end private def search_request filter = ::Hubspot::Crm::Contacts::Filter.new( property_name: 'email', operator: 'EQ', value: @email ) filter_group = ::Hubspot::Crm::Contacts::FilterGroup.new(filters: [filter]) ::Hubspot::Crm::Contacts::PublicObjectSearchRequest.new(filter_groups: [filter_group]) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems