C# 클래스 Mondo.MondoClient

An authenticated Mondo API client.
상속: IMondoClient
파일 보기 프로젝트 열기: rdingwall/mondo.net 1 사용 예제들

공개 메소드들

메소드 설명
AnnotateTransactionAsync ( string transactionId, string>.IDictionary metadata, CancellationToken cancellationToken = default(CancellationToken) ) : Task

You may store your own key-value annotations against a transaction in its metadata.

Metadata is private to your application.

CreateAttachmentAsync ( string externalId, string fileUrl, string fileType, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Mondo app.

CreateFeedItemAsync ( string accountId, string type, string>.IDictionary @params, string url = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Creates a new feed item on the user’s feed.

CreateWebhookAsync ( string accountId, string url, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Each time a matching event occurs, we will make a POST call to the URL you provide. If the call fails, we will retry up to a maximum of 5 attempts, with exponential backoff.

DeleteAttachmentAsync ( string id, CancellationToken cancellationToken = default(CancellationToken) ) : Task

To remove an attachment, simply deregister this using its id

DeleteWebhookAsync ( string webhookId, CancellationToken cancellationToken = default(CancellationToken) ) : Task

When you delete a web hook, we will no longer send notifications to it.

Dispose ( ) : void

Disposes the underlying HttpClient.

GetAccountsAsync ( ) : Task>

Returns a list of accounts owned by the currently authorised user.

GetBalanceAsync ( string accountId ) : Task

Returns balance information for a specific account.

GetTransactionAsync ( string transactionId, string expand = null ) : Task

Returns an individual transaction, fetched by its id.

GetTransactionsAsync ( string accountId, string expand = null, PaginationOptions paginationOptions = null ) : Task>

Returns a list of transactions on the user’s account.

GetWebhooksAsync ( string accountId ) : Task>

List the web hooks registered on an account.

MondoClient ( string accessToken, string baseUri = "https://api.getmondo.co.uk" ) : System

Initializes a new instance of the MondoClient class.

UploadAttachmentAsync ( string filename, string fileType, string externalId, Stream stream, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Uploads an attachment from a file stream.

비공개 메소드들

메소드 설명
MondoClient ( HttpClient httpClient, string accessToken ) : System

메소드 상세

AnnotateTransactionAsync() 공개 메소드

You may store your own key-value annotations against a transaction in its metadata.
Metadata is private to your application.
public AnnotateTransactionAsync ( string transactionId, string>.IDictionary metadata, CancellationToken cancellationToken = default(CancellationToken) ) : Task
transactionId string
metadata string>.IDictionary Include each key you would like to modify. To delete a key, set its value to an empty string.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

CreateAttachmentAsync() 공개 메소드

Once you have obtained a URL for an attachment, either by uploading to the upload_url obtained from the upload endpoint above or by hosting a remote image, this URL can then be registered against a transaction. Once an attachment is registered against a transaction this will be displayed on the detail page of a transaction within the Mondo app.
public CreateAttachmentAsync ( string externalId, string fileUrl, string fileType, CancellationToken cancellationToken = default(CancellationToken) ) : Task
externalId string The id of the transaction to associate the attachment with.
fileUrl string The URL of the uploaded attachment.
fileType string The content type of the attachment.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

CreateFeedItemAsync() 공개 메소드

Creates a new feed item on the user’s feed.
public CreateFeedItemAsync ( string accountId, string type, string>.IDictionary @params, string url = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
accountId string The account to create feed item for.
type string Type of feed item. Currently only basic is supported.
@params string>.IDictionary
url string A URL to open when the feed item is tapped. If no URL is provided, the app will display a fallback view based on the title & body.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

CreateWebhookAsync() 공개 메소드

Each time a matching event occurs, we will make a POST call to the URL you provide. If the call fails, we will retry up to a maximum of 5 attempts, with exponential backoff.
public CreateWebhookAsync ( string accountId, string url, CancellationToken cancellationToken = default(CancellationToken) ) : Task
accountId string The account to receive notifications for.
url string The URL we will send notifications to.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

DeleteAttachmentAsync() 공개 메소드

To remove an attachment, simply deregister this using its id
public DeleteAttachmentAsync ( string id, CancellationToken cancellationToken = default(CancellationToken) ) : Task
id string The id of the attachment to deregister.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

DeleteWebhookAsync() 공개 메소드

When you delete a web hook, we will no longer send notifications to it.
public DeleteWebhookAsync ( string webhookId, CancellationToken cancellationToken = default(CancellationToken) ) : Task
webhookId string The id of the webhook to delete.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task

Dispose() 공개 메소드

Disposes the underlying HttpClient.
public Dispose ( ) : void
리턴 void

GetAccountsAsync() 공개 메소드

Returns a list of accounts owned by the currently authorised user.
public GetAccountsAsync ( ) : Task>
리턴 Task>

GetBalanceAsync() 공개 메소드

Returns balance information for a specific account.
public GetBalanceAsync ( string accountId ) : Task
accountId string The id of the account.
리턴 Task

GetTransactionAsync() 공개 메소드

Returns an individual transaction, fetched by its id.
public GetTransactionAsync ( string transactionId, string expand = null ) : Task
transactionId string The transaction ID.
expand string Can be merchant.
리턴 Task

GetTransactionsAsync() 공개 메소드

Returns a list of transactions on the user’s account.
public GetTransactionsAsync ( string accountId, string expand = null, PaginationOptions paginationOptions = null ) : Task>
accountId string The account to retrieve transactions from.
expand string Can be merchant.
paginationOptions PaginationOptions This endpoint can be paginated.
리턴 Task>

GetWebhooksAsync() 공개 메소드

List the web hooks registered on an account.
public GetWebhooksAsync ( string accountId ) : Task>
accountId string The account to list registered web hooks for.
리턴 Task>

MondoClient() 공개 메소드

Initializes a new instance of the MondoClient class.
public MondoClient ( string accessToken, string baseUri = "https://api.getmondo.co.uk" ) : System
accessToken string Your access token.
baseUri string URL of the Mondo API to use, defaults to production.
리턴 System

UploadAttachmentAsync() 공개 메소드

Uploads an attachment from a file stream.
public UploadAttachmentAsync ( string filename, string fileType, string externalId, Stream stream, CancellationToken cancellationToken = default(CancellationToken) ) : Task
filename string The name of the file to be uploaded
fileType string The content type of the file
externalId string The id of the transaction to associate the attachment with.
stream Stream The file stream.
cancellationToken System.Threading.CancellationToken A cancellation token that can be used by other objects or threads to receive notice of cancellation.
리턴 Task