shared

package
v0.0.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmountEvent

type AmountEvent float64

AmountEvent: Amount of the event.

type Attributes

type Attributes map[string]any

Attributes: Object attributes that modifiable only by SumUp applications.

type Currency

type Currency string

Currency: Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported currency values are enumerated above.

const (
	CurrencyBgn Currency = "BGN"
	CurrencyBrl Currency = "BRL"
	CurrencyChf Currency = "CHF"
	CurrencyClp Currency = "CLP"
	CurrencyCzk Currency = "CZK"
	CurrencyDkk Currency = "DKK"
	CurrencyEur Currency = "EUR"
	CurrencyGbp Currency = "GBP"
	CurrencyHrk Currency = "HRK"
	CurrencyHuf Currency = "HUF"
	CurrencyNok Currency = "NOK"
	CurrencyPln Currency = "PLN"
	CurrencyRon Currency = "RON"
	CurrencySek Currency = "SEK"
	CurrencyUsd Currency = "USD"
)

type Date

type Date struct{ time.Time }

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) String

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(b []byte) (err error)

type Error

type Error struct {
	// Platform code for the error.
	ErrorCode *string `json:"error_code,omitempty"`
	// Short description of the error.
	Message *string `json:"message,omitempty"`
}

Error: Error message structure.

func (*Error) Error

func (e *Error) Error() string

type ErrorForbidden

type ErrorForbidden struct {
	// Platform code for the error.
	ErrorCode *string `json:"error_code,omitempty"`
	// Short description of the error.
	ErrorMessage *string `json:"error_message,omitempty"`
	// HTTP status code for the error.
	StatusCode *string `json:"status_code,omitempty"`
}

ErrorForbidden: Error message for forbidden requests.

func (*ErrorForbidden) Error

func (e *ErrorForbidden) Error() string

type EventId

type EventId int64

EventId: Unique ID of the transaction event. Format: int64

type EventStatus

type EventStatus string

EventStatus: Status of the transaction event.

const (
	EventStatusFailed     EventStatus = "FAILED"
	EventStatusPaidOut    EventStatus = "PAID_OUT"
	EventStatusPending    EventStatus = "PENDING"
	EventStatusRefunded   EventStatus = "REFUNDED"
	EventStatusScheduled  EventStatus = "SCHEDULED"
	EventStatusSuccessful EventStatus = "SUCCESSFUL"
)

type EventType

type EventType string

EventType: Type of the transaction event.

const (
	EventTypeChargeBack      EventType = "CHARGE_BACK"
	EventTypePayout          EventType = "PAYOUT"
	EventTypePayoutDeduction EventType = "PAYOUT_DEDUCTION"
	EventTypeRefund          EventType = "REFUND"
)

type Invite

type Invite struct {
	// Email address of the invited user.
	// Format: email
	Email     string    `json:"email"`
	ExpiresAt time.Time `json:"expires_at"`
}

Invite: Pending invitation for membership.

type MandateResponse

type MandateResponse struct {
	// Merchant code which has the mandate
	MerchantCode *string `json:"merchant_code,omitempty"`
	// Mandate status
	Status *string `json:"status,omitempty"`
	// Indicates the mandate type
	Type *string `json:"type,omitempty"`
}

MandateResponse: Created mandate

type MembershipStatus

type MembershipStatus string

MembershipStatus: The status of the membership.

const (
	MembershipStatusAccepted MembershipStatus = "accepted"
	MembershipStatusDisabled MembershipStatus = "disabled"
	MembershipStatusExpired  MembershipStatus = "expired"
	MembershipStatusPending  MembershipStatus = "pending"
	MembershipStatusUnknown  MembershipStatus = "unknown"
)

type Metadata

type Metadata map[string]any

Metadata: Set of user-defined key-value pairs attached to the object. Partial updates are not supported. When updating, always submit whole metadata.

type Time

type Time struct{ time.Time }

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) (err error)

type TimestampEvent

type TimestampEvent string

TimestampEvent: Date and time of the transaction event.

type TransactionId

type TransactionId string

TransactionId: Unique ID of the transaction.

type TransactionMixinBase

type TransactionMixinBase struct {
	// Total amount of the transaction.
	Amount *float64 `json:"amount,omitempty"`
	// Three-letter [ISO4217](https://en.wikipedia.org/wiki/ISO_4217) code of the currency for the amount. Currently supported
	// currency values are enumerated above.
	Currency *Currency `json:"currency,omitempty"`
	// Unique ID of the transaction.
	Id *string `json:"id,omitempty"`
	// Current number of the installment for deferred payments.
	// Min: 1
	InstallmentsCount *int `json:"installments_count,omitempty"`
	// Payment type used for the transaction.
	PaymentType *TransactionMixinBasePaymentType `json:"payment_type,omitempty"`
	// Current status of the transaction.
	Status *TransactionMixinBaseStatus `json:"status,omitempty"`
	// Date and time of the creation of the transaction. Response format expressed according to [ISO8601](https://en.wikipedia.org/wiki/ISO_8601) code.
	Timestamp *time.Time `json:"timestamp,omitempty"`
	// Transaction code returned by the acquirer/processing entity after processing the transaction.
	TransactionCode *string `json:"transaction_code,omitempty"`
}

TransactionMixinBase: Details of the transaction.

type TransactionMixinBasePaymentType

type TransactionMixinBasePaymentType string

TransactionMixinBasePaymentType: Payment type used for the transaction.

const (
	TransactionMixinBasePaymentTypeBoleto    TransactionMixinBasePaymentType = "BOLETO"
	TransactionMixinBasePaymentTypeEcom      TransactionMixinBasePaymentType = "ECOM"
	TransactionMixinBasePaymentTypeRecurring TransactionMixinBasePaymentType = "RECURRING"
)

type TransactionMixinBaseStatus

type TransactionMixinBaseStatus string

TransactionMixinBaseStatus: Current status of the transaction.

const (
	TransactionMixinBaseStatusCancelled  TransactionMixinBaseStatus = "CANCELLED"
	TransactionMixinBaseStatusFailed     TransactionMixinBaseStatus = "FAILED"
	TransactionMixinBaseStatusPending    TransactionMixinBaseStatus = "PENDING"
	TransactionMixinBaseStatusSuccessful TransactionMixinBaseStatus = "SUCCESSFUL"
)

type TransactionMixinCheckout

type TransactionMixinCheckout struct {
	// Authorization code for the transaction sent by the payment card issuer or bank. Applicable only to card payments.
	AuthCode *string `json:"auth_code,omitempty"`
	// Entry mode of the payment details.
	EntryMode *TransactionMixinCheckoutEntryMode `json:"entry_mode,omitempty"`
	// Internal unique ID of the transaction on the SumUp platform.
	InternalId *int `json:"internal_id,omitempty"`
	// Unique code of the registered merchant to whom the payment is made.
	MerchantCode *string `json:"merchant_code,omitempty"`
	// Amount of the tip (out of the total transaction amount).
	TipAmount *float64 `json:"tip_amount,omitempty"`
	// Amount of the applicable VAT (out of the total transaction amount).
	VatAmount *float64 `json:"vat_amount,omitempty"`
}

TransactionMixinCheckout is a schema definition.

type TransactionMixinCheckoutEntryMode

type TransactionMixinCheckoutEntryMode string

TransactionMixinCheckoutEntryMode: Entry mode of the payment details.

const (
	TransactionMixinCheckoutEntryModeBoleto        TransactionMixinCheckoutEntryMode = "BOLETO"
	TransactionMixinCheckoutEntryModeCustomerEntry TransactionMixinCheckoutEntryMode = "CUSTOMER_ENTRY"
)

Jump to

Keyboard shortcuts

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