Skip to content

Conversation

@ashwindas
Copy link

Description
/recurring/storeToken API implementation is missing in adyen java lib. Adding an implementation similar to other /recurring APIs.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.7%) to 26.546% when pulling f36109d on ashwindas:develop into 804856c on Adyen:develop.

@coveralls
Copy link

coveralls commented Oct 18, 2018

Coverage Status

Coverage decreased (-0.06%) to 27.154% when pulling b4dd19a on ashwindas:develop into 804856c on Adyen:develop.

@ashwindas
Copy link
Author

@rikterbeek please review when you get a chance.

@rikterbeek rikterbeek added the Enhancement Indicates new feature requests label Oct 19, 2018
@ashwindas
Copy link
Author

@rikterbeek @lancergr @rkewlani @Aleffio Gentle reminder to please review this pull request.

@lancergr
Copy link
Contributor

Hi @ashwindas

Thanks so much for this Pull Request!

We are performing some internal tests against it and will keep you posted.

Kind Regards,
Giorgos
Adyen

@ashwindas
Copy link
Author

@lancergr thank you for the update!


return this;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add toString() :
@OverRide
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getSimpleName());
sb.append("[merchantAccount=").append(merchantAccount);
sb.append(",shopperReference=").append(shopperReference);
sb.append(",shopperEmail=").append(shopperEmail);
sb.append(",hasCard=").append(card != null);
sb.append(",selectedBrand=").append(selectedBrand);
sb.append(",shopperStatement=").append(shopperStatement);
sb.append("]");
return sb.toString();
}

this.result = result;
return this;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add toString() method :
@OverRide
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.getClass().getSimpleName());
sb.append("[");
sb.append("pspReference=").append(pspReference);
sb.append(",recurringDetailReference=").append(recurringDetailReference);
sb.append(",result=").append(result);
sb.append(",alias=").append(alias);
sb.append(",aliasType=").append(aliasType);
if(params!=null) {
sb.append(",redirectUrl=").append(redirectUrl);
sb.append(",redirectType=").append(redirectType);
}
sb.append("]");
return sb.toString();
}

return this;
}

public StoreTokenRequest selectRecurringContract() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think setContractTypeRecurring() will be better name because it is setting the value.

return this;
}

public StoreTokenRequest selectOneClickRecurringContract() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for this method name too.


public StoreTokenRequest selectOneClickContract() {
Recurring recurring = new Recurring();
recurring.contract(Recurring.ContractEnum.ONECLICK);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor : we can replace this by :
setRecurring(new Recurring().contract(Recurring.ContractEnum.ONECLICK));

}

public StoreTokenRequest selectRecurringContract() {
Recurring recurring = new Recurring();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor : we can replace this by :
setRecurring(new Recurring().contract(Recurring.ContractEnum.RECURRING));

Copy link
Contributor

@rkewlani rkewlani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ ashwindas,
Thanks for pull request. I have reviewed your change and looks good to me. Only few minor changes are nice to have and I have left review comments for that.

Regards,
Rajni

@rkewlani rkewlani self-requested a review October 26, 2018 13:51
@rkewlani rkewlani merged commit ca2fc85 into Adyen:develop Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Indicates new feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants