-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Client.customerSubscriptions #51
base: master
Are you sure you want to change the base?
Conversation
added: DeleteWithResponse concept added: Client.customerSubscriptions with create, getById and delete with tests added: selenium for test in CustomerSubscriptionsIntegrationTest
…e problems with jsonformat
looks like Travis dont like that I'm using selenium, ill check this soon |
import nl.stil4m.mollie.concepts.Refunds; | ||
import nl.stil4m.mollie.concepts.PaymentRefunds; | ||
import nl.stil4m.mollie.concepts.Status; | ||
import nl.stil4m.mollie.concepts.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use *
imports
private Optional<String> webhookUrl; | ||
|
||
public CreateSubscription(@Nonnull Double amount, @Nullable Integer times, @Nonnull String interval, @Nullable String startDate, @Nonnull String description, @Nullable String method, @Nullable String webhookUrl) { | ||
super(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this super()
call required?
//open paymentUrl and set it to paid | ||
|
||
//setup selenium | ||
WebDriver driver = new ChromeDriver(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this belong to the before?
|
||
//check if payment is complete | ||
payment = customerPayments.get(payment.getId()).getData();//get new version of payment | ||
if (!payment.getStatus().equals("paid")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a good interface to add a isPaid()
method to payment? (which will be ignored in the JSON serialization)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree to just add isPaid()
, because a payment can have 9 types of statuses (source: https://www.mollie.com/en/docs/status)
I would suggest making it an enum, what do you think about that?
I'm quite bussy atm, I will react on this in a few weeks... |
added project's nb-configuration for netbeans so that imports wont * fixed imports * removed unneeded super() moved Selenium Webdriver setup to @BeforeClass and @before
Ok, i've processed your requests expect one, please see my answer above. |
categorised all libs by test
bump |
…ings changed: added Payment.failedDatetime changed: JsonIgnoreProperies(ignoreUnknown = true) for payment and Refund fixed: ignore IssuersInegrationTest by ignoring the current failing test, due that issuers where changed? added: test for PaymentIntegrationTest by payment.status paid, cancelled, refunded, expired fixed: RefundIntegerationTest due that there is a refund payment it wont return 0 results anymore
src/test/java/nl/stil4m/mollie/concepts/PaymentsIntegrationTest.java
Outdated
Show resolved
Hide resolved
added: gitignore nb-configuration.xml (netbeans) changed: import in DynamicClient changed: removed @author from javadoc
changed: import order to match: com.* nl.* org.* javax.* java.* other imports other static imports
In the last week I also added the changeback api in client.paymentChargebacks and client.chargebacks, but without tests, because this isnt testable with the current mollie test api. |
bump. |
Added concept for Client.customerSubscriptions to create, getById and delete (cancel) subscriptions with tests.
For this I also added:
Selenium to fully automatic test a payment. I needed this to able to test the creation of a subscription (which requires a first payment).
DeleteWithResponse, due to the Delete-concept would not resolve an response object. I needed this because the cancelation of a customerSubscription is done by a DELETE method that have a response when the enddate is.