Documentation
¶
Index ¶
- type Address
- type CardImage
- type Client
- func (c *Client) CancelVirtualCard(id string) (*VirtualCardResponse, error)
- func (c *Client) Close()
- func (c *Client) CreateVirtualCard(request *CreateVirtualCardRequest) (*VirtualCardResponse, error)
- func (c *Client) ForgotPassword(email string) (*Response, error)
- func (c *Client) GetUserVirtualCards(request *VirtualCardPageableRequest) (*VirtualCardsResponse, error)
- func (c *Client) GetVirtualCard(id string) (*VirtualCardResponse, error)
- func (c *Client) GetVirtualCardTransactions(id string, count int, before, after, status string) (*TransactionsResponse, error)
- func (c *Client) RejectVirtualCard(id string) (*VirtualCardResponse, error)
- func (c *Client) UpdateVirtualCard(id string, request *UpdateVirtualCardRequest) (*VirtualCardResponse, error)
- type CreateVirtualCardRequest
- type DeclineReason
- type ForgotPasswordRequest
- type IssuerSanctions
- type LoginRequest
- type LoginSignUpResponse
- type LogoutRequest
- type MccRange
- type Pagination
- type Recurrence
- type ReferenceField
- type RefreshTokenLoginRequest
- type Response
- type Transaction
- type TransactionsResponse
- type UpdateVirtualCardRequest
- type User
- type VirtualCard
- type VirtualCardFeature
- type VirtualCardPageableRequest
- type VirtualCardResponse
- type VirtualCardRevision
- type VirtualCardsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Address1 string `json:"address1"`
Address2 string `json:"address2"`
City string `json:"city"`
Province string `json:"province"`
Postal string `json:"postal"`
Country string `json:"country"`
}
Address -> https://developer.paywithextend.com/#tocS_Address.
type CardImage ¶
type CardImage struct {
ID string `json:"id"`
ContentType string `json:"contentType"`
Urls map[string]string `json:"urls"`
TextColorRGBA string `json:"textColorRGBA"`
HasTextShadow bool `json:"hasTextShadow"`
ShadowTextColorRGBA string `json:"shadowTextColorRGBA"`
}
CardImage -> https://developer.paywithextend.com/#tocS_CardImage.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client makes RESTful calls to https://developer.paywithextend.com/#extend-api endpoints.
Authentication (token retrieval and renewal) is automatically managed by the Client via the given username and testPassword.
Close should be invoked upon exit to release Client resources.
func (*Client) CancelVirtualCard ¶
func (c *Client) CancelVirtualCard(id string) (*VirtualCardResponse, error)
CancelVirtualCard -> https://developer.paywithextend.com/#cancel-virtual-card.
func (*Client) CreateVirtualCard ¶
func (c *Client) CreateVirtualCard(request *CreateVirtualCardRequest) (*VirtualCardResponse, error)
CreateVirtualCard -> https://developer.paywithextend.com/#create-virtual-card.
func (*Client) ForgotPassword ¶
ForgotPassword -> https://developer.paywithextend.com/#forgot-password.
func (*Client) GetUserVirtualCards ¶
func (c *Client) GetUserVirtualCards(request *VirtualCardPageableRequest) (*VirtualCardsResponse, error)
GetUserVirtualCards -> https://developer.paywithextend.com/#get-user-virtual-cards.
func (*Client) GetVirtualCard ¶
func (c *Client) GetVirtualCard(id string) (*VirtualCardResponse, error)
GetVirtualCard -> https://developer.paywithextend.com/#get-virtual-card.
func (*Client) GetVirtualCardTransactions ¶
func (c *Client) GetVirtualCardTransactions(id string, count int, before, after, status string) (*TransactionsResponse, error)
GetVirtualCardTransactions -> https://developer.paywithextend.com/#get-virtual-card-transactions.
func (*Client) RejectVirtualCard ¶
func (c *Client) RejectVirtualCard(id string) (*VirtualCardResponse, error)
RejectVirtualCard -> https://developer.paywithextend.com/#reject-virtual-card.
func (*Client) UpdateVirtualCard ¶
func (c *Client) UpdateVirtualCard(id string, request *UpdateVirtualCardRequest) (*VirtualCardResponse, error)
UpdateVirtualCard -> https://developer.paywithextend.com/#update-virtual-card.
type CreateVirtualCardRequest ¶
type CreateVirtualCardRequest struct {
CreditCardID string `json:"creditCardId"`
Recipient string `json:"recipient"`
RecipientFirstName string `json:"recipientFirstName"`
RecipientLastName string `json:"recipientLastName"`
Cardholder string `json:"cardholder"`
DisplayName string `json:"displayName"`
ReferenceFields []ReferenceField `json:"referenceFields"`
Notes string `json:"notes"`
BalanceCents int `json:"balanceCents"`
Direct bool `json:"direct"`
Currency string `json:"currency"`
ValidFrom string `json:"validFrom"`
ValidTo string `json:"validTo"`
Recurs bool `json:"recurs"`
Recurrence Recurrence `json:"recurrence"`
ReceiptAttachmentIds []string `json:"receiptAttachmentIds"`
ValidMccRanges []MccRange `json:"validMccRanges"`
}
CreateVirtualCardRequest -> https://developer.paywithextend.com/#tocS_CreateVirtualCardRequest.
type DeclineReason ¶
DeclineReason -> https://developer.paywithextend.com/#tocS_DeclineReason.
type ForgotPasswordRequest ¶
type ForgotPasswordRequest struct {
Email string `json:"email"`
}
ForgotPasswordRequest -> https://developer.paywithextend.com/#tocS_ForgotPasswordRequest.
type IssuerSanctions ¶
IssuerSanctions -> https://developer.paywithextend.com/#tocS_IssuerSanctions.
type LoginRequest ¶
LoginRequest -> https://developer.paywithextend.com/#tocS_LoginRequest.
type LoginSignUpResponse ¶
type LoginSignUpResponse struct {
User User `json:"user"`
Token string `json:"token"`
RefreshToken string `json:"refreshToken"`
}
LoginSignUpResponse -> https://developer.paywithextend.com/#tocS_LoginSignUpResponse.
type LogoutRequest ¶
type LogoutRequest struct {
RefreshToken string `json:"refreshToken"`
}
LogoutRequest -> https://developer.paywithextend.com/#tocS_LogoutRequest.
type MccRange ¶
MccRange -> https://developer.paywithextend.com/#tocS_MccRange.
type Pagination ¶
type Pagination struct {
Page int `json:"page"`
PageItemCount int `json:"pageItemCount"`
TotalItems int `json:"totalItems"`
NumberOfPages int `json:"numberOfPages"`
}
Pagination -> https://developer.paywithextend.com/#tocS_PaginationView.
type Recurrence ¶
type Recurrence struct {
ID string `json:"id"`
BalanceCents int `json:"balanceCents"`
Period string `json:"period"`
Interval int `json:"interval"`
Terminator string `json:"terminator"`
Count int `json:"count"`
Until string `json:"until"`
ByWeekDay int `json:"byWeekDay"`
ByMonthDay int `json:"byMonthDay"`
ByYearDay int `json:"byYearDay"`
PrevRecurrenceAt string `json:"prevRecurrenceAt"`
NextRecurrenceAt string `json:"nextRecurrenceAt"`
CurrentCount int `json:"currentCount"`
RemainingCount int `json:"remainingCount"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
Recurrence -> https://developer.paywithextend.com/#tocS_Recurrence.
type ReferenceField ¶
type ReferenceField struct {
FieldLabel string `json:"fieldLabel"`
FieldCode string `json:"fieldCode"`
OptionLabel string `json:"optionLabel"`
OptionCode string `json:"optionCode"`
}
ReferenceField -> https://developer.paywithextend.com/#tocS_AppliedReferenceField.
type RefreshTokenLoginRequest ¶
type RefreshTokenLoginRequest struct {
RefreshToken string `json:"refreshToken"`
}
RefreshTokenLoginRequest -> https://developer.paywithextend.com/#tocS_RefreshTokenLoginRequest.
type Response ¶
type Response struct {
Msg string `json:"msg"`
}
Response -> https://developer.paywithextend.com/#tocS_SimpleResponse.
type Transaction ¶
type Transaction struct {
ID string `json:"id"`
CardholderID string `json:"cardholderId"`
CardholderName string `json:"cardholderName"`
CardholderEmail string `json:"cardholderEmail"`
RecipientName string `json:"recipientName"`
RecipientEmail string `json:"recipientEmail"`
RecipientID string `json:"recipientId"`
NameOnCard string `json:"nameOnCard"`
Source string `json:"source"`
VcnLast4 string `json:"vcnLast4"`
VcnDisplayName string `json:"vcnDisplayName"`
VirtualCardID string `json:"virtualCardId"`
Type string `json:"type"`
Status string `json:"status"`
DeclineReasons []DeclineReason `json:"declineReasons"`
ApprovalCode string `json:"approvalCode"`
AuthBillingAmountCents int `json:"authBillingAmountCents"`
AuthBillingCurrency string `json:"authBillingCurrency"`
AuthMerchantAmountCents int `json:"authMerchantAmountCents"`
AuthMerchantCurrency string `json:"authMerchantCurrency"`
AuthExchangeRate float64 `json:"authExchangeRate"`
ClearingBillingAmountCents int `json:"clearingBillingAmountCents"`
ClearingBillingCurrency string `json:"clearingBillingCurrency"`
ClearingMerchantAmountCents int `json:"clearingMerchantAmountCents"`
ClearingMerchantCurrency string `json:"clearingMerchantCurrency"`
ClearingExchangeRate float64 `json:"clearingExchangeRate"`
Mcc string `json:"mcc"`
MccGroup string `json:"mccGroup"`
MccDescription string `json:"mccDescription"`
MerchantID string `json:"merchantId"`
MerchantName string `json:"merchantName"`
MerchantAddress string `json:"merchantAddress"`
MerchantCity string `json:"merchantCity"`
MerchantState string `json:"merchantState"`
MerchantCountry string `json:"merchantCountry"`
MerchantZip string `json:"merchantZip"`
AuthedAt string `json:"authedAt"`
ClearedAt string `json:"clearedAt"`
UpdatedAt string `json:"updatedAt"`
HasAttachments bool `json:"hasAttachments"`
ReferenceID string `json:"referenceId"`
CreditCardID string `json:"creditCardId"`
SentToExpensify bool `json:"sentToExpensify"`
SentToQuickbooks bool `json:"sentToQuickbooks"`
AttachmentsCount int `json:"attachmentsCount"`
ReferenceFields []ReferenceField `json:"referenceFields"`
CreditCardDisplayName string `json:"creditCardDisplayName"`
}
Transaction -> https://developer.paywithextend.com/#tocS_TransactionListItem.
type TransactionsResponse ¶
type TransactionsResponse struct {
Transactions []Transaction `json:"transactions"`
}
TransactionsResponse -> https://developer.paywithextend.com/#tocS_TransactionsResponse.
type UpdateVirtualCardRequest ¶
type UpdateVirtualCardRequest struct {
CreditCardID string `json:"creditCardId"`
ReferenceFields []ReferenceField `json:"referenceFields"`
DisplayName string `json:"displayName"`
Notes string `json:"notes"`
BalanceCents int `json:"balanceCents"`
Currency string `json:"currency"`
ValidFrom string `json:"validFrom"`
ValidTo string `json:"validTo"`
Recurs bool `json:"recurs"`
Recurrence Recurrence `json:"recurrence"`
ReceiptAttachmentIds []string `json:"receiptAttachmentIds"`
ExpirationMonthYear string `json:"expirationMonthYear"`
ValidMccRanges []MccRange `json:"validMccRanges"`
}
UpdateVirtualCardRequest -> https://developer.paywithextend.com/#tocS_UpdateVirtualCardRequest.
type User ¶
type User struct {
ID string `json:"id"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Email string `json:"email"`
Phone string `json:"phone"`
PhoneIsoCountry string `json:"phoneIsoCountry"`
AvatarType string `json:"avatarType"`
AvatarURL string `json:"avatarUrl"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Currency string `json:"currency"`
Locale string `json:"locale"`
Timezone string `json:"timezone"`
Verified bool `json:"verified"`
HasExpensifyLink bool `json:"hasExpensifyLink"`
QuickbooksTokenID string `json:"quickbooksTokenId"`
EmployeeID string `json:"employeeId"`
IssuerSanctions []IssuerSanctions `json:"issuerSanctions"`
OrganizationID string `json:"organizationId"`
OrganizationRole string `json:"organizationRole"`
}
type VirtualCard ¶
type VirtualCard struct {
ID string `json:"id"`
Status string `json:"status"`
RecipientID string `json:"recipientId"`
Recipient User `json:"recipient"`
CardholderID string `json:"cardholderId"`
Cardholder User `json:"cardholder"`
CardImage CardImage `json:"cardImage"`
DisplayName string `json:"displayName"`
Expires string `json:"expires"`
Currency string `json:"currency"`
LimitCents int `json:"limitCents"`
BalanceCents int `json:"balanceCents"`
SpentCents int `json:"spentCents"`
LifetimeSpentCents int `json:"lifetimeSpentCents"`
AwaitingBudget bool `json:"awaitingBudget"`
Last4 string `json:"last4"`
NumberFormat string `json:"numberFormat"`
ValidFrom string `json:"validFrom"`
ValidTo string `json:"validTo"`
InactiveSince string `json:"inactiveSince"`
Timezone string `json:"timezone"`
CreditCardID string `json:"creditCardId"`
Recurs bool `json:"recurs"`
Recurrence Recurrence `json:"recurrence"`
Pending VirtualCardRevision `json:"pending"`
Notes string `json:"notes"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
Address Address `json:"address"`
Direct bool `json:"direct"`
Features VirtualCardFeature `json:"features"`
ActiveUntil string `json:"activeUntil"`
MinTransactionCents int `json:"minTransactionCents"`
MaxTransactionCents int `json:"maxTransactionCents"`
MaxTransactionCount int `json:"maxTransactionCount"`
TokenReferenceIds string `json:"tokenReferenceIds"`
Network string `json:"network"`
CompanyName string `json:"companyName"`
CreditCardDisplayName string `json:"creditCardDisplayName"`
Issuer string `json:"issuer"`
ValidMccRanges []MccRange `json:"validMccRanges"`
}
VirtualCard -> https://developer.paywithextend.com/#tocS_VirtualCard.
type VirtualCardFeature ¶
type VirtualCardFeature struct {
Recurrence bool `json:"recurrence"`
CustomAddress bool `json:"customAddress"`
CustomMin bool `json:"customMin"`
CustomMax bool `json:"customMax"`
WalletsEnabled string `json:"walletsEnabled"`
MccControl bool `json:"mccControl"`
QboReportEnabled bool `json:"qboReportEnabled"`
}
VirtualCardFeature -> https://developer.paywithextend.com/#tocS_VirtualCardFeature.
type VirtualCardPageableRequest ¶
type VirtualCardPageableRequest struct {
Count int `json:"count"`
Page int `json:"page"`
SortField string `json:"sortField"`
SortDirection string `json:"sortDirection"`
Cardholder string `json:"cardholder"`
Recipient string `json:"recipient"`
CardholderOrViewer string `json:"cardholderOrViewer"`
CreditCardID string `json:"creditCardId"`
Status string `json:"status"`
Statuses []string `json:"statuses"`
Issued bool `json:"issued"`
PendingRequest bool `json:"pendingRequest"`
Search string `json:"search"`
WithPermission string `json:"withPermission"`
}
VirtualCardPageableRequest -> https://developer.paywithextend.com/#tocS_VirtualCardPageableRequest.
type VirtualCardResponse ¶
type VirtualCardResponse struct {
VirtualCard VirtualCard `json:"virtualCard"`
}
VirtualCardResponse -> https://developer.paywithextend.com/#tocS_VirtualCardResponse.
type VirtualCardRevision ¶
type VirtualCardRevision struct {
BalanceCents int `json:"balanceCents"`
ValidFrom string `json:"validFrom"`
ValidTo string `json:"validTo"`
Recurs bool `json:"recurs"`
ActiveUntil string `json:"activeUntil"`
Currency string `json:"currency"`
Recurrence Recurrence `json:"recurrence"`
ReceiptAttachments map[string]any `json:"receiptAttachments"`
}
VirtualCardRevision -> https://developer.paywithextend.com/#tocS_VirtualCardRevision.
type VirtualCardsResponse ¶
type VirtualCardsResponse struct {
Pagination Pagination `json:"pagination"`
VirtualCards []VirtualCard `json:"virtualCards"`
}
VirtualCardsResponse -> https://developer.paywithextend.com/#tocS_VirtualCardsResponse.