Class: Fathom::TeamMember
- Defined in:
- lib/fathom/resources/team_member.rb
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
-
.all(params = {}) ⇒ Array<TeamMember>
List all team members, optionally filtered by team name.
- .resource_path ⇒ Object
-
.retrieve(_id) ⇒ Object
Team members don’t have individual retrieve endpoint in the API Use .all with filters instead.
Instance Method Summary collapse
-
#created_at ⇒ Object
Get the created_at timestamp.
-
#email ⇒ Object
Get the member’s email.
-
#id ⇒ Object
Team members don’t have an ID field in the API.
-
#name ⇒ Object
Get the member’s name.
Methods inherited from Resource
#[], #[]=, client, create, #delete, #initialize, #inspect, #method_missing, #reload, resource_name, #respond_to_missing?, search, #to_h, #to_json, #update
Constructor Details
This class inherits a constructor from Fathom::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Fathom::Resource
Class Method Details
.all(params = {}) ⇒ Array<TeamMember>
List all team members, optionally filtered by team name
12 13 14 15 16 17 |
# File 'lib/fathom/resources/team_member.rb', line 12 def self.all(params = {}) response = client.get(resource_path, params) data = response["items"] || [] data.map { |attrs| new(attrs, rate_limit_info: client.rate_limiter.to_h) } end |
.resource_path ⇒ Object
5 |
# File 'lib/fathom/resources/team_member.rb', line 5 def self.resource_path = "team_members" |
.retrieve(_id) ⇒ Object
Team members don’t have individual retrieve endpoint in the API Use .all with filters instead
21 22 23 24 |
# File 'lib/fathom/resources/team_member.rb', line 21 def self.retrieve(_id) raise NotImplementedError, "TeamMember.retrieve is not supported by the Fathom API. Use TeamMember.all instead." end |
Instance Method Details
#created_at ⇒ Object
Get the created_at timestamp
33 |
# File 'lib/fathom/resources/team_member.rb', line 33 def created_at = self["created_at"] |
#email ⇒ Object
Get the member’s email
27 |
# File 'lib/fathom/resources/team_member.rb', line 27 def email = self["email"] |
#id ⇒ Object
Team members don’t have an ID field in the API
36 |
# File 'lib/fathom/resources/team_member.rb', line 36 def id = nil |
#name ⇒ Object
Get the member’s name
30 |
# File 'lib/fathom/resources/team_member.rb', line 30 def name = self["name"] |