Is your feature request related to a problem? Please describe.
When using the paytrail-ios-sdk API I noticed that the Parameter internals are not public:
|
public struct Parameter: Codable, Hashable { |
|
|
|
/// Name of the parameter |
|
let name : String? |
|
|
|
/// Value of the parameter |
|
let value : String? |
|
|
|
enum CodingKeys: String, CodingKey { |
|
case name = "name" |
|
case value = "value" |
|
} |
|
|
|
public init(from decoder: Decoder) throws { |
|
let values = try decoder.container(keyedBy: CodingKeys.self) |
|
name = try values.decodeIfPresent(String.self, forKey: .name) |
|
value = try values.decodeIfPresent(String.self, forKey: .value) |
|
} |
|
} |
In my usecase I needed to access them and had to work around it with some dirty JSON-action
data.providers!.map {
let parameters = try? JSONSerialization.jsonObject(with: try! JSONEncoder().encode($0.parameters))
}
I guess they are marked internal to prevent modifying them but it would still be nice to access them somehow when needed.
Describe the solution you'd like
Marking them public
Describe alternatives you've considered
Alternatively some other way of accessing them would be fine too.
Is your feature request related to a problem? Please describe.
When using the
paytrail-ios-sdkAPI I noticed that the Parameter internals are not public:paytrail-ios-sdk/paytrail-ios-sdk/Networking/Models/CreatePayment/Parameter.swift
Lines 15 to 33 in 62ef773
In my usecase I needed to access them and had to work around it with some dirty JSON-action
I guess they are marked internal to prevent modifying them but it would still be nice to access them somehow when needed.
Describe the solution you'd like
Marking them
publicDescribe alternatives you've considered
Alternatively some other way of accessing them would be fine too.