-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from skedgo/feature/20495-server-booking-erro…
…rs-handling [20495] Handle outbound and return trip booking failures from server DRT. Revisit and revamp certain logics within the DRT feature.
- Loading branch information
Showing
23 changed files
with
168 additions
and
29 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
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
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
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
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
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
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
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
4 changes: 2 additions & 2 deletions
4
TripKitAndroid/src/main/java/com/skedgo/tripkit/tsp/TspModule.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
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
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
45 changes: 41 additions & 4 deletions
45
TripKitDomain/src/main/java/com/skedgo/tripkit/configuration/Server.kt
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,9 +1,46 @@ | ||
package com.skedgo.tripkit.configuration | ||
|
||
enum class Server(val value: String) { | ||
enum class DefaultServer(val value: String) { | ||
ApiTripGo("https://api.tripgo.com/v1/"), | ||
// ApiTripGo("https://galaxies.skedgo.com/lab/beta/satapp/"), | ||
// BigBang("https://bigbang.buzzhives.com/satapp/") | ||
// BigBang("https://api-beta.tripgo.com/v1/") | ||
BigBang("https://galaxies.skedgo.com/lab/beta/satapp/") | ||
} | ||
|
||
open class ServerConfiguration( | ||
var apiTripGoUrl: String = DefaultServer.ApiTripGo.value, | ||
var bigBangUrl: String = DefaultServer.BigBang.value | ||
) | ||
|
||
/** | ||
* Singleton object that manages server configurations for the application. | ||
* | ||
* This manager allows for setting and retrieving server URLs throughout the application. | ||
* It provides a centralized point of configuration, making it easy to adjust server URLs | ||
* for different environments (e.g., development, staging, production) or build variants. | ||
* | ||
* Usage: | ||
* - Access default server URLs via `ServerManager.configuration`. | ||
* - Customize server URLs using `ServerManager.customizeConfiguration(...)`. | ||
* | ||
* Example: | ||
* ``` | ||
* // Accessing default URLs | ||
* val defaultApiUrl = ServerManager.configuration.apiTripGoUrl | ||
* val defaultBigBangUrl = ServerManager.configuration.bigBangUrl | ||
* | ||
* // Customizing URLs | ||
* ServerManager.customizeConfiguration(apiTripGoUrl = "https://api.newtripgo.com/v2/", bigBangUrl = "https://new.bigbang.url/") | ||
* ``` | ||
* | ||
* Note: Customizations to the server URLs should ideally be done during application initialization | ||
* to ensure consistent use of the URLs throughout the application lifecycle. | ||
*/ | ||
object ServerManager { | ||
|
||
var configuration: ServerConfiguration = ServerConfiguration() | ||
|
||
fun setCustomConfiguration(apiTripGoUrl: String? = null, bigBangUrl: String? = null) { | ||
apiTripGoUrl?.let { configuration.apiTripGoUrl = it } | ||
bigBangUrl?.let { configuration.bigBangUrl = it } | ||
} | ||
|
||
} |
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
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
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
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.