London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Interface IApiService

Account api service

Namespace: EPiServer.Commerce.Bolt
Assembly: EPiServer.Commerce.Bolt.dll
Version: 14.26.0
Syntax
public interface IApiService

Methods

AddAddressAsync(Address, String)

Adds and address to an account in Bolt

Declaration
Task<Address> AddAddressAsync(Address address, string token)
Parameters
Type Name Description
Address address
System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<Address>

A System.Threading.Tasks.Task<>

AddPaymentMethodAsync(CreatePaymentMethod, String)

Adds a payment methods to Bolt

Declaration
Task<PaymentMethod> AddPaymentMethodAsync(CreatePaymentMethod paymentMethod, string token)
Parameters
Type Name Description
CreatePaymentMethod paymentMethod

The payment method

System.String token

The token.

Returns
Type Description
System.Threading.Tasks.Task<PaymentMethod>

A System.Threading.Tasks.Task<>

AuthorizeAsync(Authorize, String)

Authorize a tokenized card

Declaration
Task<AuthorizeResponse> AuthorizeAsync(Authorize authorize, string token)
Parameters
Type Name Description
Authorize authorize

The authorize request

System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<AuthorizeResponse>

A System.Threading.Tasks.Task<>

CaptureAsync(Capture)

Captures an authorized trasnaction

Declaration
Task<Transaction> CaptureAsync(Capture capture)
Parameters
Type Name Description
Capture capture

The capture request

Returns
Type Description
System.Threading.Tasks.Task<Transaction>

A System.Threading.Tasks.Task<>

CreateAccountAsync(CreateAccount)

Creates and account in Bolt

Declaration
Task<Account> CreateAccountAsync(CreateAccount account)
Parameters
Type Name Description
CreateAccount account

The account object

Returns
Type Description
System.Threading.Tasks.Task<Account>

A System.Threading.Tasks.Task<>

DeleteAddressAsync(String, String)

Deletete and address in bolt

Declaration
Task<string> DeleteAddressAsync(string id, string token)
Parameters
Type Name Description
System.String id
System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<System.String>

A System.Threading.Tasks.Task

DeletePaymentMethodAsync(String, String)

Delete the payment method from Bolt

Declaration
Task<string> DeletePaymentMethodAsync(string id, string token)
Parameters
Type Name Description
System.String id
System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<System.String>

A System.Threading.Tasks.Task

DetectAccountAsync(String)

Detects an account by email

Declaration
Task<Account> DetectAccountAsync(string email)
Parameters
Type Name Description
System.String email

The email

Returns
Type Description
System.Threading.Tasks.Task<Account>

A System.Threading.Tasks.Task<>

EditAddressAsync(Address, String)

Edits and address in Bolt

Declaration
Task<Address> EditAddressAsync(Address address, string token)
Parameters
Type Name Description
Address address
System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<Address>

A System.Threading.Tasks.Task<>.

GetAccountAsync(String)

Get account from bolt

Declaration
Task<Account> GetAccountAsync(string token)
Parameters
Type Name Description
System.String token

The access token

Returns
Type Description
System.Threading.Tasks.Task<Account>

A System.Threading.Tasks.Task<>

GetTokenAsync(String, String)

Gets a tokem for using with the api service.

Declaration
Task<Token> GetTokenAsync(string code, string scope)
Parameters
Type Name Description
System.String code

The code

System.String scope

The scope

Returns
Type Description
System.Threading.Tasks.Task<Token>

A System.Threading.Tasks.Task<>

RefundAsync(Refund)

Refunds a transaction

Declaration
Task<Transaction> RefundAsync(Refund refund)
Parameters
Type Name Description
Refund refund

The refund request

Returns
Type Description
System.Threading.Tasks.Task<Transaction>

A System.Threading.Tasks.Task<>

SavedCardAuthorizeAsync(AuthorizeSavedCard, String)

Authorize a tokenized card

Declaration
Task<AuthorizeResponse> SavedCardAuthorizeAsync(AuthorizeSavedCard authorize, string token)
Parameters
Type Name Description
AuthorizeSavedCard authorize

The authorize saved card request

System.String token

The token

Returns
Type Description
System.Threading.Tasks.Task<AuthorizeResponse>

A System.Threading.Tasks.Task<>

VoidAsync(Void)

Voids a transaction

Declaration
Task<Transaction> VoidAsync(Void voidRequest)
Parameters
Type Name Description
Void voidRequest

The void request

Returns
Type Description
System.Threading.Tasks.Task<Transaction>

A System.Threading.Tasks.Task<>