Documentation ¶
Index ¶
- Constants
- func CreateCommunicator(apiKeyID, secretAPIKey, integrator string) (*communicator.Communicator, error)
- func CreateCommunicatorFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*communicator.Communicator, error)
- func CreateCommunicatorFromSession(session *communicator.Session) (*communicator.Communicator, error)
- func CreateConfiguration(apiKeyID, secretAPIKey, integrator string) (*configuration.CommunicatorConfiguration, error)
- func CreateSessionBuilder(apiKeyID, secretAPIKey, integrator string) (*communicator.SessionBuilder, error)
- func CreateSessionBuilderFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*communicator.SessionBuilder, error)
- type CallContext
- type Client
- func CreateClient(apiKeyID, secretAPIKey, integrator string) (*Client, error)
- func CreateClientFromCommunicator(communicator *communicator.Communicator) (*Client, error)
- func CreateClientFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*Client, error)
- func CreateClientFromSession(session *communicator.Session) (*Client, error)
- func NewClient(communicator *communicator.Communicator) (client *Client, err error)
- func (c *Client) Close() error
- func (c *Client) DisableLogging()
- func (c *Client) EnableLogging(communicatorLogger logging.CommunicatorLogger)
- func (c *Client) Merchant(merchantID string) *merchant.Client
- func (c *Client) SetBodyObfuscator(bodyObfuscator obfuscation.BodyObfuscator)
- func (c *Client) SetHeaderObfuscator(headerObfuscator obfuscation.HeaderObfuscator)
- func (c *Client) WithClientMetaInfo(clientMetaInfo string) (*Client, error)
Constants ¶
const APIVersion = "v1"
APIVersion is the version of the current SDK
Variables ¶
This section is empty.
Functions ¶
func CreateCommunicator ¶
func CreateCommunicator(apiKeyID, secretAPIKey, integrator string) (*communicator.Communicator, error)
CreateCommunicator creates a Communicator with default settings and the given apiKeyID and secretAPIKey
func CreateCommunicatorFromConfiguration ¶
func CreateCommunicatorFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*communicator.Communicator, error)
CreateCommunicatorFromConfiguration creates a Communicator with the given CommunicatorConfiguration
func CreateCommunicatorFromSession ¶
func CreateCommunicatorFromSession(session *communicator.Session) (*communicator.Communicator, error)
CreateCommunicatorFromSession creates a Communicator with the given Session
func CreateConfiguration ¶
func CreateConfiguration(apiKeyID, secretAPIKey, integrator string) (*configuration.CommunicatorConfiguration, error)
CreateConfiguration creates a CommunicatorConfiguration with default settings and the given apiKeyID and secretAPIKey
func CreateSessionBuilder ¶
func CreateSessionBuilder(apiKeyID, secretAPIKey, integrator string) (*communicator.SessionBuilder, error)
CreateSessionBuilder creates a SessionBuilder with default settings and the given apiKeyID and secretAPIKey
func CreateSessionBuilderFromConfiguration ¶
func CreateSessionBuilderFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*communicator.SessionBuilder, error)
CreateSessionBuilderFromConfiguration creates a SessionBuilder with the given CommunicatorConfiguration
Types ¶
type CallContext ¶
CallContext can be used to send extra information with a request, and to receive extra information from a response. Please note that this type is not thread-safe. Each request should get its own call context instance.
func NewCallContext ¶
func NewCallContext(idempotenceKey string) (*CallContext, error)
NewCallContext creates a CallContext using the given idempotenceKey
func (*CallContext) GetIdempotenceKey ¶
func (c *CallContext) GetIdempotenceKey() string
GetIdempotenceKey returns the idempotence key
func (*CallContext) GetIdempotenceRequestTimestamp ¶
func (c *CallContext) GetIdempotenceRequestTimestamp() *int64
GetIdempotenceRequestTimestamp returns the idempotence timestamp
func (*CallContext) SetIdempotenceRequestTimestamp ¶
func (c *CallContext) SetIdempotenceRequestTimestamp(timestamp *int64)
SetIdempotenceRequestTimestamp sets the idempotence timestamp
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Ingenico ePayments platform client. Thread-safe.
This client and all its child clients are bound to one specific value for the X-GCS-ClientMetaInfo header. To get a new client with a different header value, use WithClientMetaInfo.
func CreateClient ¶
CreateClient creates a Client with default settings and the given apiKeyID and secretAPIKey
func CreateClientFromCommunicator ¶
func CreateClientFromCommunicator(communicator *communicator.Communicator) (*Client, error)
CreateClientFromCommunicator creates a Client with the given Communicator
func CreateClientFromConfiguration ¶
func CreateClientFromConfiguration(configuration *configuration.CommunicatorConfiguration) (*Client, error)
CreateClientFromConfiguration creates a Client with the given CommunicatorConfiguration
func CreateClientFromSession ¶
func CreateClientFromSession(session *communicator.Session) (*Client, error)
CreateClientFromSession creates a Client with the given Session
func NewClient ¶
func NewClient(communicator *communicator.Communicator) (client *Client, err error)
NewClient creates a new Client with the given communicator
func (*Client) EnableLogging ¶
func (c *Client) EnableLogging(communicatorLogger logging.CommunicatorLogger)
EnableLogging turns on logging using the given communicator logger.
func (*Client) SetBodyObfuscator ¶
func (c *Client) SetBodyObfuscator(bodyObfuscator obfuscation.BodyObfuscator)
SetBodyObfuscator sets the body obfuscator to use.
func (*Client) SetHeaderObfuscator ¶
func (c *Client) SetHeaderObfuscator(headerObfuscator obfuscation.HeaderObfuscator)
SetHeaderObfuscator sets the header obfuscator to use.
func (*Client) WithClientMetaInfo ¶
WithClientMetaInfo returns a new Client which uses the passed meta data for the X-GCS-ClientMetaInfo header. - clientMetaInfo is a JSON string containing the meta data for the client - can give an error if the given clientMetaInfo is not a valid JSON string