Skip to content
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

TransacionService list with filter doesnt work. #47

Closed
thiagolocatelli opened this issue Apr 4, 2014 · 6 comments
Closed

TransacionService list with filter doesnt work. #47

thiagolocatelli opened this issue Apr 4, 2014 · 6 comments
Assignees
Labels

Comments

@thiagolocatelli
Copy link

I just created a transacion on my account and I am trying to list this transaction. I am trying to get all transactions within the last 30 days, but I am also putting the range as 1 day after, to make sure recent charges are included. Its not working

Transaction.Filter f = Transaction.createFilter();
        Transaction.Order o = Transaction.createOrder();
        PaymillList<Transaction> list = transactionService.list(f.byCreatedAt(DateUtils.getDayInPast(30), DateUtils.getDayInPast(-1)), 
                o.asc().byCreatedAt());
@stoilkov
Copy link
Contributor

stoilkov commented Apr 5, 2014

Reproduced. Problem is that the API works with timestamps in seconds and Java per default with milliseconds.
@nikoloff we should try to deal with that centralized.
@thiagolocatelli will be fixed next week. If you need this ASAP, you can fix it locally in com.paymill.models.Transaction:

public Transaction.Filter byCreatedAt( final Date startCreatedAt, final Date endCreatedAt ) {
      this.createdAt = String.valueOf( startCreatedAt.getTime()/1000 ) + "-" + String.valueOf( endCreatedAt.getTime()/1000 );
      return this;
    }

@thiagolocatelli
Copy link
Author

Awesome! Thanks Emilian!!

On Saturday, April 5, 2014, Emilian Stoilkov notifications@github.com
wrote:

Reproduced. Problem is that the API works with timestamps in seconds and
Java per default with milliseconds.
@nikoloff https://github.com/nikoloff we should try to deal with that
centralized.
@thiagolocatelli https://github.com/thiagolocatelli will be fixed next
week. If you need this ASAP, you can fix it locally in
com.paymill.models.Transaction:

public Transaction.Filter byCreatedAt( final Date startCreatedAt, final Date endCreatedAt ) {
this.createdAt = String.valueOf( startCreatedAt.getTime()/1000 ) + "-" + String.valueOf( endCreatedAt.getTime()/1000 );
return this;
}

Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-39632357
.

"thiago:locatelli$gmail:com".replace(':','.').replace('$','@')

@nikoloff
Copy link
Contributor

nikoloff commented Apr 9, 2014

@thiagolocatelli it should be fixed with v3.1.2

@stoilkov
Copy link
Contributor

@thiagolocatelli can you confirm, this issue has been fixed?

@thiagolocatelli
Copy link
Author

Hi Emilian,

Did you guys change the dashboard? I am logging in but I cant see the
application I created to test the OAuth. Do I have to register first? I
thought I could do this without registering.

Thank you
Thiago

On Fri, Apr 11, 2014 at 3:23 AM, Emilian Stoilkov
notifications@github.comwrote:

@thiagolocatelli https://github.com/thiagolocatelli can you confirm,
this issue has been fixed?


Reply to this email directly or view it on GitHubhttps://github.com//issues/47#issuecomment-40177124
.

"thiago:locatelli$gmail:com".replace(':','.').replace('$','@')

@stoilkov
Copy link
Contributor

@thiagolocatelli i just emailed you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants