LogoURLProvider
public final class LogoURLProvider
Struct with helper functions to build logo URL’s.
-
Create new instance of LogoURLProvider.
Declaration
Swift
public init(environment: AnyAPIEnvironment)
Parameters
environment
The environment to reach out for logos.
-
Build the logo URL for a given Payment Method.
Declaration
Swift
public func logoURL(for paymentMethod: PaymentMethod, size: Size = .small) -> URL
Parameters
paymentMethod
The payment method that needs the logo.
Return Value
The URL for the payment method logo.
-
Build the logo URL for a specific issuer from an issuer list payment method.
Declaration
Swift
public func logoURL(for issuer: IssuerListPaymentMethod.Issuer, paymentMethod: IssuerListPaymentMethod) -> URL
Parameters
issuer
The issuer that needs the logo.
paymentMethod
The issuer payment method.
Return Value
The URL for the issuer logo.
-
Build the logo URL for a specific named resource.
Declaration
Swift
public func logoURL(withName name: String, size: Size = .small) -> URL
Parameters
name
The name of the resource.
Return Value
The URL for the named resource logo.
-
Build the logo URL for a given Payment Method.
Declaration
Swift
public static func logoURL(for paymentMethod: PaymentMethod, environment: AnyAPIEnvironment, size: Size = .small) -> URL
Parameters
paymentMethod
The payment method that needs the logo.
environment
The environment to be used.
Return Value
The URL for the payment method logo.
-
Build the logo URL for a specific issuer from an issuer list payment method.
Declaration
Swift
public static func logoURL(for issuer: IssuerListPaymentMethod.Issuer, paymentMethod: IssuerListPaymentMethod, environment: AnyAPIEnvironment) -> URL
Parameters
issuer
The issuer that needs the logo.
paymentMethod
The issuer payment method.
environment
The environment to be used.
Return Value
The URL for the issuer logo.
-
Build the logo URL for a specific named resource.
Declaration
Swift
public static func logoURL(withName name: String, environment: AnyAPIEnvironment, size: Size = .small) -> URL
Parameters
name
The name of the resource.
environment
The environment to be used.
Return Value
The URL for the named resource logo.
-
Indicates the image size
See moreDeclaration
Swift
public enum Size : String