Skip to content

Commit

Permalink
Merge pull request #69 from taimos/feature/fixes
Browse files Browse the repository at this point in the history
fixes for the currently open issues
  • Loading branch information
Iarwa1n authored Jul 19, 2016
2 parents 6b01315 + 2d53fd9 commit e869fff
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.classpath
.project
*.iml
.settings/
target/
bin/
Expand Down
40 changes: 39 additions & 1 deletion src/main/java/com/paymill/models/Payment.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public Payment( final String id ) {

private String holder;

private String iban;

private String bic;

// Credit card attributes
private Client client;

Expand All @@ -73,7 +77,7 @@ public Payment( final String id ) {

@JsonProperty( "is_usable_for_preauthorization" )
private Boolean usableForPreauthorization;

/**
* Returns unique identifier for this credit card payment.
* @return {@link String}
Expand Down Expand Up @@ -173,6 +177,40 @@ public String getHolder() {
public void setHolder( final String holder ) {
this.holder = holder;
}

/**
* Returns IBAN of the account.
* @return the account iban
*/
public String getIban() {
return this.iban;
}

/**
* Sets IBAN of the account.
* @param iban
* {@link String}
*/
public void setIban( final String iban ) {
this.iban = iban;
}

/**
* Returns BIC of the account.
* @return the account bic
*/
public String getBic() {
return this.bic;
}

/**
* Sets BIC of the account.
* @param bic
* {@link String}
*/
public void setBic( final String bic ) {
this.bic = bic;
}

/**
* The {@link Client}. Please note, that the client object might only contain a valid id.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/paymill/services/ClientService.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import java.util.List;

import com.paymill.utils.HttpClient;
import com.paymill.utils.ParameterMap;
import org.apache.commons.lang3.StringUtils;

import com.paymill.models.Client;
import com.paymill.models.PaymillList;
import com.paymill.utils.HttpClient;
import com.paymill.utils.ParameterMap;

/**
* The {@link ClientService} is used to list, create, edit, delete and update PAYMILL {@link Client}s.
Expand Down Expand Up @@ -165,7 +165,7 @@ public void delete( Client client ) {
* Id of the {@link Client}
*/
public void delete( String clientId ) {
this.get( new Client( clientId ) );
this.delete( new Client( clientId ) );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public Subscription unpause( Subscription subscription ) {
* @return the updated subscription
*/
public Subscription unpause( String subscriptionId ) {
return this.pause( new Subscription( subscriptionId ) );
return this.unpause( new Subscription( subscriptionId ) );
}

/**
Expand Down

0 comments on commit e869fff

Please sign in to comment.