mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
* Rename existing WebProducts to WebOfferingProducts * fix lint * fix wrong file reference
64 lines
1.4 KiB
Swift
64 lines
1.4 KiB
Swift
//
|
|
// Copyright RevenueCat Inc. All Rights Reserved.
|
|
//
|
|
// Licensed under the MIT License (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://opensource.org/licenses/MIT
|
|
//
|
|
// WebBillingHTTPRequestPath.swift
|
|
//
|
|
// Created by Toni Rico on 5/6/25.
|
|
|
|
import Foundation
|
|
|
|
extension HTTPRequest.WebBillingPath: HTTPRequestPath {
|
|
|
|
// swiftlint:disable:next force_unwrapping
|
|
static let serverHostURL = URL(string: "https://api.revenuecat.com")!
|
|
|
|
var authenticated: Bool {
|
|
switch self {
|
|
case .getWebOfferingProducts:
|
|
return true
|
|
}
|
|
}
|
|
|
|
var shouldSendEtag: Bool {
|
|
switch self {
|
|
case .getWebOfferingProducts:
|
|
return true
|
|
}
|
|
}
|
|
|
|
var supportsSignatureVerification: Bool {
|
|
switch self {
|
|
case .getWebOfferingProducts:
|
|
return false
|
|
}
|
|
}
|
|
|
|
var needsNonceForSigning: Bool {
|
|
switch self {
|
|
case .getWebOfferingProducts:
|
|
return false
|
|
}
|
|
}
|
|
|
|
var relativePath: String {
|
|
switch self {
|
|
case let .getWebOfferingProducts(appUserID):
|
|
return "/rcbilling/v1/subscribers/\(appUserID.trimmedAndEscaped)/offering_products"
|
|
}
|
|
}
|
|
|
|
var name: String {
|
|
switch self {
|
|
case .getWebOfferingProducts:
|
|
return "get_web_products"
|
|
}
|
|
}
|
|
|
|
}
|