Skip to content

Commit

Permalink
Merge pull request #400 from skedgo/feature/19780-booking-revision
Browse files Browse the repository at this point in the history
[19780] Booking and My Bookings revisions
  • Loading branch information
MichaelReyes authored Dec 20, 2023
2 parents 681eae5 + 81ff035 commit d4589b9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public abstract class BookingConfirmationAction implements Parcelable {
public static final String TYPE_UNLOCK = "UNLOCK";
public static final String TYPE_REQUEST_ANOTHER = "REQUESTANOTHER";
public static final String TYPE_SHOW_TICKETS = "SHOW_TICKETS";
public static final String TYPE_ACTIVATE_TICKETS = "ACTIVATE_TICKETS";
public static final String TYPE_SHOW_RELATED_TRIP = "SHOW_RELATED_TRIP";

public static final Creator<BookingConfirmationAction> CREATOR = new Creator<BookingConfirmationAction>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@ import androidx.annotation.StringDef
BookingConfirmationStatusValue.PROCESSING,
BookingConfirmationStatusValue.PROVIDER_ACCEPTED,
BookingConfirmationStatusValue.USER_ACCEPTED,
BookingConfirmationStatusValue.ACCEPTED,
BookingConfirmationStatusValue.ARRIVING,
BookingConfirmationStatusValue.IN_PROGRESS,
BookingConfirmationStatusValue.PROVIDER_CANCELED,
BookingConfirmationStatusValue.USER_CANCELED,
BookingConfirmationStatusValue.COMPLETED
BookingConfirmationStatusValue.COMPLETED,
BookingConfirmationStatusValue.SCHEDULED,
BookingConfirmationStatusValue.STANDBY,
)
annotation class BookingConfirmationStatusValue {
companion object {
const val PROCESSING = "PROCESSING"
const val PROVIDER_ACCEPTED = "PROVIDER_ACCEPTED"
const val USER_ACCEPTED = "USER_ACCEPTED"
const val ACCEPTED = "ACCEPTED"
const val ARRIVING = "ARRIVING"
const val IN_PROGRESS = "IN_PROGRESS"
const val PROVIDER_CANCELED = "PROVIDER_CANCELED"
const val USER_CANCELED = "USER_CANCELED"
const val COMPLETED = "COMPLETED"
const val PENDING_CHANGES = "PENDING_CHANGES"
const val SCHEDULED = "SCHEDULED"
const val STANDBY = "STANDBY"

fun String.isStatus(@BookingConfirmationStatusValue status: String): Boolean =
this.equals(status, ignoreCase = true)
fun String.isStatusAccepted(): Boolean =
this.equals(PROVIDER_ACCEPTED, ignoreCase = true) ||
this.equals(USER_ACCEPTED, ignoreCase = true) ||
this.equals(ACCEPTED, ignoreCase = true)
}
}
5 changes: 4 additions & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ versions.tripGoLibrary = "1.0"
versions.tripGoGroup = "com.skedgo"
versions.javaxAnnotation = "1.3.2"
versions.instabug = '11.11.0'
versions.paging = "3.0.0"
versions.viewPager2 = "1.0.0"

ext.versions = versions

Expand Down Expand Up @@ -143,10 +145,11 @@ libs.ktxActivity = "androidx.activity:activity-ktx:1.1.0"
libs.picasso = "com.squareup.picasso:picasso:2.71828"
libs.flowPreferences = "com.github.tfcporciuncula.flow-preferences:flow-preferences:1.3.3"
libs.uservoice = "com.uservoice:uservoice-android-sdk:1.2.10"
libs.paging = "androidx.paging:paging-runtime:3.0.0-alpha12"
libs.paging = "androidx.paging:paging-runtime:$versions.paging"
libs.pdfViewer = "com.github.barteksc:android-pdf-viewer:2.8.2"
libs.fragmentKtx = "androidx.fragment:fragment-ktx:1.3.2"
libs.glide = "com.github.bumptech.glide:glide:$versions.glide"
libs.viewPager2 = "androidx.viewpager2:viewpager2:$versions.viewPager2"

libs.volley = "com.android.volley:volley:$versions.volley"
libs.jetBrainsAnnotation = "org.jetbrains:annotations-java5:$versions.jetBrainsJava5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.google.gson.annotations.SerializedName
import com.skedgo.tripkit.common.util.decimalFormatWithCurrencySymbol
import com.skedgo.tripkit.common.util.factor100
import com.skedgo.tripkit.common.util.nonDecimalFormatWithCurrencySymbol
import com.skedgo.tripkit.routing.ModeInfo

data class QuickBookResponse(
val action: Action?,
Expand Down Expand Up @@ -118,6 +119,7 @@ data class Review(
val depart: String,
val destination: Destination,
val mode: String,
val modeInfo: ModeInfo,
val origin: Origin,
val price: Double,
val provider: Provider,
Expand Down

0 comments on commit d4589b9

Please sign in to comment.