instamojo-java
instamojo-java copied to clipboard
Use org.joda.time.DateTime to handle datetime objects
All datetime fields in the models are now parsed to org.joda.time.DateTime
in UTC. This is set as a convention to avoid any inconsistencies in the timezone sent in the v2 API. DateTimeUtils.parseISODateTimeString
will automatically detect the timezone in datetime string and return a DateTime
object, given that the string is in ISO8601 format.
Signed-off-by: Abeer [email protected]
Codecov Report
Merging #26 into master will increase coverage by
0.08%
. The diff coverage is61.53%
.
@@ Coverage Diff @@
## master #26 +/- ##
============================================
+ Coverage 49.73% 49.82% +0.08%
- Complexity 143 145 +2
============================================
Files 19 21 +2
Lines 575 584 +9
Branches 25 27 +2
============================================
+ Hits 286 291 +5
- Misses 270 273 +3
- Partials 19 20 +1
Impacted Files | Coverage Δ | Complexity Δ | |
---|---|---|---|
...main/java/com/instamojo/wrapper/model/Invoice.java | 35% <ø> (ø) |
7 <0> (ø) |
:arrow_down: |
.../main/java/com/instamojo/wrapper/model/Refund.java | 34.61% <ø> (ø) |
9 <0> (ø) |
:arrow_down: |
...java/com/instamojo/wrapper/model/PaymentOrder.java | 56.81% <ø> (ø) |
16 <0> (ø) |
:arrow_down: |
.../main/java/com/instamojo/wrapper/model/Payout.java | 34.04% <ø> (ø) |
16 <0> (ø) |
:arrow_down: |
...va/com/instamojo/wrapper/model/PaymentRequest.java | 43.75% <ø> (ø) |
25 <0> (ø) |
:arrow_down: |
...ain/java/com/instamojo/wrapper/util/HttpUtils.java | 87.71% <0%> (-0.42%) |
17 <2> (ø) |
|
.../java/com/instamojo/wrapper/api/InstamojoImpl.java | 52.06% <100%> (ø) |
16 <0> (ø) |
:arrow_down: |
...java/com/instamojo/wrapper/util/DateTimeUtils.java | 50% <50%> (ø) |
1 <1> (?) |
|
...n/java/com/instamojo/wrapper/util/GsonWrapper.java | 66.66% <66.66%> (ø) |
1 <1> (?) |
|
... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 6200a8c...acc0e7f. Read the comment docs.
Any reason we prefer joda over java 8 time modules?
As of now, this library supports Java 7 also, so we couldn't use the Java 8 time module.
source compatibility states 1.8, wouldn't that lead to the same target compatibility?