Skip to content

Commit

Permalink
[Auto Generated] 1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jigardafda committed Dec 3, 2024
1 parent 4100b8e commit 38c99ab
Show file tree
Hide file tree
Showing 16 changed files with 1,344 additions and 6 deletions.
511 changes: 511 additions & 0 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.5.1'
s.version = '1.5.2'
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.1"))
headers.append((key: "x-fp-sdk-version", value: "1.5.2"))
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 @@ -56,6 +56,8 @@ public extension PlatformClient.Payment {

public var status: String

public var reason: ReasonDetail?


public enum CodingKeys: String, CodingKey {

Expand Down Expand Up @@ -103,9 +105,11 @@ public extension PlatformClient.Payment {

case status = "status"

case reason = "reason"

}

public init(aggregatorCustomerId: String? = nil, aggregatorOrderId: String, amount: Int, amountCaptured: Int, amountRefunded: Int? = nil, billingAddress: AddressDetail? = nil, cancelUrl: String, captured: Bool? = nil, created: String? = nil, currency: String, gid: String, gUserId: String, kind: String? = nil, locale: String? = nil, merchantLocale: String? = nil, meta: [String: Any]? = nil, mode: String, paymentId: String, paymentMethods: [[String: Any]], shippingAddress: AddressDetail? = nil, status: String, successUrl: String) {
public init(aggregatorCustomerId: String? = nil, aggregatorOrderId: String, amount: Int, amountCaptured: Int, amountRefunded: Int? = nil, billingAddress: AddressDetail? = nil, cancelUrl: String, captured: Bool? = nil, created: String? = nil, currency: String, gid: String, gUserId: String, kind: String? = nil, locale: String? = nil, merchantLocale: String? = nil, meta: [String: Any]? = nil, mode: String, paymentId: String, paymentMethods: [[String: Any]], reason: ReasonDetail? = nil, shippingAddress: AddressDetail? = nil, status: String, successUrl: String) {

self.paymentId = paymentId

Expand Down Expand Up @@ -151,6 +155,8 @@ public extension PlatformClient.Payment {

self.status = status

self.reason = reason

}

required public init(from decoder: Decoder) throws {
Expand Down Expand Up @@ -336,6 +342,18 @@ public extension PlatformClient.Payment {




do {
reason = try container.decode(ReasonDetail.self, forKey: .reason)

} 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 Down Expand Up @@ -451,6 +469,11 @@ public extension PlatformClient.Payment {
try? container.encodeIfPresent(status, forKey: .status)




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


}

}
Expand Down Expand Up @@ -511,6 +534,8 @@ public extension PlatformClient.ApplicationClient.Payment {

public var status: String

public var reason: ReasonDetail?


public enum CodingKeys: String, CodingKey {

Expand Down Expand Up @@ -558,9 +583,11 @@ public extension PlatformClient.ApplicationClient.Payment {

case status = "status"

case reason = "reason"

}

public init(aggregatorCustomerId: String? = nil, aggregatorOrderId: String, amount: Int, amountCaptured: Int, amountRefunded: Int? = nil, billingAddress: AddressDetail? = nil, cancelUrl: String, captured: Bool? = nil, created: String? = nil, currency: String, gid: String, gUserId: String, kind: String? = nil, locale: String? = nil, merchantLocale: String? = nil, meta: [String: Any]? = nil, mode: String, paymentId: String, paymentMethods: [[String: Any]], shippingAddress: AddressDetail? = nil, status: String, successUrl: String) {
public init(aggregatorCustomerId: String? = nil, aggregatorOrderId: String, amount: Int, amountCaptured: Int, amountRefunded: Int? = nil, billingAddress: AddressDetail? = nil, cancelUrl: String, captured: Bool? = nil, created: String? = nil, currency: String, gid: String, gUserId: String, kind: String? = nil, locale: String? = nil, merchantLocale: String? = nil, meta: [String: Any]? = nil, mode: String, paymentId: String, paymentMethods: [[String: Any]], reason: ReasonDetail? = nil, shippingAddress: AddressDetail? = nil, status: String, successUrl: String) {

self.paymentId = paymentId

Expand Down Expand Up @@ -606,6 +633,8 @@ public extension PlatformClient.ApplicationClient.Payment {

self.status = status

self.reason = reason

}

required public init(from decoder: Decoder) throws {
Expand Down Expand Up @@ -791,6 +820,18 @@ public extension PlatformClient.ApplicationClient.Payment {




do {
reason = try container.decode(ReasonDetail.self, forKey: .reason)

} 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 Down Expand Up @@ -906,6 +947,11 @@ public extension PlatformClient.ApplicationClient.Payment {
try? container.encodeIfPresent(status, forKey: .status)




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


}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@


import Foundation


public extension PlatformClient.Payment {
/*
Model: ReasonDetail
Used By: Payment
*/

class ReasonDetail: Codable {


public var code: String?

public var description: String?


public enum CodingKeys: String, CodingKey {

case code = "code"

case description = "description"

}

public init(code: String? = nil, description: String? = nil) {

self.code = code

self.description = description

}

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


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

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

}



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

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




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


}

}
}



public extension PlatformClient.ApplicationClient.Payment {
/*
Model: ReasonDetail
Used By: Payment
*/

class ReasonDetail: Codable {


public var code: String?

public var description: String?


public enum CodingKeys: String, CodingKey {

case code = "code"

case description = "description"

}

public init(code: String? = nil, description: String? = nil) {

self.code = code

self.description = description

}

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


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

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

}



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

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




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


}

}
}


2 changes: 1 addition & 1 deletion Sources/code/platform/PlatformAPIClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class PlatformAPIClient {
if let token = token {
var finalHeaders = [(key: String, value: String)]()
finalHeaders.append((key: "Authorization", value: "Bearer " + token.accessToken))
finalHeaders.append((key: "x-fp-sdk-version", value: "1.5.1"))
finalHeaders.append((key: "x-fp-sdk-version", value: "1.5.2"))
finalHeaders.append(contentsOf: config.extraHeaders)
if let userAgent = config.userAgent {
finalHeaders.append((key: "User-Agent", value: userAgent))
Expand Down
Loading

0 comments on commit 38c99ab

Please sign in to comment.