service

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// BaseURL is used to be able to switch between the sandbox and the production mode.
	BaseURL string
	// BasicAuth is the base64 hash used in the header.
	BasicAuth string

	// UseBasicAuth checks if the request use oAuth or BasicAuth.
	UseBasicAuth bool
)
View Source
var DefaultClient = &http.Client{}

DefaultClient is the default Client and is used by Get, Head, and Post.

Functions

func SetLogger

func SetLogger(l log.Logger)

SetLogger allow to change the default logger.

Types

type BankAccounts

type BankAccounts struct{}

BankAccounts is responsible of all services for Bank Account.

func (BankAccounts) CreateCA

func (BankAccounts) CreateCA(userID string, payload *model.BankAccountCACreate) (res *model.BankAccountCA, err error)

CreateCA is creating a new BankAccount in CA for the given userID.

func (BankAccounts) CreateGB

func (BankAccounts) CreateGB(userID string, payload *model.BankAccountGBCreate) (res *model.BankAccountGB, err error)

CreateGB is creating a new BankAccount in GB for the given userID.

func (BankAccounts) CreateIBAN

func (BankAccounts) CreateIBAN(userID string, payload *model.BankAccountIBANCreate) (res *model.BankAccountIBAN, err error)

CreateIBAN is creating a new IBAN for a given userID.

func (BankAccounts) CreateOther

func (BankAccounts) CreateOther(userID string, payload *model.BankAccountOtherCreate) (res *model.BankAccountOther, err error)

CreateOther is creating a new BankAccount in other bank type for the given userID.

func (BankAccounts) CreateUS

func (BankAccounts) CreateUS(userID string, payload *model.BankAccountUSCreate) (res *model.BankAccount, err error)

CreateUS is creating a new BankAccount in US for the given userID. ?? not 100% positive on the return result in the documentation there is no BankAccountUS describe ??

func (BankAccounts) Desactivate

func (BankAccounts) Desactivate(userID, bankAccountID string) (res *model.BankAccount, err error)

Desactivate is desactivating a BankAccount from the given userID and bankAccountID. ?? not sure what king of payload this is going to send back ??

func (BankAccounts) View

func (BankAccounts) View(bankAccountID string) (res *model.BankAccount, err error)

View display the BankAccount informtion from the given bankAccountID.

func (BankAccounts) ViewFromUser

func (BankAccounts) ViewFromUser(userID string, query *model.Query) (res []model.BankAccount, err error)

ViewFromUser display all the BankAccounts informtion from the given userID.

type BankingAliases

type BankingAliases struct{}

BankingAliases is responsible of all services for BankingAlias.

func (BankingAliases) Create

func (BankingAliases) Create(walletID string, payload *model.BankingAliasCreate) (res *model.BankingAlias, err error)

Create is creating a ne BankingAlias connect with the walletID.

func (BankingAliases) Desactivate

func (BankingAliases) Desactivate(walletID, bankingAliasID string) (res *model.BankingAlias, err error)

Desactivate is desactivating a BankingAlias

func (BankingAliases) View

func (BankingAliases) View(bankingAliasID string) (res *model.BankingAlias, err error)

View reteve a BankingAlias by it's given ID.

func (BankingAliases) WalletView

func (BankingAliases) WalletView(walletID string) (res *model.BankingAlias, err error)

WalletView retreve a BankingAlias from it's wallet's ID. To view a wallet's banking aliases - remember that you can only have one banking alias per wallet (even though it is a list format).

type Cards

type Cards struct{}

Cards is responsible of all services for Card.

func (Cards) Desactivate

func (Cards) Desactivate(cardID string) (res *model.Card, err error)

Desactivate helps you to desactivate a Card from the given cardID. Note that once deactivated, a card can't be reactivated afterwards.

func (Cards) ListByFingerprint

func (Cards) ListByFingerprint(fingerprint string, query *model.Query) (res []model.Card, err error)

ListByFingerprint allow to display a list of Cards from the given fingerprint.

func (Cards) ListByUser

func (Cards) ListByUser(userID string, query *model.Query) (res []model.Card, err error)

ListByUser allow to view the Card list of a fiven user from the given userID.

func (Cards) ListTransactionByFingerprint

func (Cards) ListTransactionByFingerprint(fingerprint string, query *model.Query) (res []model.Transaction, err error)

ListTransactionByFingerprint allow to display a list of Transactions from the given fingerprint.

func (Cards) ListUserByFingerprint

func (Cards) ListUserByFingerprint(fingerprint string, query *model.Query) (res []model.User, err error)

ListUserByFingerprint allow to display a list of Users from the given fingerprint.

func (Cards) Register

func (Cards) Register(payload *model.CardRegistrationCreate) (res *model.CardRegistration, err error)

Register is registering a CardRegistration.

func (Cards) RegisterUpdate

func (Cards) RegisterUpdate(cardRegistrationID string, payload *model.CardRegistrationUpdate) (res *model.CardRegistration, err error)

RegisterUpdate is updating an existing CardRegister.

func (*Cards) RegisterUpdateData

func (s *Cards) RegisterUpdateData(cardRegistrationID, data string) (res *model.CardRegistration, err error)

RegisterUpdateData is a helper that call the RegisterUpdate function without using a model.CardRegistrationUpdate.

func (Cards) RegisterView

func (Cards) RegisterView(cardRegistrationID string) (res *model.CardRegistration, err error)

RegisterView allow to view a CardRegistration from the given CardRegistrationID.

func (Cards) View

func (Cards) View(cardID string) (res *model.Card, err error)

View allow to view a Card from the given CardID.

type ClientWallets

type ClientWallets struct{}

ClientWallets is responsible of all services for the Client'Wallet(s).

func (ClientWallets) ListAll

func (ClientWallets) ListAll(query *model.Query) (res []model.ClientWallet, err error)

ListAll is listing all the ClientWallet with it's associated Currency and Fundtype.

func (ClientWallets) ListByFundsType

func (ClientWallets) ListByFundsType(fundType model.Funds, query *model.Query) (res []model.ClientWallet, err error)

ListByFundsType is retriving all the ClientWallet from the given FundType.

func (ClientWallets) View

func (ClientWallets) View(fundType model.Funds, currency currency.ISO3) (res *model.ClientWallet, err error)

View is retriving the ClientWallet from the given fundType and currency.

type Clients

type Clients struct{}

Clients is responsible of all services for the Client.

func (Clients) Update

func (Clients) Update(payload *model.ClientUpdate) (res *model.Client, err error)

Update is updating the Client from the given ClientUpdate payload.

func (Clients) UploadLogo(payload *model.ClientLogo) (res *model.Client, err error)

UploadLogo is updating the logo from a given payload.

func (Clients) View

func (Clients) View(query *model.Query) (res *model.Client, err error)

View is retriving a the Client.

type DisputeDocunents

type DisputeDocunents struct{}

DisputeDocunents is responsible of all services for the DisputeDocunent.

func (DisputeDocunents) Consult

func (DisputeDocunents) Consult(disputeDocumentID string) (res *model.DisputeDocument, err error)

Consult is retriving the DisputeDocument from it's ID. ?? Whaaaasaaaat ?? Consult a dispute document's pages

func (DisputeDocunents) Create

func (DisputeDocunents) Create(disputeID string, kind model.DisputeDocumentType) (res *model.DisputeDocument, err error)

Create creates a dispute document from the given dispute ID and the kind of ducument.

func (DisputeDocunents) List

func (DisputeDocunents) List(query *model.Query) (res []model.DisputeDocument, err error)

List is listing all the Dispute Documents. ?? body param ?? You can paginate these HTTP GET requests and also add filters such as BeforeDate, AfterDate, Type (e.g. REFUND_PROOF) and Status (e.g. VALIDATED).

Get parameters

Status DocumentStatus OPTIONAL The status of this KYC/Dispute document

Type DisputeDocumentType OPTIONAL The type of the dispute document

func (DisputeDocunents) ListByDispute

func (DisputeDocunents) ListByDispute(disputeID string, query *model.Query) (res []model.DisputeDocument, err error)

ListByDispute is listing all the Document Dispute from a given disputeID. ?? body param ?? Get parameters Status DocumentStatus OPTIONAL The status of this KYC/Dispute document

Type DisputeDocumentType OPTIONAL The type of the dispute document

func (DisputeDocunents) PageCreate

func (DisputeDocunents) PageCreate(disputeID, disputeDocumentID string, payload model.DisputeDocumentCreate) (res *model.DisputeDocument, err error)

PageCreate is creating a Page from the given disputeID, disputeDocumentID and the file in base64 in DisputeDocumentCreate payload.

func (DisputeDocunents) Submit

func (DisputeDocunents) Submit(disputeID, disputeDocumentID string) (res *model.DisputeDocument, err error)

Submit is sending for validation to the service de referring document.

func (DisputeDocunents) View

func (DisputeDocunents) View(disputeDocumentID string) (res *model.DisputeDocument, err error)

View is retriveving the DisputeDocument by it's ID.

type Disputes

type Disputes struct{}

Disputes is responsible of all services for Dispute.

func (Disputes) Close

func (Disputes) Close(disputeID string) (res *model.Dispute, err error)

Close method is used to close a "Dispute", effectively confirming that you do not wish to contest it. This action is optional, and once the "ContestDeadlineDate" passes, you will not be able to contest it anyway.

func (Disputes) List

func (Disputes) List(query *model.Query) (res []model.Dispute, err error)

List is listing all the Disputes. ?? the optional params are describe in the body but this is a get method ?? params : DisputeType DisputeType OPTIONAL The type of dispute

Status DisputeStatus OPTIONAL The status of this KYC/Dispute document

func (Disputes) PendingSettleList

func (Disputes) PendingSettleList(query *model.Query) (res []model.Dispute, err error)

PendingSettleList is listing all Disputes that need to be settle. In the event you have credit following a Dispute (because you lost, or didn’t contest the full amount), you can do a settlement transfer to transfer funds from the original wallet to the credit wallet if you wish – this is entirely optional and will depend on your workflow whether you want to impact the original wallet or not. The endpoint below provides you with the list of disputes that allow a settlement transfer - meaning that you have credit for these disputes and that funds are still available in the original wallet.

func (Disputes) ReSubmit

func (Disputes) ReSubmit(disputeID string) (res *model.Dispute, err error)

ReSubmit a Dispute is used to resubmit a "Dispute" if it is reopened requiring more docs. ?? more doc yes indeed ??

func (Disputes) Submit

func (Disputes) Submit(disputeID string, payload *model.Money) (res *model.Dispute, err error)

Submit a Dispute is used to contest a Dispute.

The "ContestedFunds" must be the same "Currency" as the "DisputedFunds", and the amount can be up to and including the "DisputedFunds".

Parameters ContestedFunds Money OPTIONAL The amount you wish to contest

func (Disputes) Update

func (Disputes) Update(disputeID, tag string) (res *model.Dispute, err error)

Update is used to update tag's dispute from it's given ID.

func (Disputes) UserList

func (Disputes) UserList(userID string, query *model.Query) (res []model.Dispute, err error)

UserList is listing all User's Disputes. ?? the optional params are describe in the body but this is a get method ??

DisputeType DisputeType OPTIONAL The type of dispute

Status DisputeStatus OPTIONAL The status of this KYC/Dispute document

func (Disputes) View

func (Disputes) View(disputeID string) (res *model.Dispute, err error)

View is used to view a dispute from it's given ID.

func (Disputes) WalletList

func (Disputes) WalletList(walletID string, query *model.Query) (res []model.Dispute, err error)

WalletList is listing all Disputes from a given Wallet. ?? the optional params are describe in the body but this is a get method ??

DisputeType DisputeType OPTIONAL The type of dispute

Status DisputeStatus OPTIONAL The status of this KYC/Dispute document

type Events

type Events struct{}

Events is responsible of all services for the Event.

func (Events) List

func (Events) List(event model.EventType, query *model.Query) (res []model.Event, err error)

List is listing all events. it has an EventType optional parameter ?? in the documentation this is shown as a body param ?? ?? as a get method we can't use a body ?? ?? is it a query param ?? ?? end ??

type Hooks

type Hooks struct{}

Hooks is responsible of all services for the Hook.

func (Hooks) Create

func (Hooks) Create(event model.EventType, url string) (res *model.Hook, err error)

Create is creating a new event hook with the given EventType and URL.

func (Hooks) List

func (Hooks) List(query *model.Query) (res []model.Hook, err error)

List retrive all existing Hooks. ?? can we add query params ??

func (Hooks) Update

func (Hooks) Update(hookID string, event model.EventType, url string) (res *model.Hook, err error)

Update is updating an event hook with the given ID, EventType and URL.

func (Hooks) View

func (Hooks) View(hookID string) (res *model.Hook, err error)

View retrive a Hook from it's given ID.

type Idempotencies

type Idempotencies struct{}

Idempotencies is responsible of all services for the Idempotency.

func (Idempotencies) View

func (Idempotencies) View(idempotencyKEY string) (res *model.IempotencyResponse, err error)

View retreve the payload from the idempotencyKEY.

type KYCs

type KYCs struct{}

KYCs is responsible of all services for the KYC.

func (KYCs) DocumentCreate

func (KYCs) DocumentCreate(userID string, docType model.DocumentType) (res *model.KYCDocument, err error)

DocumentCreate is creating a document for the given userID in it given type.

func (KYCs) ListAll

func (KYCs) ListAll(query *model.Query) (res []model.KYCDocument, err error)

ListAll is retriving all the KYC Document from the given Query filters params. Query parameters : The status of this KYC/Dispute document Status DocumentStatus OPTIONAL The Type of a given KYC Document Type KYCDocumentType OPTIONAL

example of params in the filter Query:

{
	Filter: map[string]string {
		"Status": "CREATED, SUCCEEDED",
		"Type": "IDENTITY_PROOF,ADDRESS_PROOF",
	},
}

?? the documentation show a body request but with the GET method this is not possible to push a body ?? so this may be a service with a POST request of a query one. ?? end ??

func (KYCs) ListByUser

func (KYCs) ListByUser(userID string, query *model.Query) (res []model.KYCDocument, err error)

ListByUser is retriving all the KYC Document from a userID.

func (KYCs) PageCreate

func (KYCs) PageCreate(userID, kycDocumentID string, payload *model.KYCPage) (res *model.KYCDocument, err error)

PageCreate is creating a page for the given userID, kycDocumentID (get with the service DocumentCreate) and the given file.

func (KYCs) Submit

func (KYCs) Submit(userID, kycDocumentID string) (res *model.KYCDocument, err error)

Submit is submitting for validation the document for verification.

func (KYCs) View

func (KYCs) View(kycDocumentID string) (res *model.KYCDocument, err error)

View is retriving the KYC Document from it's ID.

type Mandates

type Mandates struct{}

Mandates is responsible of all services for the Mandate.

func (Mandates) BankAccountList

func (Mandates) BankAccountList(userID, bankAccountID string, query *model.Query) (res []model.Mandate, err error)

BankAccountList list all mandates from a given userID and BankAccountID.

func (Mandates) Cancel

func (Mandates) Cancel(mandateID string) (res *model.Mandate, err error)

Cancel is cancelling the Mandate from it's given ID.

func (Mandates) Create

func (Mandates) Create(payload *model.MandateCreate) (res *model.Mandate, err error)

Create is creating a new mandate from the given payload.

func (Mandates) List

func (Mandates) List(query *model.Query) (res []model.Mandate, err error)

List is listing all mandates.

func (Mandates) UserList

func (Mandates) UserList(userID string, query *model.Query) (res []model.Mandate, err error)

UserList is listing all mandates from a given userID.

type PayIns

type PayIns struct{}

PayIns is responsible of all services for the Payin.

func (PayIns) BankwireDirect

func (PayIns) BankwireDirect(payload *model.BankwireDirectCreate) (res *model.BankwireDirect, err error)

BankwireDirect is use to create a direct bankwire.

func (PayIns) BankwireToClientCreditWalletCreate

func (PayIns) BankwireToClientCreditWalletCreate(payload *model.BankwireToClientCreditWalletCreate) (res *model.DirectDebitDirect, err error)

BankwireToClientCreditWalletCreate is for creating a bankwire to a client wallet. ?? not sure this will retrun a real model.DirectDebitDirect ??

func (PayIns) CardDirectCreate

func (PayIns) CardDirectCreate(payload *model.CardDirectCreate) (res *model.CardDirect, err error)

CardDirectCreate creates a CardDirect.

func (PayIns) CardPreAuthorizedCreate

func (PayIns) CardPreAuthorizedCreate(payload *model.CardPreAuthorizedCreate) (res *model.CardPreAuthorized, err error)

CardPreAuthorizedCreate is used for pre-authorization.

func (PayIns) CardWebCreate

func (PayIns) CardWebCreate(payload *model.CardWebCreate) (res *model.CardWeb, err error)

CardWebCreate is creating a CardWeb.

func (PayIns) DirectDebitDirect

func (PayIns) DirectDebitDirect(payload *model.DirectDebitDirectCreate) (res *model.DirectDebitDirect, err error)

DirectDebitDirect is for creating a new direct debit.

func (PayIns) PayInWebExtended

func (PayIns) PayInWebExtended(payload *model.WebExtended) (res interface{}, err error)

PayInWebExtended is for somthing I have no clue. ?? this is returning for the moment an interface - what type of data is it returning exactly ??

func (PayIns) View

func (PayIns) View(payInID string) (res *model.Payin, err error)

View is used to view a Payin from it's ID.

func (PayIns) ViewCardDetails

func (PayIns) ViewCardDetails(payInID string) (res interface{}, err error)

ViewCardDetails is used to get a Card detail in a PayIn from it's ID. ?? We don't have yet the type of struct out ?? Note that this endpoint is only available for PayIn: through Web interface when customer has provided some Card infos

type PayOuts

type PayOuts struct{}

PayOuts is responsible of all services for the Payout.

func (PayOuts) Create

func (PayOuts) Create(payload *model.PayOutCreate) (res *model.PayOut, err error)

Create is creating a payout form the given PayOutCreate payload.

func (PayOuts) View

func (PayOuts) View(payoutID string) (res *model.PayOut, err error)

View display a payout front the payoutID.

type PermissionGoups

type PermissionGoups struct{}

PermissionGoups is responsible of all services for the PermissionGroup.

func (PermissionGoups) Create

Create is creating a new PermissionGroup.

func (PermissionGoups) List

func (PermissionGoups) List(query *model.Query) (res []model.PermissionGroup, err error)

List retreve all PermissionGroups.

func (PermissionGoups) Update

func (PermissionGoups) Update(permissionGroupID string, payload *model.PermissionGroupUpdate) (res *model.PermissionGroup, err error)

Update is updating an existing PermissionGroup.

func (PermissionGoups) View

func (PermissionGoups) View(permissionGroupID string) (res *model.PermissionGroup, err error)

View retreve a PermissionGroup from it's ID.

type PreAuthorizations

type PreAuthorizations struct{}

PreAuthorizations is responsible of all services for the PreAuthorization.

func (PreAuthorizations) Cancel

func (PreAuthorizations) Cancel(preAuthorizationID string, status model.PaymentStatus) (res *model.PreAuthorization, err error)

Cancel is cancelling the pre-authorization. The status of the payment after the PreAuthorization. You can pass the PaymentStatus from "WAITING" to "CANCELED" should you need/want to.

func (PreAuthorizations) CardList

func (PreAuthorizations) CardList(cardID string) (res []model.PreAuthorization, err error)

CardList is listing all the pre-authorization of a given cardID.

func (PreAuthorizations) UserList

func (PreAuthorizations) UserList(userID string, query *model.Query) (res []model.PreAuthorization, err error)

UserList is listing all the pre-authorization of a given userID.

?? this should not be a body payload as describe in the documentation ?? ?? for now I place it in the query ?? ?? end ??

Status PreAuthorizationStatus OPTIONAL Status of the PreAuthorization

ResultCode string OPTIONAL The result code of the transaction (you can filter your transactions list by multiple ResultCode values, each one must be separated by a comma)

PaymentStatus PaymentStatus OPTIONAL The status of the payment after the PreAuthorization. You can pass the PaymentStatus from "WAITING" to "CANCELED" should you need/want to

func (PreAuthorizations) View

func (PreAuthorizations) View(preAuthorizationID string) (res *model.PreAuthorization, err error)

View retrive a PreAuthorization from it's ID.

type Refunds

type Refunds struct{}

Refunds is responsible of all services for the Refund.

func (Refunds) PayInCreate

func (Refunds) PayInCreate(payinID string, payload *model.RefundCreate) (res *model.Refund, err error)

PayInCreate is creating a refund of a given payinID and a RefundCreate payload.

func (Refunds) PayoutList

func (Refunds) PayoutList(payoutID string, query *model.Query) (res []model.Refund, err error)

PayoutList is listing all refunds from a payoutID.

func (Refunds) TransferCreate

func (Refunds) TransferCreate(tranferID, authorID string) (res *model.Refund, err error)

TransferCreate is creating a refund of a given tranferID and a authorID.

func (Refunds) View

func (Refunds) View(refundID string) (res *model.Refund, err error)

View retrive a Refund fron it's given ID.

type Reports

type Reports struct{}

Reports is responsible of all Reporting services.

func (Reports) List

func (Reports) List(query *model.Query) (res []model.Report, err error)

List retreve all reports.

func (Reports) TransactionCreate

func (Reports) TransactionCreate(payload *model.ReportTransactionCreate) (res *model.Report, err error)

TransactionCreate is creating a report for a Transaction.

func (Reports) View

func (Reports) View(reportID string) (res *model.Report, err error)

View retreve a Report from it's ID.

func (Reports) WalletCreate

func (Reports) WalletCreate(payload *model.ReportWalletCreate) (res *model.Report, err error)

WalletCreate is creating a report for a Wallet.

type Repudiations

type Repudiations struct{}

Repudiations is responsible of all services for the Repudiation.

func (Repudiations) View

func (Repudiations) View(repudiationID string) (res *model.Repudiation, err error)

View retreve a Repudiation from it's ID.

type SSOS

type SSOS struct{}

SSOS is responsible of all services for the SSO.

func (SSOS) Create

func (SSOS) Create(payload *model.SSOCreate) (res *model.SSO, err error)

Create is creating a new SSO from a given SSOCreate payload. ?? the uri in the documentation is not correct ??

func (SSOS) ExtendInvitation

func (SSOS) ExtendInvitation(ssoID string) (res *model.SSO, err error)

ExtendInvitation is extending invitation front it's SSO ID. ?? not well describe yet ??

func (SSOS) List

func (SSOS) List(query *model.Query) (res []model.SSO, err error)

List is listing all SSO.

func (SSOS) PermissinGroupList

func (SSOS) PermissinGroupList(permissionGroupID string, query *model.Query) (res []model.SSO, err error)

PermissinGroupList allow to list all SSO from it's permission group ID. ?? PermissionGroups or permissiongroup in the uri ??

func (SSOS) Update

func (SSOS) Update(ssoID string, payload *model.SSOUpdate) (res *model.SSO, err error)

Update is updating an existing SSO from a given SSOUpdate payload and it's given existing ID.

func (SSOS) View

func (SSOS) View(ssoID string) (res *model.SSO, err error)

View retreve an sso from it's ID.

type SettlementTranfers

type SettlementTranfers struct{}

SettlementTranfers is responsible of all services for the SettlementTranfer.

func (SettlementTranfers) Create

func (SettlementTranfers) Create(repuditionID string, payload *model.SettlementTransferCreate) (res *model.SettlementTransfer, err error)

Create is creating a SettlementTransfer on a given repudiationID and SettlementTransferCreate payload.

func (SettlementTranfers) View

func (SettlementTranfers) View(settlementID string) (res *model.SettlementTransfer, err error)

View retreve a SettlementTranfer from it's ID. ?? settelmentID or settlementTranfserID we use it likewise the documentation ??

type Stats

type Stats struct{}

Stats is responsible of all services for the Stat.

func (Stats) GetRateLimit

func (Stats) GetRateLimit() (*model.RateLimit, error)

GetRateLimit is sending a neutral request that make possible to read the current RateLimit.

type Transactions

type Transactions struct{}

Transactions is responsible of all services for the Transaction.

func (Transactions) BankAccountList

func (Transactions) BankAccountList(bankAccountID string, query *model.Query) (res []model.Transaction, err error)

BankAccountList is listing all transactions for a BankAccount. ?? in the documentation this is showed as a payload in body ?? ?? I use it in the query params ?? ?? end ??

ResultCode string OPTIONAL The result code of the transaction (you can filter your transactions list by multiple ResultCode values, each one must be separated by a comma)

Status TransactionStatus OPTIONAL The status of the transaction (you can filter your transactions list by multiple Status values, each one must be separated by a comma)

func (Transactions) CardList

func (Transactions) CardList(cardID string, query *model.Query) (res []model.Transaction, err error)

CardList is listing all transactions for a given Card ID. ?? in the documentation this is showed as a payload in body ?? ?? I use it in the query params ??

?? end ?? Status TransactionStatus OPTIONAL The status of the transaction (you can filter your transactions list by multiple Status values, each one must be separated by a comma)

ResultCode string OPTIONAL The result code of the transaction (you can filter your transactions list by multiple ResultCode values, each one must be separated by a comma)

func (Transactions) ClientWalletList

func (Transactions) ClientWalletList(fundType model.Funds, currency currency.ISO3, query *model.Query) (res []model.Transaction, err error)

ClientWalletList is listing all transactions from client Wallets.

func (Transactions) DisputesList

func (Transactions) DisputesList(disputeID string, query *model.Query) (res []model.Transaction, err error)

DisputesList is listing all transactions from a given Dispute ID.

func (Transactions) MandateList

func (Transactions) MandateList(mandateID string, query *model.Query) (res []model.Transaction, err error)

MandateList is listing all transactions for a given Mandate ID. ?? in the documentation this is showed as a payload in body ?? ?? I use it in the query params ?? // ?? end ??

Status TransactionStatus OPTIONAL The status of the transaction (you can filter your transactions list by multiple Status values, each one must be separated by a comma)

ResultCode string OPTIONAL The result code of the transaction (you can filter your transactions list by multiple ResultCode values, each one must be separated by a comma)

func (Transactions) PreAuthorizationList

func (Transactions) PreAuthorizationList(preAuthorizationID string, query *model.Query) (res []model.Transaction, err error)

PreAuthorizationList includes PreAuthorized PayIns related to the PreAuthorization. Indeed, if a PreAuthorized PayIn fails, you can re-use the same Preauthorization to create a new PayIn while the PreAuthorization has not expired. As soon as a PreAuthorized Payin has succeeded, you cannot use the PreAuthorization anymore - even if the amount was partial.

func (Transactions) UserList

func (Transactions) UserList(userID string, query *model.Query) (res []model.Transaction, err error)

UserList is listing all transactions from a given user ID.

func (Transactions) WalletList

func (Transactions) WalletList(walletID string, query *model.Query) (res []model.Transaction, err error)

WalletList is listing all transactions from a given Wallet ID.

type Transferts

type Transferts struct{}

Transferts is responsible of all services for the Transfert.

func (Transferts) Create

func (Transferts) Create(payload *model.Transfert) (res *model.Transfert, err error)

Create is creating a new Tranfert.

func (Transferts) View

func (Transferts) View(transfertID string) (res *model.Transfert, err error)

View is retriving a Transfert form the given transfertID.

type UBOs

type UBOs struct{}

UBOs is responsible of all services for the UBO.

func (UBOs) Create

func (UBOs) Create(userID, declarationID string, payload *model.UBOCreate) (res *model.UBO, err error)

Create creates an UBO.

func (UBOs) DeclarationCreate

func (UBOs) DeclarationCreate(userID string) (res *model.UBO, err error)

DeclarationCreate creates an UBO Declaration.

func (UBOs) DeclarationSubmit

func (UBOs) DeclarationSubmit(userID, declarationID string) (res *model.UBO, err error)

DeclarationSubmit is submitting the declaration. ?? not sure this is sending back an UBO but ?? this can send back otherwise an UBODeclaration it is not mentioned in the documentation. ?? end ??

func (UBOs) DeclarationView

func (UBOs) DeclarationView(declarationID string) (res *model.UBO, err error)

DeclarationView is for retreving the declaration. ?? not sure this is sending back an UBO but ?? this can send back otherwise an UBODeclaration it is not mentioned in the documentation. ?? end ??

func (UBOs) List

func (UBOs) List(userID string, query *model.Query) (res *model.UBO, err error)

List is listing all the userID this can be combined with query. The column to sort against with `Sort` key in `model.Query.Filer` this can have ASC, DESC as a value.

func (UBOs) Update

func (UBOs) Update(userID, declarationID, uboID string, payload *model.UBOUpdate) (res *model.UBO, err error)

Update updates an UBO.

func (UBOs) View

func (UBOs) View(userID, declarationID, uboID string) (res *model.UBO, err error)

View is for retreving the UBO.

type UserEmoneys

type UserEmoneys struct{}

UserEmoneys is responsible of all services for the User Emoney.

func (UserEmoneys) View

func (UserEmoneys) View(userID string, param *model.UserEmoneyParam) (res []model.UserEmoney, err error)

View retreve the given User's Emoney from the params UserEmoneyParam the UserID is mandatory. If you add a month without the Year this will pick the current year.

type Users

type Users struct{}

Users is responsible of all services for the User.

func (Users) CreateLegalUser

func (Users) CreateLegalUser(payload *model.LegalUserCreate) (res *model.LegalUser, err error)

CreateLegalUser is creating a LegalUser.

func (Users) CreateNaturalUser

func (Users) CreateNaturalUser(payload *model.NaturalUserCreate) (res *model.NaturalUser, err error)

CreateNaturalUser creates a NaturalUser.

func (Users) List

func (Users) List(query *model.Query) (res []model.User, err error)

List retreve all Users from the cliendID.

func (Users) UpdateLegalUser

func (Users) UpdateLegalUser(userID string, payload *model.LegalUserUpdate) (res *model.LegalUser, err error)

UpdateLegalUser is updating a LegalUser.

func (Users) UpdateNaturalUser

func (Users) UpdateNaturalUser(userID string, payload *model.NaturalUserUpdate) (res *model.NaturalUser, err error)

UpdateNaturalUser is updating an exinsting NaturalUser.

func (Users) View

func (Users) View(userID string) (res *model.User, err error)

View retreve the User fron the given userID.

type Wallets

type Wallets struct{}

Wallets groups all services for Wallets.

func (Wallets) Create

func (Wallets) Create(payload *model.WalletCreate) (res *model.Wallet, err error)

Create is creating a new Wallet.

Example
api := mangopay.NewWithBasicAuth("{{clientID}}", "{{clientPassword}}")
wallet, _ := api.Wallets.Create(
	&model.WalletCreate{
		Owners:      []string{"my-client-id"},
		Description: "Description of the Wallet",
		Currency:    currency.EUR,
		Tag:         "some tag",
	},
)
log.Println(wallet)
Output:

func (Wallets) ListFromUser

func (Wallets) ListFromUser(userID string, query *model.Query) (res []model.Wallet, err error)

ListFromUser retrieve all the Wallets front a given userID.

func (Wallets) Update

func (Wallets) Update(walletID string, payload *model.WalletUpdate) (res *model.Wallet, err error)

Update is updating the description of an existing Wallet with the given payloads. This method allow to have a nil description into it.

func (Wallets) UpdateDesc

func (Wallets) UpdateDesc(walletID, desc string) (res *model.Wallet, err error)

UpdateDesc is a helper that simplify the way to update the description of an existing Wallet with the given payloads.

func (Wallets) View

func (Wallets) View(walletID string) (res *model.Wallet, err error)

View retrieve the Wallet front the given walletID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL