Skip to content

Parameter internals are not public #5

@petetnt

Description

@petetnt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions