Skip to content

Commit

Permalink
[Auto Generated] 1.4.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Sep 20, 2024
1 parent 703e123 commit 538e7f9
Show file tree
Hide file tree
Showing 16 changed files with 2,541 additions and 818 deletions.
2,517 changes: 2,517 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Get started with the Kotlin Development SDK for Fynd Platform

# Usage

1. Add the dependency in your app build.gradle `implementation 'com.github.gofynd:fdk-client-kotlin:1.4.11'` in your app build.gradle
1. Add the dependency in your app build.gradle `implementation 'com.github.gofynd:fdk-client-kotlin:1.4.12'` in your app build.gradle
2. Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ android {
minSdkVersion 21
targetSdkVersion 31
versionCode 2
versionName "1.4.11"
versionName "1.4.12"
multiDexEnabled true

vectorDrawables.useSupportLibrary = true
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/sdk/application/cart/CartApiList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ interface CartApiList {
: Response<CartShipmentsResponse>


@POST
suspend fun checkoutCart(@Url url1: String? , @Query("buy_now") buyNow: Boolean?, @Query("cart_type") cartType: String?, @Body body: CartCheckoutDetailRequest, @HeaderMap headers: Map<String, String>? = null)
: Response<CartCheckoutResponse>


@PUT
suspend fun updateCartMeta(@Url url1: String? , @Query("id") id: String?, @Query("buy_now") buyNow: Boolean?, @Body body: CartMetaRequest, @HeaderMap headers: Map<String, String>? = null)
: Response<CartMetaResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class CartDataManagerClass(val config: ApplicationConfig, val unauthorizedAction

_relativeUrls["getShipments"] = "/service/application/cart/v1.0/shipment".substring(1)

_relativeUrls["checkoutCart"] = "/service/application/cart/v1.0/checkout".substring(1)

_relativeUrls["updateCartMeta"] = "/service/application/cart/v1.0/meta".substring(1)

_relativeUrls["getCartShareLink"] = "/service/application/cart/v1.0/share-cart".substring(1)
Expand Down Expand Up @@ -258,13 +256,6 @@ class CartDataManagerClass(val config: ApplicationConfig, val unauthorizedAction



suspend fun checkoutCart(buyNow: Boolean?=null,cartType: String?=null,body: CartCheckoutDetailRequest, headers: Map<String, String> = emptyMap()): Response<CartCheckoutResponse>? {
var fullUrl : String? = _relativeUrls["checkoutCart"]

return cartApiList?.checkoutCart(fullUrl, buyNow = buyNow, cartType = cartType,body = body,headers = headers)}



suspend fun updateCartMeta(id: String?=null,buyNow: Boolean?=null,body: CartMetaRequest, headers: Map<String, String> = emptyMap()): Response<CartMetaResponse>? {
var fullUrl : String? = _relativeUrls["updateCartMeta"]

Expand Down
164 changes: 0 additions & 164 deletions src/main/java/com/sdk/application/cart/CartModels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3339,33 +3339,6 @@ data class CartShipmentsResponse(










}




/*
Model: CartCheckoutCustomMeta
*/
@Parcelize
data class CartCheckoutCustomMeta(



@SerializedName("key")
var key: String?=null,

@SerializedName("value")
var value: String?=null

): Parcelable {



Expand Down Expand Up @@ -3434,143 +3407,6 @@ data class StaffCheckout(
var id: String?=null

): Parcelable {













}




/*
Model: CartCheckoutDetailRequest
*/
@Parcelize
data class CartCheckoutDetailRequest(



@SerializedName("custom_meta")
var customMeta: ArrayList<CartCheckoutCustomMeta>?=null,

@SerializedName("customer_details")
var customerDetails: @RawValue HashMap<String,Any>?=null,

@SerializedName("merchant_code")
var merchantCode: String?=null,

@SerializedName("id")
var id: String?=null,

@SerializedName("payment_auto_confirm")
var paymentAutoConfirm: Boolean?=null,

@SerializedName("payment_mode")
var paymentMode: String?=null,

@SerializedName("aggregator")
var aggregator: String?=null,

@SerializedName("address_id")
var addressId: String?=null,

@SerializedName("callback_url")
var callbackUrl: String?=null,

@SerializedName("delivery_address")
var deliveryAddress: @RawValue HashMap<String,Any>?=null,

@SerializedName("staff")
var staff: StaffCheckout?=null,

@SerializedName("order_type")
var orderType: String?=null,

@SerializedName("ordering_store")
var orderingStore: Int?=null,

@SerializedName("extra_meta")
var extraMeta: @RawValue HashMap<String,Any>?=null,

@SerializedName("payment_identifier")
var paymentIdentifier: String?=null,

@SerializedName("billing_address")
var billingAddress: @RawValue HashMap<String,Any>?=null,

@SerializedName("payment_params")
var paymentParams: @RawValue HashMap<String,Any>?=null,

@SerializedName("billing_address_id")
var billingAddressId: String?=null,

@SerializedName("meta")
var meta: @RawValue HashMap<String,Any>?=null,

@SerializedName("payment_extra_identifiers")
var paymentExtraIdentifiers: @RawValue HashMap<String,Any>?=null,

@SerializedName("iin")
var iin: String?=null,

@SerializedName("network")
var network: String?=null,

@SerializedName("type")
var type: String?=null,

@SerializedName("card_id")
var cardId: String?=null

): Parcelable {









































Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sdk/common/AccessTokenInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AccessTokenInterceptor(
}

if (!original.headers.names().contains("x-fp-sdk-version")) {
header("x-fp-sdk-version", "1.4.11")
header("x-fp-sdk-version", "1.4.12")
}

if (!original.headers.names().contains("x-currency-code")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ApplicationHeaderInterceptor(
header("x-currency-code", currencyCode)
}
if (!original.headers.names().contains("x-fp-sdk-version")) {
header("x-fp-sdk-version", "1.4.11")
header("x-fp-sdk-version", "1.4.12")
}
val bearerToken =
Base64.encodeToString(
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sdk/common/PublicHeaderInterceptor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PublicHeaderInterceptor(
val original = chain.request()

val builder = original.newBuilder()
.header("x-fp-sdk-version", "1.4.11")
.header("x-fp-sdk-version", "1.4.12")
publicConfig?.extraHeaders?.let {
for ((key, value) in it) {
builder.header(key,value)
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/sdk/platform/cart/CartApiList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ interface CartApiList {
suspend fun updateCartMeta(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("id") id: String?, @Query("buy_now") buyNow: Boolean?,@Body body: PlatformCartMetaRequest, @HeaderMap headers: Map<String, String>? = null)
: Response<CartMetaResponse>

@POST ("/service/platform/cart/v1.0/company/{company_id}/application/{application_id}/checkout")
suspend fun platformCheckoutCart(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("id") id: String?,@Body body: PlatformCartCheckoutDetailRequest, @HeaderMap headers: Map<String, String>? = null)
: Response<CartCheckoutResponse>

@GET ("/service/platform/cart/v1.0/company/{company_id}/application/{application_id}/available-delivery-mode")
suspend fun getAvailableDeliveryModes(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Query("area_code") areaCode: String, @Query("id") id: String?, @HeaderMap headers: Map<String, String>? = null)
: Response<CartDeliveryModesResponse>
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/com/sdk/platform/cart/CartDataManagerClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class CartDataManagerClass(val config: PlatformConfig, val unauthorizedAction: (







Expand Down Expand Up @@ -638,16 +637,6 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
}


suspend fun platformCheckoutCart(id: String?=null,body: PlatformCartCheckoutDetailRequest, headers: Map<String, String> = emptyMap())
: Response<CartCheckoutResponse>? {
return if (config.oauthClient.isAccessTokenValid()) {
cartApiList?.platformCheckoutCart(companyId = config.companyId ,applicationId = applicationId ,id = id, body = body,headers = headers)
} else {
null
}
}


suspend fun getAvailableDeliveryModes(areaCode: String,id: String?=null, headers: Map<String, String> = emptyMap())
: Response<CartDeliveryModesResponse>? {
return if (config.oauthClient.isAccessTokenValid()) {
Expand Down
Loading

0 comments on commit 538e7f9

Please sign in to comment.