-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add PR check to verify examples
- Loading branch information
Showing
30 changed files
with
2,202 additions
and
1,444 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Verify Examples | ||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
jobs: | ||
detect-changes: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
outputs: | ||
examples: ${{ steps.filter.outputs.examples }} | ||
steps: | ||
- uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
filters: | | ||
examples: | ||
- 'examples/**' | ||
verify-examples: | ||
needs: detect-changes | ||
if: ${{ needs.detect-changes.outputs.examples == 'true' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
- name: verify examples | ||
working-directory: examples | ||
run: mvn clean install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 10 additions & 7 deletions
17
examples/src/main/java/com/expediagroup/sdk/rapid/examples/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
package com.expediagroup.sdk.rapid.examples; | ||
|
||
/** | ||
* Constants used throughout the application. | ||
*/ | ||
public class Constants { | ||
public static final String TEST_PROPERTY_ID = "11775754"; | ||
public static final String TEST_PROPERTY_ID = "11775754"; | ||
|
||
public static final String TEST_REGION_ID = "178248"; | ||
public static final String TEST_REGION_ID = "178248"; | ||
|
||
public static final String TEST_REGION_ID_WITH_MULTIPOLYGON = "553248635740541470"; | ||
public static final String TEST_REGION_ID_WITH_MULTIPOLYGON = "553248635740541470"; | ||
|
||
public static final String TEST_ANCESTOR_ID = "602962"; | ||
public static final String TEST_ANCESTOR_ID = "602962"; | ||
|
||
public static final String CUSTOMER_IP = "5.5.5.5"; | ||
public static final String CUSTOMER_IP = "5.5.5.5"; | ||
|
||
public static final String SANDBOX_URL = "https://test.ean.com/"; | ||
public static final String SANDBOX_URL = "https://test.ean.com/"; | ||
|
||
public static final String CUSTOMER_SESSION_ID = "123455656565"; | ||
public static final String CUSTOMER_SESSION_ID = "123455656565"; | ||
} |
485 changes: 263 additions & 222 deletions
485
examples/src/main/java/com/expediagroup/sdk/rapid/examples/RapidSdkDemoApplication.java
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 12 additions & 8 deletions
20
...in/java/com/expediagroup/sdk/rapid/examples/salesprofiles/DefaultRapidPartnerProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
package com.expediagroup.sdk.rapid.examples.salesprofiles; | ||
|
||
|
||
/** | ||
* Default Rapid Partner Profile. | ||
*/ | ||
public final class DefaultRapidPartnerProfile extends RapidPartnerSalesProfile { | ||
|
||
public DefaultRapidPartnerProfile() { | ||
this.billingTerms = null; | ||
this.paymentTerms = null; | ||
this.partnerPointOfSale = null; | ||
this.platformName = null; | ||
} | ||
/** | ||
* Default constructor. | ||
*/ | ||
public DefaultRapidPartnerProfile() { | ||
this.billingTerms = null; | ||
this.paymentTerms = null; | ||
this.partnerPointOfSale = null; | ||
this.platformName = null; | ||
} | ||
} |
12 changes: 7 additions & 5 deletions
12
...main/java/com/expediagroup/sdk/rapid/examples/salesprofiles/RapidPartnerSalesProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
package com.expediagroup.sdk.rapid.examples.salesprofiles; | ||
|
||
|
||
/** | ||
* Rapid Partner Sales Profile. | ||
*/ | ||
public abstract class RapidPartnerSalesProfile { | ||
|
||
public String billingTerms; | ||
public String billingTerms; | ||
|
||
public String paymentTerms; | ||
public String paymentTerms; | ||
|
||
public String partnerPointOfSale; | ||
public String partnerPointOfSale; | ||
|
||
public String platformName; | ||
public String platformName; | ||
|
||
} |
19 changes: 16 additions & 3 deletions
19
examples/src/main/java/com/expediagroup/sdk/rapid/examples/scenarios/RapidScenario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
package com.expediagroup.sdk.rapid.examples.scenarios; | ||
|
||
import com.expediagroup.sdk.rapid.examples.salesprofiles.RapidPartnerSalesProfile; | ||
|
||
import java.util.concurrent.ExecutionException; | ||
|
||
/** | ||
* Interface representing a scenario to be executed with a specific sales profile. | ||
*/ | ||
public interface RapidScenario { | ||
|
||
void setProfile(RapidPartnerSalesProfile rapidPartnerSalesProfile); | ||
/** | ||
* Sets the sales profile for the scenario. | ||
* | ||
* @param rapidPartnerSalesProfile the sales profile to be set | ||
*/ | ||
void setProfile(RapidPartnerSalesProfile rapidPartnerSalesProfile); | ||
|
||
void run() throws ExecutionException, InterruptedException; | ||
/** | ||
* Executes the scenario. | ||
* | ||
* @throws ExecutionException if an error occurs during execution | ||
* @throws InterruptedException if the execution is interrupted | ||
*/ | ||
void run() throws ExecutionException, InterruptedException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.