1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
use super::{Team, TeamInvitation, TeamMember};
use crate::framework::endpoint::{HerokuEndpoint, Method};
pub struct TeamDelete<'a> {
pub team_id: &'a str,
}
impl<'a> TeamDelete<'a> {
pub fn new(team_id: &'a str) -> TeamDelete {
TeamDelete { team_id }
}
}
impl<'a> HerokuEndpoint<Team> for TeamDelete<'a> {
fn method(&self) -> Method {
Method::Delete
}
fn path(&self) -> String {
format!("teams/{}", self.team_id)
}
}
pub struct TeamInvitationRevoke<'a> {
pub team_id: &'a str,
pub invitation_id: &'a str,
}
impl<'a> TeamInvitationRevoke<'a> {
pub fn new(team_id: &'a str, invitation_id: &'a str) -> TeamInvitationRevoke<'a> {
TeamInvitationRevoke {
team_id,
invitation_id,
}
}
}
impl<'a> HerokuEndpoint<TeamInvitation> for TeamInvitationRevoke<'a> {
fn method(&self) -> Method {
Method::Delete
}
fn path(&self) -> String {
format!("teams/{}/invitations/{}", self.team_id, self.invitation_id)
}
}
pub struct TeamMemberDelete<'a> {
pub team_id: &'a str,
pub member_id: &'a str,
}
impl<'a> TeamMemberDelete<'a> {
pub fn new(team_id: &'a str, member_id: &'a str) -> TeamMemberDelete<'a> {
TeamMemberDelete { team_id, member_id }
}
}
impl<'a> HerokuEndpoint<TeamMember> for TeamMemberDelete<'a> {
fn method(&self) -> Method {
Method::Delete
}
fn path(&self) -> String {
format!("teams/{}/members/{}", self.team_id, self.member_id)
}
}