Documentation
¶
Index ¶
- type BadGateway
- type BadGatewayErrors
- type BadRequest
- type BadRequestErrors
- type BadRequestErrorsType
- type Client
- func (c *Client) Create(ctx context.Context, merchantCode string, body Create) (*Reader, error)
- func (c *Client) CreateCheckout(ctx context.Context, merchantCode string, readerID string, body CreateCheckout) (*CreateReaderCheckoutResponse, error)
- func (c *Client) Delete(ctx context.Context, merchantCode string, id ReaderID) error
- func (c *Client) Get(ctx context.Context, merchantCode string, id ReaderID, params GetParams) (*Reader, error)
- func (c *Client) GetStatus(ctx context.Context, merchantCode string, readerID string, ...) (*StatusResponse, error)
- func (c *Client) List(ctx context.Context, merchantCode string) (*ListReaders200Response, error)
- func (c *Client) TerminateCheckout(ctx context.Context, merchantCode string, readerID string) error
- func (c *Client) Update(ctx context.Context, merchantCode string, id ReaderID, body Update) (*Reader, error)
- type Create
- type CreateCheckout
- type CreateCheckoutAffiliate
- type CreateCheckoutAffiliateTags
- type CreateCheckoutCardType
- type CreateCheckoutRequest
- type CreateCheckoutRequestAffiliate
- type CreateCheckoutRequestAffiliateTags
- type CreateCheckoutRequestCardType
- type CreateCheckoutRequestTotalAmount
- type CreateCheckoutTotalAmount
- type CreateReaderCheckoutError
- type CreateReaderCheckoutErrorErrors
- type CreateReaderCheckoutResponse
- type CreateReaderCheckoutResponseData
- type CreateReaderCheckoutUnprocessableEntity
- type CreateReaderCheckoutUnprocessableEntityErrors
- type CreateReaderTerminateError
- type CreateReaderTerminateErrorErrors
- type CreateReaderTerminateUnprocessableEntity
- type CreateReaderTerminateUnprocessableEntityErrors
- type GatewayTimeout
- type GatewayTimeoutErrors
- type GetParams
- type GetStatusParams
- type InternalServerError
- type InternalServerErrorErrors
- type ListReaders200Response
- type Metadata
- type NotFound
- type NotFoundErrors
- type Reader
- type ReaderDevice
- type ReaderDeviceModel
- type ReaderID
- type ReaderName
- type ReaderPairingCode
- type ReaderStatus
- type StatusResponse
- type StatusResponseData
- type StatusResponseDataConnectionType
- type StatusResponseDataState
- type StatusResponseDataStatus
- type Unauthorized
- type UnauthorizedErrors
- type UnauthorizedErrorsType
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadGateway ¶ added in v0.10.0
type BadGateway struct {
Errors BadGatewayErrors `json:"errors"`
}
502 Bad Gateway
func (*BadGateway) Error ¶ added in v0.10.0
func (e *BadGateway) Error() string
type BadGatewayErrors ¶ added in v0.10.0
type BadGatewayErrors struct {
// Fuller message giving context to error
Detail string `json:"detail"`
}
BadGatewayErrors is a schema definition.
type BadRequest ¶ added in v0.10.0
type BadRequest struct {
Errors BadRequestErrors `json:"errors"`
}
400 Bad Request
func (*BadRequest) Error ¶ added in v0.10.0
func (e *BadRequest) Error() string
type BadRequestErrors ¶ added in v0.10.0
type BadRequestErrors struct {
// Fuller message giving context to error
Detail *string `json:"detail,omitempty"`
// Key indicating type of error
Type BadRequestErrorsType `json:"type"`
}
BadRequestErrors is a schema definition.
type BadRequestErrorsType ¶ added in v0.10.0
type BadRequestErrorsType string
Key indicating type of error
const ( BadRequestErrorsTypeDuplicateHeaders BadRequestErrorsType = "DUPLICATE_HEADERS" BadRequestErrorsTypeInvalidBearerToken BadRequestErrorsType = "INVALID_BEARER_TOKEN" BadRequestErrorsTypeInvalidUserAgent BadRequestErrorsType = "INVALID_USER_AGENT" BadRequestErrorsTypeNotEnoughUnpaidPayouts BadRequestErrorsType = "NOT_ENOUGH_UNPAID_PAYOUTS" )
type Client ¶ added in v0.13.0
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateCheckout ¶ added in v0.13.0
func (c *Client) CreateCheckout(ctx context.Context, merchantCode string, readerID string, body CreateCheckout) (*CreateReaderCheckoutResponse, error)
Creates a Checkout for a Reader.
This process is asynchronous and the actual transaction may take some time to be stared on the device.
There are some caveats when using this endpoint: * The target device must be online, otherwise checkout won't be accepted * After the checkout is accepted, the system has 60 seconds to start the payment on the target device. During this time, any other checkout for the same device will be rejected.
**Note**: If the target device is a Solo, it must be in version 3.3.24.3 or higher.
func (*Client) Get ¶ added in v0.13.0
func (c *Client) Get(ctx context.Context, merchantCode string, id ReaderID, params GetParams) (*Reader, error)
Retrieve a Reader.
func (*Client) GetStatus ¶ added in v0.13.0
func (c *Client) GetStatus(ctx context.Context, merchantCode string, readerID string, params GetStatusParams) (*StatusResponse, error)
Provides the last known status for a Reader.
This endpoint allows you to retrieve updates from the connected card reader, including the current screen being displayed during the payment process and the device status (battery level, connectivity, and update state).
Supported States ¶
* `IDLE` – Reader ready for next transaction * `SELECTING_TIP` – Waiting for tip input * `WAITING_FOR_CARD` – Awaiting card insert/tap * `WAITING_FOR_PIN` – Waiting for PIN entry * `WAITING_FOR_SIGNATURE` – Waiting for customer signature * `UPDATING_FIRMWARE` – Firmware update in progress
Device Status ¶
* `ONLINE` – Device connected and operational * `OFFLINE` – Device disconnected (last state persisted)
**Note**: If the target device is a Solo, it must be in version 3.3.39.0 or higher.
func (*Client) TerminateCheckout ¶ added in v0.13.0
Terminate a Reader Checkout stops the current transaction on the target device.
This process is asynchronous and the actual termination may take some time to be performed on the device.
There are some caveats when using this endpoint: * The target device must be online, otherwise terminate won't be accepted * The action will succeed only if the device is waiting for cardholder action: e.g: waiting for card, waiting for PIN, etc. * There is no confirmation of the termination.
If a transaction is successfully terminated and `return_url` was provided on Checkout, the transaction status will be sent as `failed` to the provided URL.
**Note**: If the target device is a Solo, it must be in version 3.3.28.0 or higher.
type Create ¶ added in v0.12.0
type Create struct {
// Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always
// submit whole metadata. Maximum of 64 parameters are allowed in the object.
// Max properties: 64
Metadata shared.Metadata `json:"metadata,omitempty"`
// Custom human-readable, user-defined name for easier identification of the reader.
// Max length: 500
Name ReaderName `json:"name"`
// The pairing code is a 8 or 9 character alphanumeric string that is displayed on a SumUp Device after initiating
// the pairing. It is used to link the physical device to the created pairing.
// Min length: 8
// Max length: 9
PairingCode ReaderPairingCode `json:"pairing_code"`
}
Create is a schema definition.
type CreateCheckout ¶ added in v0.12.0
type CreateCheckout struct {
// Affiliate metadata for the transaction.
// It is a field that allow for integrators to track the source of the transaction.
Affiliate *CreateCheckoutAffiliate `json:"affiliate,omitempty"`
// The card type of the card used for the transaction.
// Is is required only for some countries (e.g: Brazil).
CardType *CreateCheckoutCardType `json:"card_type,omitempty"`
// Description of the checkout to be shown in the Merchant Sales
Description *string `json:"description,omitempty"`
// Number of installments for the transaction.
// It may vary according to the merchant country.
// For example, in Brazil, the maximum number of installments is 12.
//
// Omit if the merchant country does support installments.
// Otherwise, the checkout will be rejected.
// Min: 1
Installments *int `json:"installments,omitempty"`
// Webhook URL to which the payment result will be sent.
// It must be a HTTPS url.
// Format: uri
ReturnURL *string `json:"return_url,omitempty"`
// List of tipping rates to be displayed to the cardholder.
// The rates are in percentage and should be between 0.01 and 0.99.
// The list should be sorted in ascending order.
TipRates []float32 `json:"tip_rates,omitempty"`
// Time in seconds the cardholder has to select a tip rate.
// If not provided, the default value is 30 seconds.
//
// It can only be set if `tip_rates` is provided.
//
// **Note**: If the target device is a Solo, it must be in version 3.3.38.0 or higher.
// Default: 30
// Min: 30
// Max: 120
TipTimeout *int `json:"tip_timeout,omitempty"`
// Amount structure.
//
// The amount is represented as an integer value altogether with the currency and the minor unit.
//
// For example, EUR 1.00 is represented as value 100 with minor unit of 2.
TotalAmount CreateCheckoutTotalAmount `json:"total_amount"`
}
Reader Checkout
type CreateCheckoutAffiliate ¶ added in v0.12.0
type CreateCheckoutAffiliate struct {
// Application ID of the affiliate.
// It is a unique identifier for the application and should be set by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.
AppID string `json:"app_id"`
// Foreign transaction ID of the affiliate.
// It is a unique identifier for the transaction.
// It can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).
ForeignTransactionID string `json:"foreign_transaction_id"`
// Key of the affiliate.
// It is a unique identifier for the key and should be generated by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.
Key string `json:"key"`
// Additional metadata for the transaction.
// It is key-value object that can be associated with the transaction.
Tags CreateCheckoutAffiliateTags `json:"tags,omitempty"`
}
Affiliate metadata for the transaction. It is a field that allow for integrators to track the source of the transaction.
type CreateCheckoutAffiliateTags ¶ added in v0.12.0
Additional metadata for the transaction. It is key-value object that can be associated with the transaction.
type CreateCheckoutCardType ¶ added in v0.12.0
type CreateCheckoutCardType string
The card type of the card used for the transaction. Is is required only for some countries (e.g: Brazil).
const ( CreateCheckoutCardTypeCredit CreateCheckoutCardType = "credit" CreateCheckoutCardTypeDebit CreateCheckoutCardType = "debit" )
type CreateCheckoutRequest ¶ added in v0.12.0
type CreateCheckoutRequest struct {
// Affiliate metadata for the transaction.
// It is a field that allow for integrators to track the source of the transaction.
Affiliate *CreateCheckoutRequestAffiliate `json:"affiliate,omitempty"`
// The card type of the card used for the transaction.
// Is is required only for some countries (e.g: Brazil).
CardType *CreateCheckoutRequestCardType `json:"card_type,omitempty"`
// Description of the checkout to be shown in the Merchant Sales
Description *string `json:"description,omitempty"`
// Number of installments for the transaction.
// It may vary according to the merchant country.
// For example, in Brazil, the maximum number of installments is 12.
//
// Omit if the merchant country does support installments.
// Otherwise, the checkout will be rejected.
// Min: 1
Installments *int `json:"installments,omitempty"`
// Webhook URL to which the payment result will be sent.
// It must be a HTTPS url.
// Format: uri
ReturnURL *string `json:"return_url,omitempty"`
// List of tipping rates to be displayed to the cardholder.
// The rates are in percentage and should be between 0.01 and 0.99.
// The list should be sorted in ascending order.
TipRates []float32 `json:"tip_rates,omitempty"`
// Time in seconds the cardholder has to select a tip rate.
// If not provided, the default value is 30 seconds.
//
// It can only be set if `tip_rates` is provided.
//
// **Note**: If the target device is a Solo, it must be in version 3.3.38.0 or higher.
// Default: 30
// Min: 30
// Max: 120
TipTimeout *int `json:"tip_timeout,omitempty"`
// Amount structure.
//
// The amount is represented as an integer value altogether with the currency and the minor unit.
//
// For example, EUR 1.00 is represented as value 100 with minor unit of 2.
TotalAmount CreateCheckoutRequestTotalAmount `json:"total_amount"`
}
Reader Checkout
type CreateCheckoutRequestAffiliate ¶ added in v0.12.0
type CreateCheckoutRequestAffiliate struct {
// Application ID of the affiliate.
// It is a unique identifier for the application and should be set by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.
AppID string `json:"app_id"`
// Foreign transaction ID of the affiliate.
// It is a unique identifier for the transaction.
// It can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).
ForeignTransactionID string `json:"foreign_transaction_id"`
// Key of the affiliate.
// It is a unique identifier for the key and should be generated by the integrator in the [Affiliate Keys](https://developer.sumup.com/affiliate-keys) page.
Key string `json:"key"`
// Additional metadata for the transaction.
// It is key-value object that can be associated with the transaction.
Tags CreateCheckoutRequestAffiliateTags `json:"tags,omitempty"`
}
Affiliate metadata for the transaction. It is a field that allow for integrators to track the source of the transaction.
type CreateCheckoutRequestAffiliateTags ¶ added in v0.12.0
Additional metadata for the transaction. It is key-value object that can be associated with the transaction.
type CreateCheckoutRequestCardType ¶ added in v0.12.0
type CreateCheckoutRequestCardType string
The card type of the card used for the transaction. Is is required only for some countries (e.g: Brazil).
const ( CreateCheckoutRequestCardTypeCredit CreateCheckoutRequestCardType = "credit" CreateCheckoutRequestCardTypeDebit CreateCheckoutRequestCardType = "debit" )
type CreateCheckoutRequestTotalAmount ¶ added in v0.12.0
type CreateCheckoutRequestTotalAmount struct {
// Currency ISO 4217 code
Currency string `json:"currency"`
// The minor units of the currency.
// It represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit
// is 0.
// Min: 0
MinorUnit int `json:"minor_unit"`
// Integer value of the amount.
// Min: 0
Value int `json:"value"`
}
Amount structure.
The amount is represented as an integer value altogether with the currency and the minor unit.
For example, EUR 1.00 is represented as value 100 with minor unit of 2.
type CreateCheckoutTotalAmount ¶ added in v0.12.0
type CreateCheckoutTotalAmount struct {
// Currency ISO 4217 code
Currency string `json:"currency"`
// The minor units of the currency.
// It represents the number of decimals of the currency. For the currencies CLP, COP and HUF, the minor unit
// is 0.
// Min: 0
MinorUnit int `json:"minor_unit"`
// Integer value of the amount.
// Min: 0
Value int `json:"value"`
}
Amount structure.
The amount is represented as an integer value altogether with the currency and the minor unit.
For example, EUR 1.00 is represented as value 100 with minor unit of 2.
type CreateReaderCheckoutError ¶ added in v0.3.0
type CreateReaderCheckoutError struct {
Errors CreateReaderCheckoutErrorErrors `json:"errors"`
}
Error description
func (*CreateReaderCheckoutError) Error ¶ added in v0.3.0
func (e *CreateReaderCheckoutError) Error() string
type CreateReaderCheckoutErrorErrors ¶ added in v0.3.0
type CreateReaderCheckoutErrorErrors struct {
// Error message
Detail *string `json:"detail,omitempty"`
}
CreateReaderCheckoutErrorErrors is a schema definition.
type CreateReaderCheckoutResponse ¶ added in v0.3.0
type CreateReaderCheckoutResponse struct {
Data CreateReaderCheckoutResponseData `json:"data"`
}
CreateReaderCheckoutResponse is a schema definition.
type CreateReaderCheckoutResponseData ¶ added in v0.3.0
type CreateReaderCheckoutResponseData struct {
// The client transaction ID is a unique identifier for the transaction that is generated for the client.
//
// It can be used later to fetch the transaction details via the [Transactions API](https://developer.sumup.com/api/transactions/get).
ClientTransactionID string `json:"client_transaction_id"`
}
CreateReaderCheckoutResponseData is a schema definition.
type CreateReaderCheckoutUnprocessableEntity ¶ added in v0.3.0
type CreateReaderCheckoutUnprocessableEntity struct {
Errors CreateReaderCheckoutUnprocessableEntityErrors `json:"errors"`
}
Unprocessable entity
func (*CreateReaderCheckoutUnprocessableEntity) Error ¶ added in v0.3.0
func (e *CreateReaderCheckoutUnprocessableEntity) Error() string
type CreateReaderCheckoutUnprocessableEntityErrors ¶ added in v0.3.0
CreateReaderCheckoutUnprocessableEntityErrors is a schema definition.
type CreateReaderTerminateError ¶ added in v0.3.0
type CreateReaderTerminateError struct {
Errors CreateReaderTerminateErrorErrors `json:"errors"`
}
Error description
func (*CreateReaderTerminateError) Error ¶ added in v0.3.0
func (e *CreateReaderTerminateError) Error() string
type CreateReaderTerminateErrorErrors ¶ added in v0.3.0
type CreateReaderTerminateErrorErrors struct {
// Error message
Detail *string `json:"detail,omitempty"`
}
CreateReaderTerminateErrorErrors is a schema definition.
type CreateReaderTerminateUnprocessableEntity ¶ added in v0.3.0
type CreateReaderTerminateUnprocessableEntity struct {
Errors CreateReaderTerminateUnprocessableEntityErrors `json:"errors"`
}
Unprocessable entity
func (*CreateReaderTerminateUnprocessableEntity) Error ¶ added in v0.3.0
func (e *CreateReaderTerminateUnprocessableEntity) Error() string
type CreateReaderTerminateUnprocessableEntityErrors ¶ added in v0.3.0
CreateReaderTerminateUnprocessableEntityErrors is a schema definition.
type GatewayTimeout ¶ added in v0.10.0
type GatewayTimeout struct {
Errors GatewayTimeoutErrors `json:"errors"`
}
504 Gateway Timeout
func (*GatewayTimeout) Error ¶ added in v0.10.0
func (e *GatewayTimeout) Error() string
type GatewayTimeoutErrors ¶ added in v0.10.0
type GatewayTimeoutErrors struct {
// Fuller message giving context to error
Detail string `json:"detail"`
}
GatewayTimeoutErrors is a schema definition.
type GetParams ¶ added in v0.12.0
type GetParams struct {
// Return the reader only if it has been modified after the specified timestamp given in the headers.
//
// Timestamps are accepted in the following formats:
//
// - HTTP Standard: [IMF format (RFC 5322)](https://www.rfc-editor.org/rfc/rfc5322#section-3.3), sometimes also
// referred to as [RFC 7231](https://www.rfc-editor.org/rfc/rfc7231#section-7.1.1.1).
// - RFC 3339: Used for timestamps in JSON payloads on this API.
IfModifiedSince *string
}
GetParams are query parameters for GetReader.
func (*GetParams) QueryValues ¶ added in v0.12.0
QueryValues converts GetParams into url.Values.
type GetStatusParams ¶ added in v0.12.0
GetStatusParams are query parameters for GetReaderStatus.
func (*GetStatusParams) QueryValues ¶ added in v0.12.0
func (p *GetStatusParams) QueryValues() url.Values
QueryValues converts GetStatusParams into url.Values.
type InternalServerError ¶ added in v0.10.0
type InternalServerError struct {
Errors InternalServerErrorErrors `json:"errors"`
}
500 Internal Server Error
func (*InternalServerError) Error ¶ added in v0.10.0
func (e *InternalServerError) Error() string
type InternalServerErrorErrors ¶ added in v0.10.0
type InternalServerErrorErrors struct {
// Fuller message giving context to error
Detail string `json:"detail"`
}
InternalServerErrorErrors is a schema definition.
type ListReaders200Response ¶
type ListReaders200Response struct {
Items []Reader `json:"items"`
}
ListReaders200Response is a schema definition.
type Metadata ¶ added in v0.13.0
Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata. Maximum of 64 parameters are allowed in the object. Max properties: 64
type NotFound ¶ added in v0.10.0
type NotFound struct {
Errors NotFoundErrors `json:"errors"`
}
404 Not Found
type NotFoundErrors ¶ added in v0.10.0
type NotFoundErrors struct {
// Fuller message giving context to error
Detail string `json:"detail"`
}
NotFoundErrors is a schema definition.
type Reader ¶
type Reader struct {
// The timestamp of when the reader was created.
CreatedAt time.Time `json:"created_at"`
// Information about the underlying physical device.
Device ReaderDevice `json:"device"`
// Unique identifier of the object.
//
// Note that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader)
// a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.
//
// Min length: 30
// Max length: 30
ID ReaderID `json:"id"`
// Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always
// submit whole metadata. Maximum of 64 parameters are allowed in the object.
// Max properties: 64
Metadata shared.Metadata `json:"metadata,omitempty"`
// Custom human-readable, user-defined name for easier identification of the reader.
// Max length: 500
Name ReaderName `json:"name"`
// The status of the reader object gives information about the current state of the reader.
//
// Possible values:
//
// - `unknown` - The reader status is unknown.
// - `processing` - The reader is created and waits for the physical device to confirm the pairing.
// - `paired` - The reader is paired with a merchant account and can be used with SumUp APIs.
// - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated.
Status ReaderStatus `json:"status"`
// The timestamp of when the reader was last updated.
UpdatedAt time.Time `json:"updated_at"`
}
A physical card reader device that can accept in-person payments.
type ReaderDevice ¶
type ReaderDevice struct {
// A unique identifier of the physical device (e.g. serial number).
Identifier string `json:"identifier"`
// Identifier of the model of the device.
Model ReaderDeviceModel `json:"model"`
}
Information about the underlying physical device.
type ReaderDeviceModel ¶
type ReaderDeviceModel string
Identifier of the model of the device.
const ( ReaderDeviceModelSolo ReaderDeviceModel = "solo" ReaderDeviceModelVirtualSolo ReaderDeviceModel = "virtual-solo" )
type ReaderID ¶ added in v0.11.0
type ReaderID string
Unique identifier of the object.
Note that this identifies the instance of the physical devices pairing with your SumUp account. If you [delete](https://developer.sumup.com/api/readers/delete-reader) a reader, and pair the device again, the ID will be different. Do not use this ID to refer to a physical device.
Min length: 30 Max length: 30
type ReaderName ¶
type ReaderName string
Custom human-readable, user-defined name for easier identification of the reader. Max length: 500
type ReaderPairingCode ¶
type ReaderPairingCode string
The pairing code is a 8 or 9 character alphanumeric string that is displayed on a SumUp Device after initiating the pairing. It is used to link the physical device to the created pairing. Min length: 8 Max length: 9
type ReaderStatus ¶
type ReaderStatus string
The status of the reader object gives information about the current state of the reader.
Possible values:
- `unknown` - The reader status is unknown. - `processing` - The reader is created and waits for the physical device to confirm the pairing. - `paired` - The reader is paired with a merchant account and can be used with SumUp APIs. - `expired` - The pairing is expired and no longer usable with the account. The resource needs to get recreated.
const ( ReaderStatusExpired ReaderStatus = "expired" ReaderStatusPaired ReaderStatus = "paired" ReaderStatusProcessing ReaderStatus = "processing" ReaderStatusUnknown ReaderStatus = "unknown" )
type StatusResponse ¶ added in v0.10.0
type StatusResponse struct {
Data StatusResponseData `json:"data"`
}
Status of a device
type StatusResponseData ¶ added in v0.10.0
type StatusResponseData struct {
// Battery level percentage
// Min: 0
// Max: 100
BatteryLevel *float32 `json:"battery_level,omitempty"`
// Battery temperature in Celsius
BatteryTemperature *int `json:"battery_temperature,omitempty"`
// Type of connection used by the device
ConnectionType *StatusResponseDataConnectionType `json:"connection_type,omitempty"`
// Firmware version of the device
FirmwareVersion *string `json:"firmware_version,omitempty"`
// Timestamp of the last activity from the device
LastActivity *time.Time `json:"last_activity,omitempty"`
// Latest state of the device
State *StatusResponseDataState `json:"state,omitempty"`
// Status of a device
Status StatusResponseDataStatus `json:"status"`
}
StatusResponseData is a schema definition.
type StatusResponseDataConnectionType ¶ added in v0.10.0
type StatusResponseDataConnectionType string
Type of connection used by the device
const ( StatusResponseDataConnectionTypeBtle StatusResponseDataConnectionType = "btle" StatusResponseDataConnectionTypeEdge StatusResponseDataConnectionType = "edge" StatusResponseDataConnectionTypeGprs StatusResponseDataConnectionType = "gprs" StatusResponseDataConnectionTypeLte StatusResponseDataConnectionType = "lte" StatusResponseDataConnectionTypeUmts StatusResponseDataConnectionType = "umts" StatusResponseDataConnectionTypeUsb StatusResponseDataConnectionType = "usb" StatusResponseDataConnectionTypeWiFi StatusResponseDataConnectionType = "Wi-Fi" )
type StatusResponseDataState ¶ added in v0.10.0
type StatusResponseDataState string
Latest state of the device
const ( StatusResponseDataStateIdle StatusResponseDataState = "IDLE" StatusResponseDataStateSelectingTip StatusResponseDataState = "SELECTING_TIP" StatusResponseDataStateUpdatingFirmware StatusResponseDataState = "UPDATING_FIRMWARE" StatusResponseDataStateWaitingForCard StatusResponseDataState = "WAITING_FOR_CARD" StatusResponseDataStateWaitingForPIN StatusResponseDataState = "WAITING_FOR_PIN" StatusResponseDataStateWaitingForSignature StatusResponseDataState = "WAITING_FOR_SIGNATURE" )
type StatusResponseDataStatus ¶ added in v0.10.0
type StatusResponseDataStatus string
Status of a device
const ( StatusResponseDataStatusOffline StatusResponseDataStatus = "OFFLINE" StatusResponseDataStatusOnline StatusResponseDataStatus = "ONLINE" )
type Unauthorized ¶ added in v0.10.0
type Unauthorized struct {
}
401 Unauthorized
func (*Unauthorized) Error ¶ added in v0.10.0
func (e *Unauthorized) Error() string
type UnauthorizedErrors ¶ added in v0.10.0
type UnauthorizedErrors struct {
Detail *string `json:"detail,omitempty"`
Type UnauthorizedErrorsType `json:"type"`
}
UnauthorizedErrors is a schema definition.
type UnauthorizedErrorsType ¶ added in v0.10.0
type UnauthorizedErrorsType string
Key indicating type of error
const ( )
type Update ¶ added in v0.12.0
type Update struct {
// Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always
// submit whole metadata. Maximum of 64 parameters are allowed in the object.
// Max properties: 64
Metadata shared.Metadata `json:"metadata,omitempty"`
// Custom human-readable, user-defined name for easier identification of the reader.
// Max length: 500
Name *ReaderName `json:"name,omitempty"`
}
Update is a schema definition.