Skip to content

Commit 09cabf4

Browse files
Added a property to the organization model for the user access associated with the model.
1 parent 19c1a7d commit 09cabf4

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

src/main/java/com/robinpowered/sdk/model/Organization.java

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,22 @@ public class Organization extends Account implements IdentifiableApiResponseMode
1616
public static final String MIME_TYPE = "vnd.robinpowered.organization.v1";
1717

1818

19+
/**
20+
* Properties
21+
*/
22+
23+
private UserAccess userAccess;
24+
25+
1926
/**
2027
* Methods
2128
*/
2229

23-
public Organization(int id, String slug, boolean isOrganization, DateTime createdAt, DateTime updatedAt) {
30+
public Organization(int id, String slug, boolean isOrganization, DateTime createdAt, DateTime updatedAt,
31+
UserAccess userAccess) {
2432
super(id, slug, isOrganization, createdAt, updatedAt);
33+
34+
this.userAccess = userAccess;
2535
}
2636

2737
@Override
@@ -34,6 +44,10 @@ public String toString() {
3444
return "Organization{} " + super.toString();
3545
}
3646

47+
public UserAccess getUserAccess() {
48+
return userAccess;
49+
}
50+
3751
public static final class Reference extends Account.Reference {
3852
public Reference(String slug) {
3953
super(slug);
@@ -43,4 +57,23 @@ public Reference(int organizationId) {
4357
super(organizationId);
4458
}
4559
}
60+
61+
public static final class UserAccess {
62+
63+
private Integer managementLevel;
64+
private Boolean isOwner;
65+
66+
public UserAccess(Integer managementLevel, Boolean isOwner) {
67+
this.managementLevel = managementLevel;
68+
this.isOwner = isOwner;
69+
}
70+
71+
public int getManagementLevel() {
72+
return managementLevel;
73+
}
74+
75+
public Boolean getOwner() {
76+
return isOwner;
77+
}
78+
}
4679
}

0 commit comments

Comments
 (0)