Skip to content

Commit

Permalink
[Auto Generated] 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Dec 23, 2024
1 parent f177efc commit 0049834
Show file tree
Hide file tree
Showing 16 changed files with 368 additions and 47 deletions.
66 changes: 66 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
# CHANGE LOG (1.6.0) - 2.1.0

## Application Client



### Logistic



#### getCountries

- ##### What's New
- [Added] <code>query</code> parameter <code>phoneCode</code> (type: <code>string</code>)



## Platform Client



### AuditTrail



#### createAuditLog

- ##### What's New
- [Breaking] [Added] Type <code>object</code> to property <code></code> of schema <code>CreateLogResp</code> in response with status code 200

- ##### What's Deprecated
- [Deleted] Required status to Request body content


### Content



#### createPagePreview

- ##### What's Deprecated
- [Breaking] [Deleted] method <code>createPagePreview</code>



### Payment



#### validateCustomerAndCreditSummary

- ##### What's New
- [Added] method <code>validateCustomerAndCreditSummary</code>



### User



#### createUser

- ##### What's Changed
- [Changed] <code>username</code> made optional in request body


# CHANGE LOG (1.5.2) - 2.0.0

## Application Client
Expand Down
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.5.2'` in your app build.gradle
1. Add the dependency in your app build.gradle `implementation 'com.github.gofynd:fdk-client-kotlin:1.6.0'` 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.5.2"
versionName "1.6.0"
multiDexEnabled true

vectorDrawables.useSupportLibrary = true
Expand Down
66 changes: 64 additions & 2 deletions src/main/java/com/sdk/application/cart/CartModels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2219,7 +2219,57 @@ data class AddCartDetailResult(
var cart: CartDetailResult?=null,

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

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

@SerializedName("items")
var items: ArrayList<CartItemInfo>?=null

): Parcelable {















}




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



@SerializedName("item_id")
var itemId: Int?=null,

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

@SerializedName("store_id")
var storeId: Int?=null,

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

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

): Parcelable {

Expand All @@ -2233,6 +2283,8 @@ data class AddCartDetailResult(





}


Expand Down Expand Up @@ -2406,7 +2458,13 @@ data class UpdateCartDetailResult(
var cart: CartDetailResult?=null,

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

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

@SerializedName("items")
var items: ArrayList<CartItemInfo>?=null

): Parcelable {

Expand All @@ -2418,6 +2476,10 @@ data class UpdateCartDetailResult(







}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface LogisticApiList {


@GET
suspend fun getCountries(@Url url1: String? , @Query("onboarding") onboarding: Boolean?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("q") q: String?, @Query("hierarchy") hierarchy: String?, @HeaderMap headers: Map<String, String>? = null)
suspend fun getCountries(@Url url1: String? , @Query("onboarding") onboarding: Boolean?, @Query("page_no") pageNo: Int?, @Query("page_size") pageSize: Int?, @Query("q") q: String?, @Query("hierarchy") hierarchy: String?, @Query("phone_code") phoneCode: String?, @HeaderMap headers: Map<String, String>? = null)
: Response<GetCountries>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ class LogisticDataManagerClass(val config: ApplicationConfig, val unauthorizedAc



suspend fun getCountries(onboarding: Boolean?=null,pageNo: Int?=null,pageSize: Int?=null,q: String?=null,hierarchy: String?=null, headers: Map<String, String> = emptyMap()): Response<GetCountries>? {
suspend fun getCountries(onboarding: Boolean?=null,pageNo: Int?=null,pageSize: Int?=null,q: String?=null,hierarchy: String?=null,phoneCode: String?=null, headers: Map<String, String> = emptyMap()): Response<GetCountries>? {
var fullUrl : String? = _relativeUrls["getCountries"]

return logisticApiList?.getCountries(fullUrl, onboarding = onboarding, pageNo = pageNo, pageSize = pageSize, q = q, hierarchy = hierarchy,headers = headers)}
return logisticApiList?.getCountries(fullUrl, onboarding = onboarding, pageNo = pageNo, pageSize = pageSize, q = q, hierarchy = hierarchy, phoneCode = phoneCode,headers = headers)}



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.5.2")
header("x-fp-sdk-version", "1.6.0")
}

if (!original.headers.names().contains("x-currency-code")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ApplicationHeaderInterceptor(
header("x-currency-code", currencyCode)
}
if (!original.headers.names().contains("x-fp-sdk-version")) {
header("x-fp-sdk-version", "1.5.2")
header("x-fp-sdk-version", "1.6.0")
}
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.5.2")
.header("x-fp-sdk-version", "1.6.0")
publicConfig?.extraHeaders?.let {
for ((key, value) in it) {
if (!original.headers.names().contains(key)) {
Expand Down
22 changes: 0 additions & 22 deletions src/main/java/com/sdk/platform/audittrail/AuditTrailModels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -141,28 +141,6 @@ data class EntityObject(



}




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



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

): Parcelable {





}


Expand Down
62 changes: 62 additions & 0 deletions src/main/java/com/sdk/platform/cart/CartModels.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6417,6 +6417,56 @@ data class AddCartDetailResult(
@SerializedName("partial")
var partial: Boolean?=null,

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

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

@SerializedName("items")
var items: ArrayList<CartItemInfo>?=null

): Parcelable {















}




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



@SerializedName("item_id")
var itemId: Int?=null,

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

@SerializedName("store_id")
var storeId: Int?=null,

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

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

Expand All @@ -6432,6 +6482,8 @@ data class AddCartDetailResult(





}


Expand Down Expand Up @@ -6582,6 +6634,12 @@ data class UpdateCartDetailResult(
@SerializedName("cart")
var cart: CartDetailResult?=null,

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

@SerializedName("items")
var items: ArrayList<CartItemInfo>?=null,

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

Expand All @@ -6595,6 +6653,10 @@ data class UpdateCartDetailResult(







}


Expand Down
4 changes: 0 additions & 4 deletions src/main/java/com/sdk/platform/content/ContentApiList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ interface ContentApiList {
suspend fun getPageSpec(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @HeaderMap headers: Map<String, String>? = null)
: Response<PageSpec>

@POST ("/service/platform/content/v1.0/company/{company_id}/application/{application_id}/pages/preview/")
suspend fun createPagePreview(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: PagePayload, @HeaderMap headers: Map<String, String>? = null)
: Response<PageSchema>

@PUT ("/service/platform/content/v1.0/company/{company_id}/application/{application_id}/pages/publish/{slug}")
suspend fun updatePagePreview(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("slug") slug: String,@Body body: PagePublishPayload, @HeaderMap headers: Map<String, String>? = null)
: Response<PageSchema>
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/com/sdk/platform/content/ContentDataManagerClass.kt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class ContentDataManagerClass(val config: PlatformConfig, val unauthorizedAction






suspend fun getCustomFieldTypes( headers: Map<String, String> = emptyMap())
Expand Down Expand Up @@ -862,16 +861,6 @@ inner class ApplicationClient(val applicationId:String,val config: PlatformConfi
}


suspend fun createPagePreview(body: PagePayload, headers: Map<String, String> = emptyMap())
: Response<PageSchema>? {
return if (config.oauthClient.isAccessTokenValid()) {
contentApiList?.createPagePreview(companyId = config.companyId ,applicationId = applicationId , body = body,headers = headers)
} else {
null
}
}


suspend fun updatePagePreview(slug: String,body: PagePublishPayload, headers: Map<String, String> = emptyMap())
: Response<PageSchema>? {
return if (config.oauthClient.isAccessTokenValid()) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/sdk/platform/payment/PaymentApiList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,8 @@ interface PaymentApiList {
suspend fun patchMerchantPaymentOptionVersion(@Path("company_id") companyId: String, @Path("application_id") applicationId: String, @Path("aggregator_id") aggregatorId: String,@Body body: PatchAggregatorControl, @HeaderMap headers: Map<String, String>? = null)
: Response<PlatformPaymentModeDetails>

@POST ("/service/platform/payment/v1.0/company/{company_id}/application/{application_id}/payment/validate/customer-credits")
suspend fun validateCustomerAndCreditSummary(@Path("company_id") companyId: String, @Path("application_id") applicationId: String,@Body body: CustomerValidationSchema, @HeaderMap headers: Map<String, String>? = null)
: Response<ValidateCustomerCreditSchema>

}
Loading

0 comments on commit 0049834

Please sign in to comment.