Skip to content

Commit 9f51d47

Browse files
committed
Format
1 parent 4c76aab commit 9f51d47

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

src/AppStoreServerApiClient.cs

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,7 @@ public Task<SubscriptionStatusResponse> GetAllSubscriptionStatuses(string transa
7676
/// Get a customer’s in-app purchase transaction history for your app.
7777
/// </summary>
7878
/// <returns>A list of transactions associated with the provided Transaction Id</returns>
79-
public Task<TransactionHistoryResponse?> GetTransactionHistory(
80-
string transactionId,
81-
string revisionToken = ""
82-
)
79+
public Task<TransactionHistoryResponse?> GetTransactionHistory(string transactionId, string revisionToken = "")
8380
{
8481
//Call to https://developer.apple.com/documentation/appstoreserverapi/get_transaction_history
8582
Dictionary<string, string> queryParameters = new();
@@ -106,21 +103,10 @@ public Task SendConsumptionData(string transactionId, ConsumptionRequest consump
106103
{
107104
string path = $"v1/transactions/consumption/{transactionId}";
108105

109-
return this.MakeRequest<object?>(
110-
path,
111-
HttpMethod.Put,
112-
null,
113-
consumptionRequest,
114-
fetchResponse: false
115-
);
106+
return this.MakeRequest<object?>(path, HttpMethod.Put, null, consumptionRequest, fetchResponse: false);
116107
}
117108

118-
private static string CreateBearerToken(
119-
string keyId,
120-
string issuerId,
121-
string signingKey,
122-
string bundleId
123-
)
109+
private static string CreateBearerToken(string keyId, string issuerId, string signingKey, string bundleId)
124110
{
125111
var prvKey = ECDsa.Create();
126112
prvKey.ImportFromPem(signingKey);
@@ -171,10 +157,7 @@ string bundleId
171157
builder.Query = query.ToString();
172158
}
173159

174-
var jsonOptions = new JsonSerializerOptions
175-
{
176-
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
177-
};
160+
var jsonOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
178161

179162
try
180163
{
@@ -217,9 +200,7 @@ string bundleId
217200

218201
if (httpResponse.IsSuccessStatusCode)
219202
{
220-
return fetchResponse
221-
? JsonSerializer.Deserialize<TReturn>(responseContent, jsonOptions)
222-
: null;
203+
return fetchResponse ? JsonSerializer.Deserialize<TReturn>(responseContent, jsonOptions) : null;
223204
}
224205

225206
var error = JsonSerializer.Deserialize<ErrorResponse>(responseContent, jsonOptions);

0 commit comments

Comments
 (0)