Sha256: e2044920cd4b2cf7ddcebbc3cb2e4463b3d8e85875acf0277b6d045dee89d08a

Contents?: true

Size: 960 Bytes

Versions: 6

Compression:

Stored size: 960 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

6 entries across 6 versions & 1 rubygems

Version Path
smartsheet-2.101.1 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-2.101.0 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-2.86.1 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-2.86.0 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-2.77.2 lib/smartsheet/endpoints/contacts/contacts.rb
smartsheet-1.0.0 lib/smartsheet/endpoints/contacts/contacts.rb