-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Constants following PascalCase convention #71
base: develop
Are you sure you want to change the base?
Changes from 7 commits
d50b8b8
46214e0
8fd7136
3fbb0e1
9b16490
17d446c
f405de3
4a90c80
c43eb8c
d53ea29
d453229
2da16bf
d66b682
2279dc8
5f8e799
c153018
1aa819d
9962a6d
f10e0d3
50a81c3
4240c77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,7 @@ local.properties | |
x64/ | ||
build/ | ||
[Oo]bj/ | ||
/.vs | ||
|
||
# MSTest test Results | ||
[Tt]est[Rr]esult*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,44 +12,44 @@ public class PaymentListSample : ISample | |
/// <summary> | ||
/// Message constants. | ||
/// </summary> | ||
private const string MESSAGE_LATEST_PAGE_IDS = "Latest page IDs: "; | ||
private const string MESSAGE_SECOND_LATEST_PAGE_IDS = "Second latest page IDs: "; | ||
private const string MESSAGE_NO_PRIOR_PAYMENTS_FOUND = "No prior payments found!"; | ||
private const string MessageLatestPageIds = "Latest page IDs: "; | ||
private const string MessageSecondLatestPageIds = "Second latest page IDs: "; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plural -> MessageSecondLatestPageAllPaymentId |
||
private const string MessageNoPriorPaymentsFound = "No prior payments found!"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Plural -> |
||
|
||
/// <summary> | ||
/// Size of each page of payment listing. | ||
/// </summary> | ||
private const int PAGE_SIZE = 3; | ||
private const int PageSize = 3; | ||
|
||
/// <summary> | ||
/// Constants to be changed to run the example. | ||
/// </summary> | ||
private const int USER_ITEM_ID = 0; // Put your user ID here | ||
private const int MONETARY_ACCOUNT_ITEM_ID = 0; // Put your monetary account ID here | ||
private const int UserItemId = 0; // Put your user ID here | ||
private const int MonetaryAccountItemId = 0; // Put your monetary account ID here | ||
|
||
public void Run() | ||
{ | ||
var apiContext = ApiContext.Restore(); | ||
var paginationCountOnly = new Pagination | ||
{ | ||
Count = PAGE_SIZE, | ||
Count = PageSize, | ||
}; | ||
Console.WriteLine(MESSAGE_LATEST_PAGE_IDS); | ||
var paymentResponse = Payment.List(apiContext, USER_ITEM_ID, MONETARY_ACCOUNT_ITEM_ID, | ||
Console.WriteLine(MessageLatestPageIds); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MessageLatestPageAllPaymentId |
||
var paymentResponse = Payment.List(apiContext, UserItemId, MonetaryAccountItemId, | ||
paginationCountOnly.UrlParamsCountOnly); | ||
PrintPayments(paymentResponse.Value); | ||
var pagination = paymentResponse.Pagination; | ||
|
||
if (pagination.HasPreviousPage()) | ||
{ | ||
Console.WriteLine(MESSAGE_SECOND_LATEST_PAGE_IDS); | ||
var previousPaymentResponse = Payment.List(apiContext, USER_ITEM_ID, MONETARY_ACCOUNT_ITEM_ID, | ||
Console.WriteLine(MessageSecondLatestPageIds); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename (check for other occurrences too of renamed constants) |
||
var previousPaymentResponse = Payment.List(apiContext, UserItemId, MonetaryAccountItemId, | ||
pagination.UrlParamsPreviousPage); | ||
PrintPayments(previousPaymentResponse.Value); | ||
} | ||
else | ||
{ | ||
Console.WriteLine(MESSAGE_NO_PRIOR_PAYMENTS_FOUND); | ||
Console.WriteLine(MessageNoPriorPaymentsFound); | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plural -> MessageLatestPageAllPaymentId