Skip to content

Commit

Permalink
Merge pull request #164 from davidbigham/db-account-fields
Browse files Browse the repository at this point in the history
Missing fields on Account object
  • Loading branch information
bkrausz committed Apr 30, 2015
2 parents 54f695e + 030c4ea commit 990a4ba
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
80 changes: 79 additions & 1 deletion src/main/java/com/stripe/model/Account.java
Expand Up @@ -25,6 +25,15 @@ public class Account extends APIResource {
String displayName;
Verification verification;
LegalEntity legalEntity;
Keys keys;
Map<String, String> metadata;
String businessName;
String businessUrl;
String businessLogo;
String supportPhone;
String supportUrl;
String supportEmail;
Boolean managed;

public String getId() {
return id;
Expand Down Expand Up @@ -78,6 +87,51 @@ public LegalEntity getLegalEntity() {
return legalEntity;
}

public Keys getKeys()
{
return keys;
}

public Map<String, String> getMetadata()
{
return metadata;
}

public String getBusinessName()
{
return businessName;
}

public String getBusinessUrl()
{
return businessUrl;
}

public String getBusinessLogo()
{
return businessLogo;
}

public String getSupportPhone()
{
return supportPhone;
}

public String getSupportUrl()
{
return supportUrl;
}

public String getSupportEmail()
{
return supportEmail;
}

public Boolean getManaged()
{
return managed;
}

public static Account create(Map<String, Object> params)
throws AuthenticationException, InvalidRequestException,
APIConnectionException, CardException, APIException {
Expand Down Expand Up @@ -164,7 +218,16 @@ public boolean equals(Object o) {
equals(timezone, account.timezone) &&
equals(displayName, account.displayName) &&
equals(verification, account.verification) &&
equals(legalEntity, account.legalEntity);
equals(legalEntity, account.legalEntity) &&
equals(keys, account.keys) &&
equals(metadata, account.metadata) &&
equals(businessName, account.businessName) &&
equals(businessUrl, account.businessUrl) &&
equals(businessLogo, account.businessLogo) &&
equals(supportPhone, account.supportPhone) &&
equals(supportUrl, account.supportUrl) &&
equals(supportEmail, account.supportEmail) &&
equals(managed, account.managed);
}

public static class Verification extends StripeObject {
Expand All @@ -182,4 +245,19 @@ public Boolean getContacted() {
return contacted;
}
}

public static class Keys extends StripeObject {
String secret;
String publishable;

public String getSecret()
{
return secret;
}

public String getPublishable()
{
return publishable;
}
}
}
1 change: 1 addition & 0 deletions src/test/java/com/stripe/model/AccountTest.java
Expand Up @@ -55,6 +55,7 @@ public void testDeserialize() throws StripeException, IOException {
expected.country = "US";
expected.timezone = "US/Pacific";
expected.displayName = "Stripe.com";
expected.businessName = "Stripe.com";

assertEquals(expected, acc);
}
Expand Down

0 comments on commit 990a4ba

Please sign in to comment.