Push-Definitions/Sources/PushAPI/DeviceUpdate.swift

25 lines
638 B
Swift
Raw Normal View History

2022-06-05 11:47:58 +02:00
import Foundation
/**
An object to update the push token of a device.
*/
2022-06-05 12:10:38 +02:00
public struct PushTokenUpdate: Codable {
2022-06-05 11:47:58 +02:00
/// The authentication of the requesting device.
2022-06-05 12:13:47 +02:00
public let device: DeviceAuthentication
2022-06-05 11:47:58 +02:00
/// The new push token to register
2022-06-05 12:13:47 +02:00
public let newToken: PushToken
2022-06-05 18:25:39 +02:00
/**
Create a device authentication object.
- Parameter device: The authentication of the device requesting the change.
- Parameter PushToken: The new APNs token to use from now on
*/
public init(device: DeviceAuthentication, newToken: PushToken) {
self.device = device
self.newToken = newToken
}
2022-06-05 11:47:58 +02:00
}