Skip to content

Commit

Permalink
[Auto Generated] 1.3.6-beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Nov 1, 2023
1 parent 398e0d2 commit a7b63ef
Show file tree
Hide file tree
Showing 34 changed files with 3,880 additions and 81 deletions.
318 changes: 316 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

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.3.5-beta.4'
s.version = '1.3.6-beta.1'
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.3.5-beta.4"))
headers.append((key: "x-fp-sdk-version", value: "1.3.6-beta.1"))
headers.append(contentsOf: extraHeaders)
headers.append(contentsOf: config.extraHeaders)
if let userAgent = config.userAgent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public extension ApplicationClient.Cart {

public var isSet: Bool?

public var pricePerUnit: ProductPriceInfo?
public var pricePerUnit: ProductPricePerUnitInfo?

public var promotionsApplied: [AppliedPromotion]?

Expand Down Expand Up @@ -93,7 +93,7 @@ public extension ApplicationClient.Cart {

}

public init(article: ProductArticle? = nil, availability: ProductAvailability? = nil, bulkOffer: [String: Any]? = nil, coupon: CouponDetails? = nil, couponMessage: String? = nil, customOrder: [String: Any]? = nil, deliveryPromise: ShipmentPromise? = nil, discount: String? = nil, identifiers: CartProductIdentifer, isSet: Bool? = nil, key: String? = nil, message: String? = nil, moq: [String: Any]? = nil, parentItemIdentifiers: [String: Any]? = nil, price: ProductPriceInfo? = nil, pricePerUnit: ProductPriceInfo? = nil, product: CartProduct? = nil, promotionsApplied: [AppliedPromotion]? = nil, promoMeta: PromoMeta? = nil, quantity: Int? = nil) {
public init(article: ProductArticle? = nil, availability: ProductAvailability? = nil, bulkOffer: [String: Any]? = nil, coupon: CouponDetails? = nil, couponMessage: String? = nil, customOrder: [String: Any]? = nil, deliveryPromise: ShipmentPromise? = nil, discount: String? = nil, identifiers: CartProductIdentifer, isSet: Bool? = nil, key: String? = nil, message: String? = nil, moq: [String: Any]? = nil, parentItemIdentifiers: [String: Any]? = nil, price: ProductPriceInfo? = nil, pricePerUnit: ProductPricePerUnitInfo? = nil, product: CartProduct? = nil, promotionsApplied: [AppliedPromotion]? = nil, promoMeta: PromoMeta? = nil, quantity: Int? = nil) {

self.article = article

Expand Down Expand Up @@ -351,7 +351,7 @@ public extension ApplicationClient.Cart {


do {
pricePerUnit = try container.decode(ProductPriceInfo.self, forKey: .pricePerUnit)
pricePerUnit = try container.decode(ProductPricePerUnitInfo.self, forKey: .pricePerUnit)

} catch DecodingError.typeMismatch(let type, let context) {
print("Type '\(type)' mismatch:", context.debugDescription)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@


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

public var currencySymbol: String?

public var sellingPrice: Double?

public var currencyCode: String?

public var addOn: Double?

public var effective: Double?

public var marked: Double?


public enum CodingKeys: String, CodingKey {

case currencySymbol = "currency_symbol"

case sellingPrice = "selling_price"

case currencyCode = "currency_code"

case addOn = "add_on"

case effective = "effective"

case marked = "marked"

}

public init(addOn: Double? = nil, currencyCode: String? = nil, currencySymbol: String? = nil, effective: Double? = nil, marked: Double? = nil, sellingPrice: Double? = nil) {

self.currencySymbol = currencySymbol

self.sellingPrice = sellingPrice

self.currencyCode = currencyCode

self.addOn = addOn

self.effective = effective

self.marked = marked

}

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


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

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

}



do {
sellingPrice = try container.decode(Double.self, forKey: .sellingPrice)

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

}



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

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

}



do {
addOn = try container.decode(Double.self, forKey: .addOn)

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

}



do {
effective = try container.decode(Double.self, forKey: .effective)

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

}



do {
marked = try container.decode(Double.self, forKey: .marked)

} 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(currencySymbol, forKey: .currencySymbol)




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




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




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




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




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


}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@


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

public var base: ProductPricePerUnit?

public var converted: ProductPricePerUnit?


public enum CodingKeys: String, CodingKey {

case base = "base"

case converted = "converted"

}

public init(base: ProductPricePerUnit? = nil, converted: ProductPricePerUnit? = nil) {

self.base = base

self.converted = converted

}

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


do {
base = try container.decode(ProductPricePerUnit.self, forKey: .base)

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

}



do {
converted = try container.decode(ProductPricePerUnit.self, forKey: .converted)

} 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(base, forKey: .base)




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


}

}
}
7 changes: 7 additions & 0 deletions Sources/code/platform/Client/CatalogPlatformClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ extension PlatformClient {













Expand Down
Loading

0 comments on commit a7b63ef

Please sign in to comment.