This repository has been archived by the owner on Jul 19, 2024. It is now read-only.
-
-
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.
Merge pull request #10 from suitetecsa/develop
- Loading branch information
Showing
48 changed files
with
1,620 additions
and
2,560 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
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 was deleted.
Oops, something went wrong.
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,37 @@ | ||
package cu.suitetecsa.sdk.nauta.core | ||
|
||
internal fun makeUrl( | ||
action: Action, | ||
portalManager: Portal, | ||
getAction: Boolean = false, | ||
subAction: String? = null, | ||
yearMonthSelected: String? = null, | ||
count: Int? = null, | ||
page: Int? = null | ||
): String { | ||
if (action == Action.CHECK_CONNECTION) { | ||
return portalsUrls[portalManager]!![action] as String | ||
} else if (!getAction) { | ||
return "${urlBase[portalManager]}${portalsUrls[portalManager]!![action]}" | ||
} else { | ||
val url = "${urlBase[portalManager]}${(portalsUrls[portalManager]!![action]!! as Map<*, *>)[subAction]}" | ||
when (subAction) { | ||
"base", "summary" -> { | ||
return url | ||
} | ||
|
||
"list" -> { | ||
if (yearMonthSelected.isNullOrEmpty()) { | ||
throw Exception("yearMonthSelected is required") | ||
} | ||
if (count == null) { | ||
throw Exception("count is required") | ||
} | ||
return if (page == null) { | ||
"${url}${yearMonthSelected}/${count}" | ||
} else "${url}${yearMonthSelected}/${count}/${page}" | ||
} | ||
} | ||
} | ||
return "" | ||
} |
5 changes: 0 additions & 5 deletions
5
src/main/kotlin/cu/suitetecsa/sdk/nauta/data/model/HttpResponse.kt
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
src/main/kotlin/cu/suitetecsa/sdk/nauta/data/repository/DefaultNautaSession.kt
This file was deleted.
Oops, something went wrong.
102 changes: 0 additions & 102 deletions
102
src/main/kotlin/cu/suitetecsa/sdk/nauta/data/repository/FuelNautaService.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.