Sha256: 491192c90fad35b1ad5f64623cd0537c353d8f0eecdcd784fc0110d9586e81b9

Contents?: true

Size: 990 Bytes

Versions: 4

Compression:

Stored size: 990 Bytes

Contents

module Smartsheet
  # Contacts Endpoints
  # @see https://smartsheet-platform.github.io/api-docs/?ruby#contacts API Contacts Docs
  class Contacts
    attr_reader :client
    private :client

    def initialize(client)
      @client = client
    end

    def get(contact_id:, params: {}, header_overrides: {})
      endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['contacts', :contact_id])
      request_spec = Smartsheet::API::RequestSpec.new(
          header_overrides: header_overrides,
          params: params,
          contact_id: contact_id
      )
      client.make_request(endpoint_spec, request_spec)
    end

    def list(params: {}, header_overrides: {})
      endpoint_spec = Smartsheet::API::EndpointSpec.new(:get, ['contacts'])
      request_spec = Smartsheet::API::RequestSpec.new(
          header_overrides: header_overrides,
          params: params
      )
      client.make_request(endpoint_spec, request_spec)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
smartsheet-2.77.0 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-1.3.0 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-1.2.0 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-1.1.0 lib/smartsheet/endpoints/contacts/contacts.rb