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 38c99ab commit 83bde8c
Show file tree
Hide file tree
Showing 21 changed files with 1,552 additions and 125 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 FDKClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Pod::Spec.new do |s|
s.name = 'FDKClient'
s.version = '1.5.2'
s.version = '1.6.0'
s.summary = 'FDK Client SDK for Swift language'

s.description = 'FDK Client SDK for Swift language that can be used to make Apps or extensions.'
Expand Down
2 changes: 1 addition & 1 deletion Sources/code/application/ApplicationAPIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ApplicationAPIClient {
var headers = [
(key: "Authorization", value: "Bearer " + "\(config.applicationId):\(config.applicationToken)".asBase64)
]
headers.append((key: "x-fp-sdk-version", value: "1.5.2"))
headers.append((key: "x-fp-sdk-version", value: "1.6.0"))
headers.append(contentsOf: config.extraHeaders)
if let userAgent = config.userAgent {
headers.append((key: "User-Agent", value: userAgent))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ extension ApplicationClient {
pageSize: Int?,
q: String?,
hierarchy: String?,
phoneCode: String?,

headers: [(key: String, value: String)]? = nil,
onResponse: @escaping (_ response: GetCountries?, _ error: FDKError?) -> Void
Expand Down Expand Up @@ -497,6 +498,10 @@ extension ApplicationClient {
xQuery["hierarchy"] = value
}

if let value = phoneCode {
xQuery["phone_code"] = value
}

var xHeaders: [(key: String, value: String)] = []


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ public extension ApplicationClient.Cart {

public var success: Bool?

public var result: [String: Any]?

public var items: [CartItemInfo]?


public enum CodingKeys: String, CodingKey {

Expand All @@ -27,9 +31,13 @@ public extension ApplicationClient.Cart {

case success = "success"

case result = "result"

case items = "items"

}

public init(cart: CartDetailResult? = nil, message: String? = nil, partial: Bool? = nil, success: Bool? = nil) {
public init(cart: CartDetailResult? = nil, items: [CartItemInfo]? = nil, message: String? = nil, partial: Bool? = nil, result: [String: Any]? = nil, success: Bool? = nil) {

self.message = message

Expand All @@ -39,6 +47,10 @@ public extension ApplicationClient.Cart {

self.success = success

self.result = result

self.items = items

}

required public init(from decoder: Decoder) throws {
Expand Down Expand Up @@ -92,6 +104,30 @@ public extension ApplicationClient.Cart {
}



do {
result = try container.decode([String: Any].self, forKey: .result)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}



do {
items = try container.decode([CartItemInfo].self, forKey: .items)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}


}

public func encode(to encoder: Encoder) throws {
Expand All @@ -113,6 +149,14 @@ public extension ApplicationClient.Cart {
try? container.encodeIfPresent(success, forKey: .success)



try? container.encodeIfPresent(result, forKey: .result)



try? container.encodeIfPresent(items, forKey: .items)


}

}
Expand Down
141 changes: 141 additions & 0 deletions Sources/code/application/Models/Cart/CartItemInfoCartAppModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@


import Foundation
public extension ApplicationClient.Cart {
/*
Model: CartItemInfo
Used By: Cart
*/
class CartItemInfo: Codable {

public var itemId: Int?

public var size: String?

public var storeId: Int?

public var success: Bool?

public var message: String?


public enum CodingKeys: String, CodingKey {

case itemId = "item_id"

case size = "size"

case storeId = "store_id"

case success = "success"

case message = "message"

}

public init(itemId: Int? = nil, message: String? = nil, size: String? = nil, storeId: Int? = nil, success: Bool? = nil) {

self.itemId = itemId

self.size = size

self.storeId = storeId

self.success = success

self.message = message

}

required public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)


do {
itemId = try container.decode(Int.self, forKey: .itemId)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}



do {
size = try container.decode(String.self, forKey: .size)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}



do {
storeId = try container.decode(Int.self, forKey: .storeId)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}



do {
success = try container.decode(Bool.self, forKey: .success)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}



do {
message = try container.decode(String.self, forKey: .message)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
print("codingPath:", context.codingPath)
} catch {

}


}

public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)


try? container.encodeIfPresent(itemId, forKey: .itemId)



try? container.encodeIfPresent(size, forKey: .size)



try? container.encodeIfPresent(storeId, forKey: .storeId)



try? container.encodeIfPresent(success, forKey: .success)



try? container.encodeIfPresent(message, forKey: .message)


}

}
}
Loading

0 comments on commit 83bde8c

Please sign in to comment.