Skip to content

Commit 4938a53

Browse files
committed
chore(Push): Rename models
1 parent 60912b4 commit 4938a53

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

CorePush/Apple/ApnSender.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public ApnSender(ApnSettings settings, HttpClient http, IJsonSerializer serializ
6666
/// to receive too many requests and may occasionally respond with HTTP 429. Just try/catch this call and retry as needed.
6767
/// </summary>
6868
/// <exception cref="HttpRequestException">Throws exception when not successful</exception>
69-
public async Task<CodePushResponse> SendAsync(
69+
public async Task<PushResult> SendAsync(
7070
object notification,
7171
string deviceToken,
7272
string apnsId = null,
@@ -103,7 +103,7 @@ public async Task<CodePushResponse> SendAsync(
103103
? null
104104
: serializer.Deserialize<ApnsError>(content).Reason;
105105

106-
return new CodePushResponse((int)response.StatusCode, response.IsSuccessStatusCode, content, error);
106+
return new PushResult((int)response.StatusCode, response.IsSuccessStatusCode, content, error);
107107
}
108108

109109
private string GetJwtToken()

CorePush/Firebase/FirebaseSender.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public FirebaseSender(FirebaseSettings settings, HttpClient http, IJsonSerialize
8787
/// <param name="payload">Notification payload that will be serialized using Newtonsoft.Json package</param>
8888
/// <param name="cancellationToken">Cancellation token</param>
8989
/// <exception cref="HttpRequestException">Throws exception when not successful</exception>
90-
public async Task<CodePushResponse> SendAsync(object payload, CancellationToken cancellationToken = default)
90+
public async Task<PushResult> SendAsync(object payload, CancellationToken cancellationToken = default)
9191
{
9292
var json = serializer.Serialize(payload);
9393

@@ -105,7 +105,7 @@ public async Task<CodePushResponse> SendAsync(object payload, CancellationToken
105105

106106
var firebaseResponse = serializer.Deserialize<FirebaseResponse>(responseString);
107107

108-
return new CodePushResponse((int) response.StatusCode,
108+
return new PushResult((int) response.StatusCode,
109109
response.IsSuccessStatusCode,
110110
firebaseResponse.Name ?? firebaseResponse.Error?.Message,
111111
responseString);

CorePush/Interfaces/IApnSender.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace CorePush.Interfaces;
88

99
public interface IApnSender
1010
{
11-
Task<CodePushResponse> SendAsync(
11+
Task<PushResult> SendAsync(
1212
object notification,
1313
string deviceToken,
1414
string apnsId = null,

CorePush/Interfaces/IFirebaseSender.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ namespace CorePush.Interfaces;
88

99
public interface IFirebaseSender
1010
{
11-
Task<CodePushResponse> SendAsync(object payload, CancellationToken cancellationToken = default);
11+
Task<PushResult> SendAsync(object payload, CancellationToken cancellationToken = default);
1212
}

CorePush/Models/CodePushResponse.cs renamed to CorePush/Models/PushResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace CorePush.Models;
22

3-
public record CodePushResponse(
3+
public record PushResult(
44
int StatusCode,
55
bool IsSuccessStatusCode,
66
string Message,

0 commit comments

Comments
 (0)