Skip to content

Commit bb0d890

Browse files
authored
Use utc dates on promotions (#21)
1 parent 775cc73 commit bb0d890

File tree

16 files changed

+122
-98
lines changed

16 files changed

+122
-98
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ dependencies for the specific services you use only. For example : Authenticatio
4646
Add specific dependencies to your project's build file:
4747

4848
```groovy
49-
implementation "software.reloadly:java-sdk-authentication:1.0.2"
49+
implementation "software.reloadly:java-sdk-authentication:1.0.3"
5050
```
5151

5252
**OR**
5353

5454
```groovy
55-
implementation "software.reloadly:java-sdk-airtime:1.0.2"
55+
implementation "software.reloadly:java-sdk-airtime:1.0.3"
5656
```
5757

5858
**OR**
5959

6060
```groovy
61-
implementation "software.reloadly:java-sdk-giftcard:1.0.2"
61+
implementation "software.reloadly:java-sdk-giftcard:1.0.3"
6262
```
6363

6464
### Maven users
@@ -70,7 +70,7 @@ Add specific dependencies to your project's POM:
7070
<dependency>
7171
<groupId>software.reloadly</groupId>
7272
<artifactId>java-sdk-authentication</artifactId>
73-
<version>1.0.2</version>
73+
<version>1.0.3</version>
7474
</dependency>
7575
```
7676

@@ -81,7 +81,7 @@ Add specific dependencies to your project's POM:
8181
<dependency>
8282
<groupId>software.reloadly</groupId>
8383
<artifactId>java-sdk-airtime</artifactId>
84-
<version>1.0.2</version>
84+
<version>1.0.3</version>
8585
</dependency>
8686
```
8787

@@ -92,7 +92,7 @@ Add specific dependencies to your project's POM:
9292
<dependency>
9393
<groupId>software.reloadly</groupId>
9494
<artifactId>java-sdk-giftcard</artifactId>
95-
<version>1.0.2</version>
95+
<version>1.0.3</version>
9696
</dependency>
9797
```
9898

java-sdk-airtime/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<parent>
77
<groupId>software.reloadly</groupId>
88
<artifactId>java-sdk</artifactId>
9-
<version>1.0.2</version>
9+
<version>1.0.3</version>
1010
</parent>
1111

1212
<modelVersion>4.0.0</modelVersion>
1313
<artifactId>java-sdk-airtime</artifactId>
14-
<version>1.0.2</version>
14+
<version>1.0.3</version>
1515
<name>Reloadly Java SDK :: Services :: Reloadly Airtime Service</name>
1616
<url>https://github.com/reloadly/reloadly-sdk-java</url>
1717

java-sdk-airtime/src/main/java/software/reloadly/sdk/airtime/dto/response/Promotion.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
44
import com.fasterxml.jackson.annotation.JsonInclude;
55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import software.reloadly.sdk.core.internal.adapter.JackSonDateDeserializer;
76
import lombok.EqualsAndHashCode;
87
import lombok.Getter;
98
import lombok.ToString;
9+
import software.reloadly.sdk.core.internal.adapter.UTCDateDeserializer;
1010

1111
import java.io.Serializable;
1212
import java.util.Date;
@@ -48,13 +48,13 @@ public class Promotion implements Serializable {
4848
/**
4949
* Date on which the promotion starts
5050
*/
51-
@JsonDeserialize(using = JackSonDateDeserializer.class)
51+
@JsonDeserialize(using = UTCDateDeserializer.class)
5252
private Date startDate;
5353

5454
/**
5555
* Date on which the promotion ends
5656
*/
57-
@JsonDeserialize(using = JackSonDateDeserializer.class)
57+
@JsonDeserialize(using = UTCDateDeserializer.class)
5858
private Date endDate;
5959

6060
/**

java-sdk-airtime/src/test/resources/operator/operator_auto_detect_filtered.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@
7777
"title": "Digicel Haiti From 16 Nov 2020 00:00 To 17 Jan 2021 23:59 (GMT-05:00)",
7878
"title2": "Digicel Intl Click to Win sweepstakes",
7979
"description": "DIGICEL INTERNATIONAL: &ldquo;CLICK TO WIN&rdquo; SWEEPSTAKES<br /><br />OFFICIAL RULES<br />DESCRIPTION/ENTRY PERIOD/ELIGIBILITY: NO PURCHASE NECESSARY. Purchase will NOT increase your chance of winning. The&nbsp;Digicel International: &ldquo;Click to Win&rdquo; Sweepstakes (the &ldquo;Sweepstakes&rdquo; or &ldquo;Prize Draw&rdquo;), is open to legal residents of the 50 United&nbsp;States, the District of Columbia (&ldquo;US Entrants&rdquo;), Canada including the Province of Quebec (&ldquo;CA Entrants&rdquo;), and the United Kingdom&nbsp;(&ldquo;UK Entrants&rdquo;), who are 18 years of age or older at time of entry (collectively &ldquo;Eligible Entrant(s)&rdquo;). The Sweepstakes begins at&nbsp;12:00:00 PM (&ldquo;Noon&rdquo;) Eastern Daylight Time (EDT) [USA], (equivalent to 4:00:00 PM Greenwich Mean Time (GMT)) on Monday,&nbsp;November 16th, 2020 and will end at Noon EDT [4:00:00 PM GMT] on Sunday, January 17th, 2021 (the &ldquo;Sweepstakes Period&rdquo;).&nbsp;Individuals employed by or otherwise associated with employees of Diaspora Talktime, Inc./Digicel International (the &ldquo;Sponsor&rdquo;), its&nbsp;affiliates, distributors, subsidiaries and individuals of promotional partners, prize providers, agencies including Marden-Kane, Inc.&nbsp;(the &ldquo;Administrator&rdquo;) (collectively the &ldquo;Released Parties&rdquo;); and, their immediate families (spouse, parents, children, siblings and their&nbsp;respective spouses) and persons living in the same household of each are not eligible to enter or win a prize. The Sweepstakes will&nbsp;be divided into nine (9) weekly entry periods (each, an &ldquo;Entry Period&rdquo;), as detailed in the Drawing Schedule (the &ldquo;Chart&rdquo;) below.<br /><br />HOW TO ENTER: There are two ways to enter the Sweepstakes:<br />1) Automatic Entry With Purchase: Each time an entrant completes one of the qualifying transactions via an authorized agent, the&nbsp;website at digicelinternational.com, or the Digicel International App using a participating product to a registered Digicel phone&nbsp;number as further detailed below per participating country, the entrant will automatically receive one (1) entry (the &ldquo;Entry&rdquo;)&nbsp;into the Entry Period/random drawing that corresponds to the date of their transaction (a &ldquo;Qualifying Transaction&rdquo;).<br />a. For US Entrants: Participating products include Top Up/Plans; Bill Pay; Call International; Send Money; and Digital Cards. Any&nbsp;amount sent from the US to a registered Digicel phone number (located in Anguilla, Antigua, Aruba, Barbados, Bermuda,&nbsp;Bonaire, BVI, Cayman Islands, Curacao, Dominica, El Salvador, French Guiana, Grenada, Guadeloupe, Guyana, Haiti, Jamaica,&nbsp;Martinique, Montserrat, Panama, St. Kitts, St. Lucia, St. Vincent, Suriname, Trinidad or Turks and Caicos) will be eligible to&nbsp;receive an entry.&nbsp;<br />b. For CA and UK Entrants: Participating products include Top Up/Plans and Send Money. Any Top Up amount or money sent&nbsp;from CA and the UK, to a registered Digicel phone number anywhere in the world will be eligible to receive an entry.<br /><br /><img alt=\"\" src=\"https://i.postimg.cc/YCqxd8LH/poster-PROM-11x17-US-English.png\" style=\"height:800px; width:518px\" /><br /><br />For complete Terms and conditions and exclusive marketing materials please&nbsp;<a href=\"https://www.dropbox.com/sh/14u611yeds97f0d/AAAc81O8VAij0gVT9ugCyZega?dl=0\">click here</a>.",
80-
"startDate": "2020-11-16 10:00:00",
81-
"endDate": "2021-01-18 09:59:00",
80+
"startDate": "2020-11-16T10:00:00Z",
81+
"endDate": "2021-01-18T09:59:00Z",
8282
"denominations": "All",
8383
"localDenominations": null
8484
},
@@ -89,8 +89,8 @@
8989
"title": "Digicel Haiti From 24 Dec 2020 00:00 To 31 Dec 2020 23:59 (GMT-05:00)",
9090
"title2": "Bonus 3X to 4X",
9191
"description": "<br />-&nbsp;The promotion will run from 00:01 am Thursday, December 24th 2020, through to and including 11:59 pm Thursday, December 31st 2020 (&ldquo;The Promotion Period&rdquo;).<br />- See below the participant denominations for this promotion:<br />&nbsp; &nbsp;- For USD$10 / CAD$ 15/ GBP$ 8 / Local Price 500 HTG, Customers will receive&nbsp; 200% Bonus Credit<br />&nbsp; &nbsp;- For&nbsp; USD$15 / CAD$ 20 /&nbsp; GBP$12 / Local Price 875 HTG, Customers will receive&nbsp; 300% Bonus Credit<br /><br />-&nbsp;The bonus minutes/credit is valid on the recipient&rsquo;s mobile number for a total of 3 days from when it is applied.<br />- The bonus credit on the recipient&rsquo;s Digicel mobile number can be used for Digicel to Digicel (on-net) calls only.<br />- Postpaid customers and Home and Entertainment customers are not eligible for the promotion.<br />- This promotion is only valid for Prepaid Digicel customers.<br />- Digicel will not be responsible for: (1) technical failures of any kind, including, but not limited to malfunctions, interruptions, or disconnections in network connections or hardware or software; (2) unauthorized human intervention in any part; or (3) technical or human error which may occur in the administration of this promotion.<br />- Digicel reserves the right to at any time vary the terms of the promotion, to amend its terms and conditions or to withdraw the promotion. In any of these events, notice will be given via media advertisements or messages to subscribers and will be effective immediately or as of the date referred to in such notifications.<br />- Digicel reserves the right to terminate, cancel, suspend and/or modify the promotion if any fraud, virus or other technical problem corrupts the administration, security, safety or proper play of the promotion. In such event, Digicel hereby specifically reserve the right (but not the obligation) to award some other prize hereunder by means of a random drawing from among the eligible entries received up until the time of the impairment.<br /><br /><img alt=\"\" src=\"https://i.postimg.cc/q7vQX0Xy/image001-69.png\" style=\"height:650px; width:650px\" />",
92-
"startDate": "2020-12-24 10:00:00",
93-
"endDate": "2021-01-01 09:59:00",
92+
"startDate": "2020-12-24T10:00:00Z",
93+
"endDate": "2021-01-01T09:59:00Z",
9494
"denominations": "USD 10 and 15",
9595
"localDenominations": null
9696
},
@@ -101,8 +101,8 @@
101101
"title": "Digicel Haiti From 01 Jan 2021 00:00 To 01 Jan 2021 23:59 (GMT-05:00)",
102102
"title2": "Bonus 3X and 4X",
103103
"description": "<br />- The promotion will run from 00:01 am Friday, January 1st 2021, through to and including 11:59 pm Friday, January 1st 2021 (&ldquo;The Promotion Period&rdquo;)<br />- For top ups of&nbsp; USD 10 / CAD 15 / GBP 8 / HTG 500 will receive 200% Bonus credit<br />- For top ups of&nbsp; USD 15 / CAD 20 / GBP 12 / HTG 875 will receive 300% Bonus credit<br />- The bonus minutes/credit is valid on the recipient&rsquo;s mobile number for a total of 3 days from when it is applied.<br />- The bonus credit on the recipient&rsquo;s Digicel mobile number can be used for Digicel to Digicel (on-net) calls and SMS only.<br />- Postpaid customers and Home and Entertainment customers are not eligible for the promotion.<br />- This promotion is only valid for prepaid Digicel customers.<br />- Digicel will not be responsible for: (1) technical failures of any kind, including, but not limited to malfunctions, interruptions, or disconnections in network connections or hardware or software; (2) unauthorized human intervention in any part; or (3) technical or human error which may occur in the administration of this promotion.<br />- Digicel reserves the right to at any time vary the terms of the promotion, to amend its terms and conditions or to withdraw the promotion. In any of these events, notice will be given via media advertisements or messages to subscribers and will be effective immediately or as of the date referred to in such notifications.<br />- Digicel reserves the right to terminate, cancel, suspend and/or modify the promotion if any fraud, virus or other technical problem corrupts the administration, security, safety or proper play of the promotion. In such event, Digicel hereby specifically reserve the right (but not the obligation) to award some other prize hereunder by means of a random drawing from among the eligible entries received up until the time of the impairment.<br /><br /><img alt=\"\" src=\"https://i.postimg.cc/65qDk2ST/Haiti-Independence-PNG.png\" style=\"height:650px; width:650px\" />",
104-
"startDate": "2021-01-01 10:00:00",
105-
"endDate": "2021-01-02 09:59:00",
104+
"startDate": "2021-01-01T10:00:00Z",
105+
"endDate": "2021-01-02T09:59:00Z",
106106
"denominations": "USD 10 and up",
107107
"localDenominations": null
108108
}

java-sdk-airtime/src/test/resources/operator/operator_auto_detect_unfiltered.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@
7474
"title": "Digicel Haiti From 24 Dec 2020 00:00 To 31 Dec 2020 23:59 (GMT-05:00)",
7575
"title2": "Bonus 3X to 4X",
7676
"description": "<br />-&nbsp;The promotion will run from 00:01 am Thursday, December 24th 2020, through to and including 11:59 pm Thursday, December 31st 2020 (&ldquo;The Promotion Period&rdquo;).<br />- See below the participant denominations for this promotion:<br />&nbsp; &nbsp;- For USD$10 / CAD$ 15/ GBP$ 8 / Local Price 500 HTG, Customers will receive&nbsp; 200% Bonus Credit<br />&nbsp; &nbsp;- For&nbsp; USD$15 / CAD$ 20 /&nbsp; GBP$12 / Local Price 875 HTG, Customers will receive&nbsp; 300% Bonus Credit<br /><br />-&nbsp;The bonus minutes/credit is valid on the recipient&rsquo;s mobile number for a total of 3 days from when it is applied.<br />- The bonus credit on the recipient&rsquo;s Digicel mobile number can be used for Digicel to Digicel (on-net) calls only.<br />- Postpaid customers and Home and Entertainment customers are not eligible for the promotion.<br />- This promotion is only valid for Prepaid Digicel customers.<br />- Digicel will not be responsible for: (1) technical failures of any kind, including, but not limited to malfunctions, interruptions, or disconnections in network connections or hardware or software; (2) unauthorized human intervention in any part; or (3) technical or human error which may occur in the administration of this promotion.<br />- Digicel reserves the right to at any time vary the terms of the promotion, to amend its terms and conditions or to withdraw the promotion. In any of these events, notice will be given via media advertisements or messages to subscribers and will be effective immediately or as of the date referred to in such notifications.<br />- Digicel reserves the right to terminate, cancel, suspend and/or modify the promotion if any fraud, virus or other technical problem corrupts the administration, security, safety or proper play of the promotion. In such event, Digicel hereby specifically reserve the right (but not the obligation) to award some other prize hereunder by means of a random drawing from among the eligible entries received up until the time of the impairment.<br /><br /><img alt=\"\" src=\"https://i.postimg.cc/q7vQX0Xy/image001-69.png\" style=\"height:650px; width:650px\" />",
77-
"startDate": "2020-12-24 10:00:00",
78-
"endDate": "2021-01-01 09:59:00",
77+
"startDate": "2020-12-24T10:00:00Z",
78+
"endDate": "2021-01-01T09:59:00Z",
7979
"denominations": "USD 10 and 15",
8080
"localDenominations": null
8181
},
@@ -86,8 +86,8 @@
8686
"title": "Digicel Haiti From 01 Jan 2021 00:00 To 01 Jan 2021 23:59 (GMT-05:00)",
8787
"title2": "Bonus 3X and 4X",
8888
"description": "<br />- The promotion will run from 00:01 am Friday, January 1st 2021, through to and including 11:59 pm Friday, January 1st 2021 (&ldquo;The Promotion Period&rdquo;)<br />- For top ups of&nbsp; USD 10 / CAD 15 / GBP 8 / HTG 500 will receive 200% Bonus credit<br />- For top ups of&nbsp; USD 15 / CAD 20 / GBP 12 / HTG 875 will receive 300% Bonus credit<br />- The bonus minutes/credit is valid on the recipient&rsquo;s mobile number for a total of 3 days from when it is applied.<br />- The bonus credit on the recipient&rsquo;s Digicel mobile number can be used for Digicel to Digicel (on-net) calls and SMS only.<br />- Postpaid customers and Home and Entertainment customers are not eligible for the promotion.<br />- This promotion is only valid for prepaid Digicel customers.<br />- Digicel will not be responsible for: (1) technical failures of any kind, including, but not limited to malfunctions, interruptions, or disconnections in network connections or hardware or software; (2) unauthorized human intervention in any part; or (3) technical or human error which may occur in the administration of this promotion.<br />- Digicel reserves the right to at any time vary the terms of the promotion, to amend its terms and conditions or to withdraw the promotion. In any of these events, notice will be given via media advertisements or messages to subscribers and will be effective immediately or as of the date referred to in such notifications.<br />- Digicel reserves the right to terminate, cancel, suspend and/or modify the promotion if any fraud, virus or other technical problem corrupts the administration, security, safety or proper play of the promotion. In such event, Digicel hereby specifically reserve the right (but not the obligation) to award some other prize hereunder by means of a random drawing from among the eligible entries received up until the time of the impairment.<br /><br /><img alt=\"\" src=\"https://i.postimg.cc/65qDk2ST/Haiti-Independence-PNG.png\" style=\"height:650px; width:650px\" />",
89-
"startDate": "2021-01-01 10:00:00",
90-
"endDate": "2021-01-02 09:59:00",
89+
"startDate": "2021-01-01T10:00:00Z",
90+
"endDate": "2021-01-02T09:59:00Z",
9191
"denominations": "USD 10 and up",
9292
"localDenominations": null
9393
}

0 commit comments

Comments
 (0)