Skip to content

Commit

Permalink
Refactor CardManagementPageCard to use IyzipayResourceV2
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikkamat committed Sep 17, 2024
1 parent 334da15 commit cc13ec0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Iyzipay/Model/CardManagementPageCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@

namespace Iyzipay.Model
{
public class CardManagementPageCard : IyzipayResource
public class CardManagementPageCard : IyzipayResourceV2
{
private string ExternalId { get; set; }
private string CardUserKey { get; set; }
private List<Card> CardDetails { get; set; }

public static CardManagementPageCard Retrieve(RetrieveCardManagementPageCardRequest request, Options options)
{
return RestHttpClient.Create().Get<CardManagementPageCard>(PrepareRetrieveCardManagementPageCardRequest(request,options),GetHttpHeaders(request,options));
}

private static string PrepareRetrieveCardManagementPageCardRequest(RetrieveCardManagementPageCardRequest request, Options options)
{
return $"{options.BaseUrl}/v1/card-management/pages/{request.PageToken}/cards?locale={request.Locale}&conversationId={request.ConversationId}";
string uri = $"{options.BaseUrl}/v1/card-management/pages/{request.PageToken}/cards?locale={request.Locale}&conversationId={request.ConversationId}";
return RestHttpClient.Create().Get<CardManagementPageCard>(uri, GetHttpHeadersWithUrlParams(request, uri, options));

Check failure on line 15 in Iyzipay/Model/CardManagementPageCard.cs

View workflow job for this annotation

GitHub Actions / test

Argument 1: cannot convert from 'Iyzipay.Request.RetrieveCardManagementPageCardRequest' to 'Iyzipay.BaseRequestV2'

Check failure on line 15 in Iyzipay/Model/CardManagementPageCard.cs

View workflow job for this annotation

GitHub Actions / test

Argument 1: cannot convert from 'Iyzipay.Request.RetrieveCardManagementPageCardRequest' to 'Iyzipay.BaseRequestV2'

Check failure on line 15 in Iyzipay/Model/CardManagementPageCard.cs

View workflow job for this annotation

GitHub Actions / test

Argument 1: cannot convert from 'Iyzipay.Request.RetrieveCardManagementPageCardRequest' to 'Iyzipay.BaseRequestV2'

Check failure on line 15 in Iyzipay/Model/CardManagementPageCard.cs

View workflow job for this annotation

GitHub Actions / test

Argument 1: cannot convert from 'Iyzipay.Request.RetrieveCardManagementPageCardRequest' to 'Iyzipay.BaseRequestV2'
}
}
}

0 comments on commit cc13ec0

Please sign in to comment.