processout

package module
v4.38.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 11 Imported by: 0

README

ProcessOut Go

GoDoc

Installation

go get gopkg.in/processout.v4

Versioning

Versioning is done using gopkg.in, available at gopkg.in/processout.v4.

Documentation

Overview

Package processout offers bindings for the ProcessOut API — https://www.processout.com The full documentation of the API, along with Go examples, can be found on our website: https://docs.processout.com It is recommended to use the versionned version of the package (with the import path that starts with gopkg.in) instead of the GitHub repository. To get started, you just need your API credentials, that you can find in your project's settings. Here is a simple example that creates an invoice and prints its URL:

 p := processout.New("<project-id>", "<project-secret>")
 iv, err := p.NewInvoice(&processout.Invoice{
	Name:     "Test item",
	Amount:   "10.00",
	Currency: "USD",
 }).Create()
 if err != nil {
	panic(err)
 }
 fmt.Println(iv.URL)

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestAPIVersion is the default version of the API used in requests
	// made with this package
	RequestAPIVersion = "1.4.0.0"
	// Host is the URL where API requests are made
	Host = "https://api.processout.com"

	// DefaultClient sets the HTTP default client used for ProcessOut clients
	DefaultClient = &http.Client{
		Timeout: time.Second * 95,
	}
)

Functions

func Bool added in v4.1.0

func Bool(b bool) *bool

Bool returns the pointer to the bool value

func Float64 added in v4.1.0

func Float64(f float64) *float64

Float64 returns the pointer to the float value

func Int64 added in v4.1.0

func Int64(i int64) *int64

Int64 returns the pointer to the integer value

func String added in v4.1.0

func String(s string) *string

String returns the pointer to the string value

func Time added in v4.1.0

func Time(t time.Time) *time.Time

Time returns the pointer to the time value

func ToBool added in v4.2.3

func ToBool(b *bool) bool

ToBool returns the value of the bool pointer, or false

func ToFloat64 added in v4.2.3

func ToFloat64(f *float64) float64

ToFloat64 returns the value of the float64 pointer, or 0

func ToInt64 added in v4.2.3

func ToInt64(i *int64) int64

ToInt64 returns the value of the int64 pointer, or 0

func ToString added in v4.2.3

func ToString(s *string) string

ToString returns the value of the string pointer, or an empty string

func ToTime added in v4.2.3

func ToTime(t *time.Time) time.Time

ToTime returns the value of the time pointer, or an empty time.Time struct

Types

type APIVersion

type APIVersion struct {
	// Name is the name used to identify the API version
	Name *string `json:"name,omitempty"`
	// Description is the description of the API version. Can contain a changelog
	Description *string `json:"description,omitempty"`
	// CreatedAt is the date at which the API version was released
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

APIVersion represents the APIVersion API object

func (*APIVersion) Prefill

func (s *APIVersion) Prefill(c *APIVersion) *APIVersion

Prefil prefills the object with data provided in the parameter

func (*APIVersion) SetClient

func (s *APIVersion) SetClient(c *ProcessOut) *APIVersion

SetClient sets the client for the APIVersion object and its children

type Activity

type Activity struct {
	// ID is the iD of the activity
	ID *string `json:"id,omitempty"`
	// Project is the project to which the activity belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the activity belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Title is the title of the activity
	Title *string `json:"title,omitempty"`
	// Content is the content of the activity
	Content *string `json:"content,omitempty"`
	// Level is the level of the activity
	Level *int `json:"level,omitempty"`
	// CreatedAt is the date at which the transaction was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Activity represents the Activity API object

func (Activity) All

func (s Activity) All(options ...ActivityAllParameters) (*Iterator, error)

All allows you to get all the project activities.

func (Activity) Find

func (s Activity) Find(activityID string, options ...ActivityFindParameters) (*Activity, error)

Find allows you to find a specific activity and fetch its data.

func (*Activity) GetID added in v4.1.0

func (s *Activity) GetID() string

GetID implements the Identiable interface

func (*Activity) Prefill

func (s *Activity) Prefill(c *Activity) *Activity

Prefil prefills the object with data provided in the parameter

func (*Activity) SetClient

func (s *Activity) SetClient(c *ProcessOut) *Activity

SetClient sets the client for the Activity object and its children

type ActivityAllParameters

type ActivityAllParameters struct {
	*Options
	*Activity
}

ActivityAllParameters is the structure representing the additional parameters used to call Activity.All

type ActivityFindParameters

type ActivityFindParameters struct {
	*Options
	*Activity
}

ActivityFindParameters is the structure representing the additional parameters used to call Activity.Find

type Addon

type Addon struct {
	// ID is the iD of the addon
	ID *string `json:"id,omitempty"`
	// Project is the project to which the addon belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the addon belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Subscription is the subscription to which the addon belongs
	Subscription *Subscription `json:"subscription,omitempty"`
	// SubscriptionID is the iD of the subscription to which the addon belongs
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// Plan is the plan used to create the addon, if any
	Plan *Plan `json:"plan,omitempty"`
	// PlanID is the iD of the plan used to create the addon, if any
	PlanID *string `json:"plan_id,omitempty"`
	// Type is the type of the addon. Can be either metered or recurring
	Type *string `json:"type,omitempty"`
	// Name is the name of the addon
	Name *string `json:"name,omitempty"`
	// Amount is the amount of the addon
	Amount *string `json:"amount,omitempty"`
	// Quantity is the quantity of the addon
	Quantity *int `json:"quantity,omitempty"`
	// Metadata is the metadata related to the addon, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Sandbox is the define whether or not the addon is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the addon was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Addon represents the Addon API object

func (Addon) Create added in v4.1.0

func (s Addon) Create(options ...AddonCreateParameters) (*Addon, error)

Create allows you to create a new addon to the given subscription ID.

func (Addon) Delete added in v4.1.0

func (s Addon) Delete(options ...AddonDeleteParameters) error

Delete allows you to delete an addon applied to a subscription.

func (Addon) FetchSubscriptionAddons added in v4.1.0

func (s Addon) FetchSubscriptionAddons(subscriptionID string, options ...AddonFetchSubscriptionAddonsParameters) (*Iterator, error)

FetchSubscriptionAddons allows you to get the addons applied to the subscription.

func (Addon) Find

func (s Addon) Find(subscriptionID, addonID string, options ...AddonFindParameters) (*Addon, error)

Find allows you to find a subscription's addon by its ID.

func (*Addon) GetID added in v4.1.0

func (s *Addon) GetID() string

GetID implements the Identiable interface

func (*Addon) Prefill

func (s *Addon) Prefill(c *Addon) *Addon

Prefil prefills the object with data provided in the parameter

func (Addon) Save

func (s Addon) Save(options ...AddonSaveParameters) (*Addon, error)

Save allows you to save the updated addon attributes.

func (*Addon) SetClient

func (s *Addon) SetClient(c *ProcessOut) *Addon

SetClient sets the client for the Addon object and its children

type AddonCreateParameters added in v4.1.0

type AddonCreateParameters struct {
	*Options
	*Addon
	Prorate       interface{} `json:"prorate"`
	ProrationDate interface{} `json:"proration_date"`
	Preview       interface{} `json:"preview"`
}

AddonCreateParameters is the structure representing the additional parameters used to call Addon.Create

type AddonDeleteParameters added in v4.1.0

type AddonDeleteParameters struct {
	*Options
	*Addon
	Prorate       interface{} `json:"prorate"`
	ProrationDate interface{} `json:"proration_date"`
	Preview       interface{} `json:"preview"`
}

AddonDeleteParameters is the structure representing the additional parameters used to call Addon.Delete

type AddonFetchSubscriptionAddonsParameters added in v4.1.0

type AddonFetchSubscriptionAddonsParameters struct {
	*Options
	*Addon
}

AddonFetchSubscriptionAddonsParameters is the structure representing the additional parameters used to call Addon.FetchSubscriptionAddons

type AddonFindParameters

type AddonFindParameters struct {
	*Options
	*Addon
}

AddonFindParameters is the structure representing the additional parameters used to call Addon.Find

type AddonSaveParameters

type AddonSaveParameters struct {
	*Options
	*Addon
	Prorate             interface{} `json:"prorate"`
	ProrationDate       interface{} `json:"proration_date"`
	Preview             interface{} `json:"preview"`
	IncrementQuantityBy interface{} `json:"increment_quantity_by"`
}

AddonSaveParameters is the structure representing the additional parameters used to call Addon.Save

type AlternativeMerchantCertificate added in v4.25.0

type AlternativeMerchantCertificate struct {
	// ID is the id of the alternative merchant certificate
	ID *string `json:"id,omitempty"`
	// contains filtered or unexported fields
}

AlternativeMerchantCertificate represents the AlternativeMerchantCertificate API object

func (AlternativeMerchantCertificate) Delete added in v4.27.0

Delete allows you to delete a given alternative merchant certificate

func (*AlternativeMerchantCertificate) GetID added in v4.25.0

GetID implements the Identiable interface

func (*AlternativeMerchantCertificate) Prefill added in v4.25.0

Prefil prefills the object with data provided in the parameter

func (AlternativeMerchantCertificate) Save added in v4.25.0

Save allows you to save new alternative apple pay certificates

func (*AlternativeMerchantCertificate) SetClient added in v4.25.0

SetClient sets the client for the AlternativeMerchantCertificate object and its children

type AlternativeMerchantCertificateDeleteParameters added in v4.27.0

type AlternativeMerchantCertificateDeleteParameters struct {
	*Options
	*AlternativeMerchantCertificate
}

AlternativeMerchantCertificateDeleteParameters is the structure representing the additional parameters used to call AlternativeMerchantCertificate.Delete

type AlternativeMerchantCertificateSaveParameters added in v4.25.0

type AlternativeMerchantCertificateSaveParameters struct {
	*Options
	*AlternativeMerchantCertificate
}

AlternativeMerchantCertificateSaveParameters is the structure representing the additional parameters used to call AlternativeMerchantCertificate.Save

type ApplePayAlternativeMerchantCertificates added in v4.25.0

type ApplePayAlternativeMerchantCertificates struct {
	// Count is the number of alternative merchant certificate
	Count *string `json:"count,omitempty"`
	// AlternativeMerchantCertificates is the alternative merchant certificates available
	AlternativeMerchantCertificates *[]*AlternativeMerchantCertificate `json:"alternative_merchant_certificates,omitempty"`
	// contains filtered or unexported fields
}

ApplePayAlternativeMerchantCertificates represents the ApplePayAlternativeMerchantCertificates API object

func (ApplePayAlternativeMerchantCertificates) Fetch added in v4.25.0

Fetch allows you to fetch the project's alternative certificates by ID

func (*ApplePayAlternativeMerchantCertificates) Prefill added in v4.25.0

Prefil prefills the object with data provided in the parameter

func (*ApplePayAlternativeMerchantCertificates) SetClient added in v4.25.0

SetClient sets the client for the ApplePayAlternativeMerchantCertificates object and its children

type ApplePayAlternativeMerchantCertificatesFetchParameters added in v4.25.0

type ApplePayAlternativeMerchantCertificatesFetchParameters struct {
	*Options
	*ApplePayAlternativeMerchantCertificates
}

ApplePayAlternativeMerchantCertificatesFetchParameters is the structure representing the additional parameters used to call ApplePayAlternativeMerchantCertificates.Fetch

type Balance added in v4.22.0

type Balance struct {
	// Amount is the amount available
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency the balance is in
	Currency *string `json:"currency,omitempty"`
	// Expiry is the expiry time of the voucher
	Expiry *time.Time `json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

Balance represents the Balance API object

func (*Balance) Prefill added in v4.22.0

func (s *Balance) Prefill(c *Balance) *Balance

Prefil prefills the object with data provided in the parameter

func (*Balance) SetClient added in v4.22.0

func (s *Balance) SetClient(c *ProcessOut) *Balance

SetClient sets the client for the Balance object and its children

type Balances added in v4.22.0

type Balances struct {
	// Vouchers is the vouchers linked to the customer
	Vouchers *[]*Balance `json:"vouchers,omitempty"`
	// contains filtered or unexported fields
}

Balances represents the Balances API object

func (Balances) Find added in v4.22.0

func (s Balances) Find(tokenID string, options ...BalancesFindParameters) (*Balances, error)

Find allows you to fetch a customer token's balance

func (*Balances) Prefill added in v4.22.0

func (s *Balances) Prefill(c *Balances) *Balances

Prefil prefills the object with data provided in the parameter

func (*Balances) SetClient added in v4.22.0

func (s *Balances) SetClient(c *ProcessOut) *Balances

SetClient sets the client for the Balances object and its children

type BalancesFindParameters added in v4.22.0

type BalancesFindParameters struct {
	*Options
	*Balances
}

BalancesFindParameters is the structure representing the additional parameters used to call Balances.Find

type Card

type Card struct {
	// ID is the iD of the card
	ID *string `json:"id,omitempty"`
	// Project is the project to which the card belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the card belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Token is the token linked to the card, which can be used to process payments
	Token *Token `json:"token,omitempty"`
	// Scheme is the scheme of the card, such as visa or mastercard
	Scheme *string `json:"scheme,omitempty"`
	// CoScheme is the co-scheme of the card, such as carte bancaire
	CoScheme *string `json:"co_scheme,omitempty"`
	// PreferredScheme is the customer preferred scheme, such as carte bancaire vs visa
	PreferredScheme *string `json:"preferred_scheme,omitempty"`
	// Type is the type of the card (Credit, Debit, ...)
	Type *string `json:"type,omitempty"`
	// BankName is the name of the bank of the card
	BankName *string `json:"bank_name,omitempty"`
	// Brand is the level of the card (Electron, Classic, Gold, ...)
	Brand *string `json:"brand,omitempty"`
	// Category is the category of the card (consumer, commercial, ...)
	Category *string `json:"category,omitempty"`
	// Iin is the first 6 digits of the card
	Iin *string `json:"iin,omitempty"`
	// Last4Digits is the last 4 digits of the card
	Last4Digits *string `json:"last_4_digits,omitempty"`
	// ExpMonth is the expiry month
	ExpMonth *int `json:"exp_month,omitempty"`
	// ExpYear is the expiry year, in a 4 digits format
	ExpYear *int `json:"exp_year,omitempty"`
	// CvcCheck is the status of the CVC check initially made on the card when the CVC was provided
	CvcCheck *string `json:"cvc_check,omitempty"`
	// AvsCheck is the status of the AVS check initially made on the card when the AVS was provided
	AvsCheck *string `json:"avs_check,omitempty"`
	// Name is the name of the card holder
	Name *string `json:"name,omitempty"`
	// Address1 is the address line of the card holder
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address line of the card holder
	Address2 *string `json:"address2,omitempty"`
	// City is the city of the card holder
	City *string `json:"city,omitempty"`
	// State is the state of the card holder
	State *string `json:"state,omitempty"`
	// Zip is the zIP code of the card holder
	Zip *string `json:"zip,omitempty"`
	// CountryCode is the country code of the card holder (ISO-3166, 2 characters format)
	CountryCode *string `json:"country_code,omitempty"`
	// IpAddress is the iP address of the card (IPv4 or IPv6)
	IpAddress *string `json:"ip_address,omitempty"`
	// Fingerprint is the fingerprint of the card (stays the same if the same card gets tokenized multiple times). Scoped per ProcessOut project
	Fingerprint *string `json:"fingerprint,omitempty"`
	// TokenType is the this field defines if the card was tokenized with a 3rd party tokenization method such as applepay
	TokenType *string `json:"token_type,omitempty"`
	// Used is the contains true if the card was used to create a customer token or a direct transaction, false otherwise
	Used *bool `json:"used,omitempty"`
	// HasBeenAuthorized is the contains true if the card was successfully authorized, false otherwise
	HasBeenAuthorized *bool `json:"has_been_authorized,omitempty"`
	// Metadata is the metadata related to the card, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// ExpiresSoon is the contains true if the card will expire soon, false otherwise
	ExpiresSoon *bool `json:"expires_soon,omitempty"`
	// Sandbox is the define whether or not the card is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the card was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Card represents the Card API object

func (Card) All

func (s Card) All(options ...CardAllParameters) (*Iterator, error)

All allows you to get all the cards.

func (Card) Anonymize added in v4.20.1

func (s Card) Anonymize(options ...CardAnonymizeParameters) error

Anonymize allows you to anonymize the card.

func (Card) Find

func (s Card) Find(cardID string, options ...CardFindParameters) (*Card, error)

Find allows you to find a card by its ID.

func (*Card) GetID added in v4.1.0

func (s *Card) GetID() string

GetID implements the Identiable interface

func (*Card) Prefill

func (s *Card) Prefill(c *Card) *Card

Prefil prefills the object with data provided in the parameter

func (*Card) SetClient

func (s *Card) SetClient(c *ProcessOut) *Card

SetClient sets the client for the Card object and its children

type CardAllParameters

type CardAllParameters struct {
	*Options
	*Card
}

CardAllParameters is the structure representing the additional parameters used to call Card.All

type CardAnonymizeParameters added in v4.20.1

type CardAnonymizeParameters struct {
	*Options
	*Card
}

CardAnonymizeParameters is the structure representing the additional parameters used to call Card.Anonymize

type CardContact added in v4.36.0

type CardContact struct {
	// Address1 is the address line of the card holder
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address line of the card holder
	Address2 *string `json:"address2,omitempty"`
	// City is the city of the card holder
	City *string `json:"city,omitempty"`
	// State is the state of the card holder
	State *string `json:"state,omitempty"`
	// CountryCode is the country code of the card holder (ISO-3166, 2 characters format)
	CountryCode *string `json:"country_code,omitempty"`
	// Zip is the zIP code of the card holder
	Zip *string `json:"zip,omitempty"`
	// contains filtered or unexported fields
}

CardContact represents the CardContact API object

func (*CardContact) Prefill added in v4.36.0

func (s *CardContact) Prefill(c *CardContact) *CardContact

Prefil prefills the object with data provided in the parameter

func (*CardContact) SetClient added in v4.36.0

func (s *CardContact) SetClient(c *ProcessOut) *CardContact

SetClient sets the client for the CardContact object and its children

type CardCreateRequest added in v4.36.0

type CardCreateRequest struct {
	// Device is the device used to create the card
	Device *Device `json:"device,omitempty"`
	// Name is the cardholder name
	Name *string `json:"name,omitempty"`
	// Number is the card PAN (raw)
	Number *string `json:"number,omitempty"`
	// ExpDay is the card expiration day. Used for Apple Pay
	ExpDay *string `json:"exp_day,omitempty"`
	// ExpMonth is the card expiration month
	ExpMonth *string `json:"exp_month,omitempty"`
	// ExpYear is the card expiration year
	ExpYear *string `json:"exp_year,omitempty"`
	// Cvc2 is the cVC2
	Cvc2 *string `json:"cvc2,omitempty"`
	// PreferredScheme is the preferred card scheme
	PreferredScheme *string `json:"preferred_scheme,omitempty"`
	// Metadata is the metadata related to the card, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// TokenType is the this field defines if the card was tokenized with a 3rd party tokenization method: applepay, googlepay
	TokenType *string `json:"token_type,omitempty"`
	// Eci is the eCI indicator. Used if the card was tokenized with a 3rd party tokenization method
	Eci *string `json:"eci,omitempty"`
	// Cryptogram is the cryptogram (Base64-encoded). Used if the card was tokenized with a 3rd party tokenization method
	Cryptogram *string `json:"cryptogram,omitempty"`
	// ApplepayResponse is the raw ApplePay card tokenization response. Used if the card was tokenized with a 3rd party tokenization method
	ApplepayResponse *string `json:"applepay_response,omitempty"`
	// ApplepayMid is the applePay MID. Used if the card was tokenized with a 3rd party tokenization method
	ApplepayMid *string `json:"applepay_mid,omitempty"`
	// PaymentToken is the google payment token. Used if the card was tokenized with a 3rd party tokenization method
	PaymentToken *string `json:"payment_token,omitempty"`
	// Contact is the cardholder contact information
	Contact *CardContact `json:"contact,omitempty"`
	// Shipping is the cardholder shipping information
	Shipping *CardShipping `json:"shipping,omitempty"`
	// contains filtered or unexported fields
}

CardCreateRequest represents the CardCreateRequest API object

func (CardCreateRequest) Create added in v4.36.0

Create allows you to create a new card.

func (*CardCreateRequest) Prefill added in v4.36.0

Prefil prefills the object with data provided in the parameter

func (*CardCreateRequest) SetClient added in v4.36.0

SetClient sets the client for the CardCreateRequest object and its children

type CardCreateRequestCreateParameters added in v4.36.0

type CardCreateRequestCreateParameters struct {
	*Options
	*CardCreateRequest
}

CardCreateRequestCreateParameters is the structure representing the additional parameters used to call CardCreateRequest.Create

type CardFindParameters

type CardFindParameters struct {
	*Options
	*Card
}

CardFindParameters is the structure representing the additional parameters used to call Card.Find

type CardInformation

type CardInformation struct {
	// Iin is the first 6 digits of the card
	Iin *string `json:"iin,omitempty"`
	// Scheme is the scheme of the card, such as visa or mastercard
	Scheme *string `json:"scheme,omitempty"`
	// Type is the type of the card (Credit, Debit, ...)
	Type *string `json:"type,omitempty"`
	// BankName is the name of the bank of the card
	BankName *string `json:"bank_name,omitempty"`
	// Brand is the level of the card (Electron, Classic, Gold, ...)
	Brand *string `json:"brand,omitempty"`
	// Category is the category of the card (consumer, commercial, ...)
	Category *string `json:"category,omitempty"`
	// Country is the country that issued the card
	Country *string `json:"country,omitempty"`
	// contains filtered or unexported fields
}

CardInformation represents the CardInformation API object

func (CardInformation) Fetch

Fetch allows you to fetch card information from the IIN.

func (*CardInformation) Prefill

Prefil prefills the object with data provided in the parameter

func (*CardInformation) SetClient

func (s *CardInformation) SetClient(c *ProcessOut) *CardInformation

SetClient sets the client for the CardInformation object and its children

type CardInformationFetchParameters

type CardInformationFetchParameters struct {
	*Options
	*CardInformation
}

CardInformationFetchParameters is the structure representing the additional parameters used to call CardInformation.Fetch

type CardShipping added in v4.36.0

type CardShipping struct {
	// Address1 is the address line of the card holder
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address line of the card holder
	Address2 *string `json:"address2,omitempty"`
	// City is the city of the card holder
	City *string `json:"city,omitempty"`
	// State is the state of the card holder
	State *string `json:"state,omitempty"`
	// CountryCode is the country code of the card holder (ISO-3166, 2 characters format)
	CountryCode *string `json:"country_code,omitempty"`
	// Zip is the zIP code of the card holder
	Zip *string `json:"zip,omitempty"`
	// Phone is the shipping phone number
	Phone *Phone `json:"phone,omitempty"`
	// contains filtered or unexported fields
}

CardShipping represents the CardShipping API object

func (*CardShipping) Prefill added in v4.36.0

func (s *CardShipping) Prefill(c *CardShipping) *CardShipping

Prefil prefills the object with data provided in the parameter

func (*CardShipping) SetClient added in v4.36.0

func (s *CardShipping) SetClient(c *ProcessOut) *CardShipping

SetClient sets the client for the CardShipping object and its children

type CardUpdateRequest added in v4.36.0

type CardUpdateRequest struct {
	// UpdateType is the card update type. Possible values: "new-cvc2" or "other"
	UpdateType *string `json:"update_type,omitempty"`
	// UpdateReason is the card update reason.
	UpdateReason *string `json:"update_reason,omitempty"`
	// PreferredScheme is the customer preferred scheme, such as carte bancaire vs visa
	PreferredScheme *string `json:"preferred_scheme,omitempty"`
	// contains filtered or unexported fields
}

CardUpdateRequest represents the CardUpdateRequest API object

func (*CardUpdateRequest) Prefill added in v4.36.0

Prefil prefills the object with data provided in the parameter

func (*CardUpdateRequest) SetClient added in v4.36.0

SetClient sets the client for the CardUpdateRequest object and its children

func (CardUpdateRequest) Update added in v4.36.0

Update allows you to update a card by its ID.

type CardUpdateRequestUpdateParameters added in v4.36.0

type CardUpdateRequestUpdateParameters struct {
	*Options
	*CardUpdateRequest
}

CardUpdateRequestUpdateParameters is the structure representing the additional parameters used to call CardUpdateRequest.Update

type CategoryErrorCodes added in v4.32.2

type CategoryErrorCodes struct {
	// Generic is the generic error codes.
	Generic *[]string `json:"generic,omitempty"`
	// Service is the service related error codes.
	Service *[]string `json:"service,omitempty"`
	// Gateway is the gateway related error codes.
	Gateway *[]string `json:"gateway,omitempty"`
	// Card is the card related error codes.
	Card *[]string `json:"card,omitempty"`
	// Check is the check related error codes.
	Check *[]string `json:"check,omitempty"`
	// Shipping is the shipping related error codes.
	Shipping *[]string `json:"shipping,omitempty"`
	// Customer is the customer related error codes.
	Customer *[]string `json:"customer,omitempty"`
	// Payment is the payment related error codes.
	Payment *[]string `json:"payment,omitempty"`
	// Refund is the refund related error codes.
	Refund *[]string `json:"refund,omitempty"`
	// Wallet is the wallet related error codes.
	Wallet *[]string `json:"wallet,omitempty"`
	// Request is the request related error codes.
	Request *[]string `json:"request,omitempty"`
	// contains filtered or unexported fields
}

CategoryErrorCodes represents the CategoryErrorCodes API object

func (*CategoryErrorCodes) Prefill added in v4.32.2

Prefil prefills the object with data provided in the parameter

func (*CategoryErrorCodes) SetClient added in v4.32.2

SetClient sets the client for the CategoryErrorCodes object and its children

type Coupon

type Coupon struct {
	// ID is the iD of the coupon
	ID *string `json:"id,omitempty"`
	// Project is the project to which the coupon belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the coupon belongs
	ProjectID *string `json:"project_id,omitempty"`
	// AmountOff is the amount to be removed from the subscription price
	AmountOff *string `json:"amount_off,omitempty"`
	// PercentOff is the percent of the subscription amount to be removed (integer between 0 and 100)
	PercentOff *int `json:"percent_off,omitempty"`
	// Currency is the currency of the coupon amount_off
	Currency *string `json:"currency,omitempty"`
	// IterationCount is the number billing cycles the coupon will last when applied to a subscription. If 0, will last forever
	IterationCount *int `json:"iteration_count,omitempty"`
	// MaxRedemptions is the number of time the coupon can be redeemed. If 0, there's no limit
	MaxRedemptions *int `json:"max_redemptions,omitempty"`
	// ExpiresAt is the date at which the coupon will expire
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// Metadata is the metadata related to the coupon, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// RedeemedNumber is the number of times the coupon was already redeemed
	RedeemedNumber *int `json:"redeemed_number,omitempty"`
	// Sandbox is the true if the coupon was created in the sandbox environment, false otherwise
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the coupon was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Coupon represents the Coupon API object

func (Coupon) All

func (s Coupon) All(options ...CouponAllParameters) (*Iterator, error)

All allows you to get all the coupons.

func (Coupon) Create

func (s Coupon) Create(options ...CouponCreateParameters) (*Coupon, error)

Create allows you to create a new coupon.

func (Coupon) Delete

func (s Coupon) Delete(options ...CouponDeleteParameters) error

Delete allows you to delete the coupon.

func (Coupon) Find

func (s Coupon) Find(couponID string, options ...CouponFindParameters) (*Coupon, error)

Find allows you to find a coupon by its ID.

func (*Coupon) GetID added in v4.1.0

func (s *Coupon) GetID() string

GetID implements the Identiable interface

func (*Coupon) Prefill

func (s *Coupon) Prefill(c *Coupon) *Coupon

Prefil prefills the object with data provided in the parameter

func (Coupon) Save

func (s Coupon) Save(options ...CouponSaveParameters) (*Coupon, error)

Save allows you to save the updated coupon attributes.

func (*Coupon) SetClient

func (s *Coupon) SetClient(c *ProcessOut) *Coupon

SetClient sets the client for the Coupon object and its children

type CouponAllParameters

type CouponAllParameters struct {
	*Options
	*Coupon
}

CouponAllParameters is the structure representing the additional parameters used to call Coupon.All

type CouponCreateParameters

type CouponCreateParameters struct {
	*Options
	*Coupon
}

CouponCreateParameters is the structure representing the additional parameters used to call Coupon.Create

type CouponDeleteParameters

type CouponDeleteParameters struct {
	*Options
	*Coupon
}

CouponDeleteParameters is the structure representing the additional parameters used to call Coupon.Delete

type CouponFindParameters

type CouponFindParameters struct {
	*Options
	*Coupon
}

CouponFindParameters is the structure representing the additional parameters used to call Coupon.Find

type CouponSaveParameters

type CouponSaveParameters struct {
	*Options
	*Coupon
}

CouponSaveParameters is the structure representing the additional parameters used to call Coupon.Save

type Customer

type Customer struct {
	// ID is the iD of the customer
	ID *string `json:"id,omitempty"`
	// Project is the project to which the customer belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the customer belongs
	ProjectID *string `json:"project_id,omitempty"`
	// DefaultToken is the default token of the customer
	DefaultToken *Token `json:"default_token,omitempty"`
	// DefaultTokenID is the iD of the default token of the customer
	DefaultTokenID *string `json:"default_token_id,omitempty"`
	// Tokens is the list of the customer tokens
	Tokens *[]*Token `json:"tokens,omitempty"`
	// Subscriptions is the list of the customer subscriptions
	Subscriptions *[]*Subscription `json:"subscriptions,omitempty"`
	// Transactions is the list of the customer transactions
	Transactions *[]*Transaction `json:"transactions,omitempty"`
	// Balance is the customer balance. Can be positive or negative
	Balance *string `json:"balance,omitempty"`
	// Currency is the currency of the customer balance. Once the currency is set it cannot be modified
	Currency *string `json:"currency,omitempty"`
	// Email is the email of the customer
	Email *string `json:"email,omitempty"`
	// FirstName is the first name of the customer
	FirstName *string `json:"first_name,omitempty"`
	// LastName is the last name of the customer
	LastName *string `json:"last_name,omitempty"`
	// Address1 is the address of the customer
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address of the customer
	Address2 *string `json:"address2,omitempty"`
	// City is the city of the customer
	City *string `json:"city,omitempty"`
	// State is the state of the customer
	State *string `json:"state,omitempty"`
	// Zip is the zIP code of the customer
	Zip *string `json:"zip,omitempty"`
	// CountryCode is the country code of the customer (ISO-3166, 2 characters format)
	CountryCode *string `json:"country_code,omitempty"`
	// IpAddress is the iP address of the customer (IPv4 or IPv6)
	IpAddress *string `json:"ip_address,omitempty"`
	// PhoneNumber is the customer full phone number, consisting of a combined dialing code and phone number
	PhoneNumber *string `json:"phone_number,omitempty"`
	// Phone is the customer phone number
	Phone *CustomerPhone `json:"phone,omitempty"`
	// LegalDocument is the legal document number
	LegalDocument *string `json:"legal_document,omitempty"`
	// Sex is the sex of the customer
	Sex *string `json:"sex,omitempty"`
	// IsBusiness is the define whether or not the customer is a business
	IsBusiness *bool `json:"is_business,omitempty"`
	// Metadata is the metadata related to the customer, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Sandbox is the define whether or not the customer is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the customer was created at ProcessOut
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// RegisteredAt is the date at which the customer was registered on your platform
	RegisteredAt *time.Time `json:"registered_at,omitempty"`
	// DateOfBirth is the date of birth of the customer
	DateOfBirth *time.Time `json:"date_of_birth,omitempty"`
	// contains filtered or unexported fields
}

Customer represents the Customer API object

func (Customer) All

func (s Customer) All(options ...CustomerAllParameters) (*Iterator, error)

All allows you to get all the customers.

func (Customer) Create

func (s Customer) Create(options ...CustomerCreateParameters) (*Customer, error)

Create allows you to create a new customer.

func (Customer) Delete

func (s Customer) Delete(options ...CustomerDeleteParameters) error

Delete allows you to delete the customer.

func (Customer) DeleteToken

func (s Customer) DeleteToken(tokenID string, options ...CustomerDeleteTokenParameters) error

DeleteToken allows you to delete a customer's token by its ID.

func (Customer) FetchSubscriptions

func (s Customer) FetchSubscriptions(options ...CustomerFetchSubscriptionsParameters) (*Iterator, error)

FetchSubscriptions allows you to get the subscriptions belonging to the customer.

func (Customer) FetchTokens

func (s Customer) FetchTokens(options ...CustomerFetchTokensParameters) (*Iterator, error)

FetchTokens allows you to get the customer's tokens.

func (Customer) FetchTransactions

func (s Customer) FetchTransactions(options ...CustomerFetchTransactionsParameters) (*Iterator, error)

FetchTransactions allows you to get the transactions belonging to the customer.

func (Customer) Find

func (s Customer) Find(customerID string, options ...CustomerFindParameters) (*Customer, error)

Find allows you to find a customer by its ID.

func (Customer) FindToken

func (s Customer) FindToken(tokenID string, options ...CustomerFindTokenParameters) (*Token, error)

FindToken allows you to find a customer's token by its ID.

func (*Customer) GetID added in v4.1.0

func (s *Customer) GetID() string

GetID implements the Identiable interface

func (*Customer) Prefill

func (s *Customer) Prefill(c *Customer) *Customer

Prefil prefills the object with data provided in the parameter

func (Customer) Save

func (s Customer) Save(options ...CustomerSaveParameters) (*Customer, error)

Save allows you to save the updated customer attributes.

func (*Customer) SetClient

func (s *Customer) SetClient(c *ProcessOut) *Customer

SetClient sets the client for the Customer object and its children

type CustomerAction

type CustomerAction struct {
	// Type is the customer action type (such as url)
	Type *string `json:"type,omitempty"`
	// Value is the value of the customer action. If type is an URL, URL to which you should redirect your customer
	Value *string `json:"value,omitempty"`
	// Metadata is the metadata related to the customer action, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

CustomerAction represents the CustomerAction API object

func (*CustomerAction) Prefill

Prefil prefills the object with data provided in the parameter

func (*CustomerAction) SetClient

func (s *CustomerAction) SetClient(c *ProcessOut) *CustomerAction

SetClient sets the client for the CustomerAction object and its children

type CustomerAllParameters

type CustomerAllParameters struct {
	*Options
	*Customer
}

CustomerAllParameters is the structure representing the additional parameters used to call Customer.All

type CustomerCreateParameters

type CustomerCreateParameters struct {
	*Options
	*Customer
}

CustomerCreateParameters is the structure representing the additional parameters used to call Customer.Create

type CustomerDeleteParameters

type CustomerDeleteParameters struct {
	*Options
	*Customer
}

CustomerDeleteParameters is the structure representing the additional parameters used to call Customer.Delete

type CustomerDeleteTokenParameters

type CustomerDeleteTokenParameters struct {
	*Options
	*Customer
}

CustomerDeleteTokenParameters is the structure representing the additional parameters used to call Customer.DeleteToken

type CustomerFetchSubscriptionsParameters

type CustomerFetchSubscriptionsParameters struct {
	*Options
	*Customer
}

CustomerFetchSubscriptionsParameters is the structure representing the additional parameters used to call Customer.FetchSubscriptions

type CustomerFetchTokensParameters

type CustomerFetchTokensParameters struct {
	*Options
	*Customer
}

CustomerFetchTokensParameters is the structure representing the additional parameters used to call Customer.FetchTokens

type CustomerFetchTransactionsParameters

type CustomerFetchTransactionsParameters struct {
	*Options
	*Customer
}

CustomerFetchTransactionsParameters is the structure representing the additional parameters used to call Customer.FetchTransactions

type CustomerFindParameters

type CustomerFindParameters struct {
	*Options
	*Customer
}

CustomerFindParameters is the structure representing the additional parameters used to call Customer.Find

type CustomerFindTokenParameters

type CustomerFindTokenParameters struct {
	*Options
	*Customer
}

CustomerFindTokenParameters is the structure representing the additional parameters used to call Customer.FindToken

type CustomerPhone added in v4.32.2

type CustomerPhone struct {
	// Number is the phone number of the customer
	Number *string `json:"number,omitempty"`
	// DialingCode is the phone number dialing code of the customer
	DialingCode *string `json:"dialing_code,omitempty"`
	// contains filtered or unexported fields
}

CustomerPhone represents the CustomerPhone API object

func (*CustomerPhone) Prefill added in v4.32.2

func (s *CustomerPhone) Prefill(c *CustomerPhone) *CustomerPhone

Prefil prefills the object with data provided in the parameter

func (*CustomerPhone) SetClient added in v4.32.2

func (s *CustomerPhone) SetClient(c *ProcessOut) *CustomerPhone

SetClient sets the client for the CustomerPhone object and its children

type CustomerSaveParameters

type CustomerSaveParameters struct {
	*Options
	*Customer
}

CustomerSaveParameters is the structure representing the additional parameters used to call Customer.Save

type Device added in v4.36.0

type Device struct {
	// RequestOrigin is the request origin. Use "backend" if the request is not coming directly from the frontend
	RequestOrigin *string `json:"request_origin,omitempty"`
	// ID is the device identifier
	ID *string `json:"id,omitempty"`
	// Channel is the device channel. Possible values: "web", "ios", "android", "other"
	Channel *string `json:"channel,omitempty"`
	// IpAddress is the device IP address. Use if request origin is "backend"
	IpAddress *string `json:"ip_address,omitempty"`
	// UserAgent is the device user agent. Use if request origin is "backend"
	UserAgent *string `json:"user_agent,omitempty"`
	// HeaderAccept is the device accept header. Use if request origin is "backend"
	HeaderAccept *string `json:"header_accept,omitempty"`
	// HeaderReferer is the device referer header. Use if request origin is "backend"
	HeaderReferer *string `json:"header_referer,omitempty"`
	// AppColorDepth is the device color depth. Use if request origin is "backend"
	AppColorDepth *int `json:"app_color_depth,omitempty"`
	// AppJavaEnabled is the device Java enabled. Use if request origin is "backend"
	AppJavaEnabled *bool `json:"app_java_enabled,omitempty"`
	// AppLanguage is the device language. Use if request origin is "backend"
	AppLanguage *string `json:"app_language,omitempty"`
	// AppScreenHeight is the device screen height. Use if request origin is "backend"
	AppScreenHeight *int `json:"app_screen_height,omitempty"`
	// AppScreenWidth is the device screen width. Use if request origin is "backend"
	AppScreenWidth *int `json:"app_screen_width,omitempty"`
	// AppTimezoneOffset is the device timezone offset. Use if request origin is "backend"
	AppTimezoneOffset *int `json:"app_timezone_offset,omitempty"`
	// contains filtered or unexported fields
}

Device represents the Device API object

func (*Device) GetID added in v4.36.0

func (s *Device) GetID() string

GetID implements the Identiable interface

func (*Device) Prefill added in v4.36.0

func (s *Device) Prefill(c *Device) *Device

Prefil prefills the object with data provided in the parameter

func (*Device) SetClient added in v4.36.0

func (s *Device) SetClient(c *ProcessOut) *Device

SetClient sets the client for the Device object and its children

type Discount

type Discount struct {
	// ID is the iD of the discount
	ID *string `json:"id,omitempty"`
	// Project is the project to which the discount belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the discount belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Subscription is the subscription to which the discount belongs
	Subscription *Subscription `json:"subscription,omitempty"`
	// SubscriptionID is the iD of the subscription to which the addon belongs
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// Coupon is the coupon used to create the discount, if any
	Coupon *Coupon `json:"coupon,omitempty"`
	// CouponID is the iD of the coupon used to create the discount, if any
	CouponID *string `json:"coupon_id,omitempty"`
	// Name is the name of the discount
	Name *string `json:"name,omitempty"`
	// Amount is the amount discounted
	Amount *string `json:"amount,omitempty"`
	// Percent is the percentage discounted
	Percent *int `json:"percent,omitempty"`
	// ExpiresAt is the date at which the discount will expire
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
	// Metadata is the metadata related to the discount, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Sandbox is the define whether or not the discount is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the discount was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Discount represents the Discount API object

func (Discount) Create added in v4.1.0

func (s Discount) Create(options ...DiscountCreateParameters) (*Discount, error)

Create allows you to create a new discount for the given subscription ID.

func (Discount) Delete added in v4.1.0

func (s Discount) Delete(options ...DiscountDeleteParameters) error

Delete allows you to delete a discount applied to a subscription.

func (Discount) FetchSubscriptionDiscounts added in v4.1.0

func (s Discount) FetchSubscriptionDiscounts(subscriptionID string, options ...DiscountFetchSubscriptionDiscountsParameters) (*Iterator, error)

FetchSubscriptionDiscounts allows you to get the discounts applied to the subscription.

func (Discount) Find

func (s Discount) Find(subscriptionID, discountID string, options ...DiscountFindParameters) (*Discount, error)

Find allows you to find a subscription's discount by its ID.

func (*Discount) GetID added in v4.1.0

func (s *Discount) GetID() string

GetID implements the Identiable interface

func (*Discount) Prefill

func (s *Discount) Prefill(c *Discount) *Discount

Prefil prefills the object with data provided in the parameter

func (*Discount) SetClient

func (s *Discount) SetClient(c *ProcessOut) *Discount

SetClient sets the client for the Discount object and its children

type DiscountCreateParameters added in v4.1.0

type DiscountCreateParameters struct {
	*Options
	*Discount
}

DiscountCreateParameters is the structure representing the additional parameters used to call Discount.Create

type DiscountDeleteParameters added in v4.1.0

type DiscountDeleteParameters struct {
	*Options
	*Discount
}

DiscountDeleteParameters is the structure representing the additional parameters used to call Discount.Delete

type DiscountFetchSubscriptionDiscountsParameters added in v4.1.0

type DiscountFetchSubscriptionDiscountsParameters struct {
	*Options
	*Discount
}

DiscountFetchSubscriptionDiscountsParameters is the structure representing the additional parameters used to call Discount.FetchSubscriptionDiscounts

type DiscountFindParameters

type DiscountFindParameters struct {
	*Options
	*Discount
}

DiscountFindParameters is the structure representing the additional parameters used to call Discount.Find

type DunningAction

type DunningAction struct {
	// Action is the dunning action. Can be either retry, cancel, set_past_due or leave_unchanged
	Action *string `json:"action,omitempty"`
	// DelayInDays is the delay in days that should be waited before executing the next dunning action
	DelayInDays *int `json:"delay_in_days,omitempty"`
	// contains filtered or unexported fields
}

DunningAction represents the DunningAction API object

func (*DunningAction) Prefill

func (s *DunningAction) Prefill(c *DunningAction) *DunningAction

Prefil prefills the object with data provided in the parameter

func (*DunningAction) SetClient

func (s *DunningAction) SetClient(c *ProcessOut) *DunningAction

SetClient sets the client for the DunningAction object and its children

type ErrorCodes added in v4.32.2

type ErrorCodes struct {
	// Gateway is the error codes from gateways by category.
	Gateway *CategoryErrorCodes `json:"gateway,omitempty"`
	// contains filtered or unexported fields
}

ErrorCodes represents the ErrorCodes API object

func (ErrorCodes) All added in v4.32.2

func (s ErrorCodes) All(options ...ErrorCodesAllParameters) (*ErrorCodes, error)

All allows you to get all error codes.

func (*ErrorCodes) Prefill added in v4.32.2

func (s *ErrorCodes) Prefill(c *ErrorCodes) *ErrorCodes

Prefil prefills the object with data provided in the parameter

func (*ErrorCodes) SetClient added in v4.32.2

func (s *ErrorCodes) SetClient(c *ProcessOut) *ErrorCodes

SetClient sets the client for the ErrorCodes object and its children

type ErrorCodesAllParameters added in v4.32.2

type ErrorCodesAllParameters struct {
	*Options
	*ErrorCodes
}

ErrorCodesAllParameters is the structure representing the additional parameters used to call ErrorCodes.All

type Event

type Event struct {
	// ID is the iD of the event
	ID *string `json:"id,omitempty"`
	// Project is the project to which the event belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the event belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Name is the name of the event
	Name *string `json:"name,omitempty"`
	// Data is the data object associated to the event
	Data interface{} `json:"data,omitempty"`
	// Sandbox is the define whether or not the event is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// FiredAt is the date at which the event was fired
	FiredAt *time.Time `json:"fired_at,omitempty"`
	// contains filtered or unexported fields
}

Event represents the Event API object

func (Event) All

func (s Event) All(options ...EventAllParameters) (*Iterator, error)

All allows you to get all the events.

func (Event) FetchWebhooks

func (s Event) FetchWebhooks(options ...EventFetchWebhooksParameters) (*Iterator, error)

FetchWebhooks allows you to get all the webhooks of the event.

func (Event) Find

func (s Event) Find(eventID string, options ...EventFindParameters) (*Event, error)

Find allows you to find an event by its ID.

func (*Event) GetID added in v4.1.0

func (s *Event) GetID() string

GetID implements the Identiable interface

func (*Event) Prefill

func (s *Event) Prefill(c *Event) *Event

Prefil prefills the object with data provided in the parameter

func (*Event) SetClient

func (s *Event) SetClient(c *ProcessOut) *Event

SetClient sets the client for the Event object and its children

type EventAllParameters

type EventAllParameters struct {
	*Options
	*Event
}

EventAllParameters is the structure representing the additional parameters used to call Event.All

type EventFetchWebhooksParameters

type EventFetchWebhooksParameters struct {
	*Options
	*Event
}

EventFetchWebhooksParameters is the structure representing the additional parameters used to call Event.FetchWebhooks

type EventFindParameters

type EventFindParameters struct {
	*Options
	*Event
}

EventFindParameters is the structure representing the additional parameters used to call Event.Find

type Gateway

type Gateway struct {
	// ID is the iD of the gateway
	ID *string `json:"id,omitempty"`
	// Name is the name of the payment gateway
	Name *string `json:"name,omitempty"`
	// DisplayName is the name of the payment gateway that can be displayed
	DisplayName *string `json:"display_name,omitempty"`
	// LogoURL is the logo URL of the payment gateway
	LogoURL *string `json:"logo_url,omitempty"`
	// URL is the uRL of the payment gateway
	URL *string `json:"url,omitempty"`
	// Flows is the supported flow by the gateway (one-off, subscription or tokenization)
	Flows *[]string `json:"flows,omitempty"`
	// Tags is the gateway tags. Mainly used to filter gateways depending on their attributes (e-wallets and such)
	Tags *[]string `json:"tags,omitempty"`
	// CanPullTransactions is the true if the gateway can pull old transactions into ProcessOut, false otherwise
	CanPullTransactions *bool `json:"can_pull_transactions,omitempty"`
	// CanRefund is the true if the gateway supports refunds, false otherwise
	CanRefund *bool `json:"can_refund,omitempty"`
	// IsOauthAuthentication is the true if the gateway supports oauth authentication, false otherwise
	IsOauthAuthentication *bool `json:"is_oauth_authentication,omitempty"`
	// Description is the description of the payment gateway
	Description *string `json:"description,omitempty"`
	// contains filtered or unexported fields
}

Gateway represents the Gateway API object

func (Gateway) FetchGatewayConfigurations added in v4.7.0

func (s Gateway) FetchGatewayConfigurations(options ...GatewayFetchGatewayConfigurationsParameters) (*Iterator, error)

FetchGatewayConfigurations allows you to get all the gateway configurations of the gateway

func (*Gateway) GetID added in v4.1.0

func (s *Gateway) GetID() string

GetID implements the Identiable interface

func (*Gateway) Prefill

func (s *Gateway) Prefill(c *Gateway) *Gateway

Prefil prefills the object with data provided in the parameter

func (*Gateway) SetClient

func (s *Gateway) SetClient(c *ProcessOut) *Gateway

SetClient sets the client for the Gateway object and its children

type GatewayConfiguration

type GatewayConfiguration struct {
	// ID is the iD of the gateway configuration
	ID *string `json:"id,omitempty"`
	// Project is the project to which the gateway configuration belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the gateway configuration belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Gateway is the gateway that the configuration configures
	Gateway *Gateway `json:"gateway,omitempty"`
	// GatewayID is the iD of the gateway to which the gateway configuration belongs
	GatewayID *int `json:"gateway_id,omitempty"`
	// Name is the name of the gateway configuration
	Name *string `json:"name,omitempty"`
	// DefaultCurrency is the default currency of the gateway configuration
	DefaultCurrency *string `json:"default_currency,omitempty"`
	// Enabled is the define whether or not the gateway configuration is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// PublicKeys is the public keys of the payment gateway configuration (key-value pair)
	PublicKeys *map[string]string `json:"public_keys,omitempty"`
	// CreatedAt is the date at which the gateway configuration was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// EnabledAt is the date at which the gateway configuration was enabled
	EnabledAt *time.Time `json:"enabled_at,omitempty"`
	// ProcessingRegion is the gateway's processing region (EEA, EEA-UK, UK etc)
	ProcessingRegion *string `json:"processing_region,omitempty"`
	// Metadata is the metadata related to the gateway configuration, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

GatewayConfiguration represents the GatewayConfiguration API object

func (GatewayConfiguration) All added in v4.7.0

All allows you to get all the gateway configurations.

func (GatewayConfiguration) Create added in v4.7.0

Create allows you to create a new gateway configuration.

func (GatewayConfiguration) Delete added in v4.7.0

Delete allows you to delete the gateway configuration.

func (GatewayConfiguration) Find added in v4.7.0

Find allows you to find a gateway configuration by its ID.

func (*GatewayConfiguration) GetID added in v4.1.0

func (s *GatewayConfiguration) GetID() string

GetID implements the Identiable interface

func (*GatewayConfiguration) Prefill

Prefil prefills the object with data provided in the parameter

func (GatewayConfiguration) Save added in v4.7.0

Save allows you to save the updated gateway configuration attributes and settings.

func (*GatewayConfiguration) SetClient

SetClient sets the client for the GatewayConfiguration object and its children

type GatewayConfigurationAllParameters added in v4.7.0

type GatewayConfigurationAllParameters struct {
	*Options
	*GatewayConfiguration
	ExpandMerchantAccounts interface{} `json:"expand_merchant_accounts"`
}

GatewayConfigurationAllParameters is the structure representing the additional parameters used to call GatewayConfiguration.All

type GatewayConfigurationCreateParameters added in v4.7.0

type GatewayConfigurationCreateParameters struct {
	*Options
	*GatewayConfiguration
	Settings           interface{} `json:"settings"`
	SubAccountsEnabled interface{} `json:"sub_accounts_enabled"`
}

GatewayConfigurationCreateParameters is the structure representing the additional parameters used to call GatewayConfiguration.Create

type GatewayConfigurationDeleteParameters added in v4.7.0

type GatewayConfigurationDeleteParameters struct {
	*Options
	*GatewayConfiguration
}

GatewayConfigurationDeleteParameters is the structure representing the additional parameters used to call GatewayConfiguration.Delete

type GatewayConfigurationFindParameters added in v4.7.0

type GatewayConfigurationFindParameters struct {
	*Options
	*GatewayConfiguration
}

GatewayConfigurationFindParameters is the structure representing the additional parameters used to call GatewayConfiguration.Find

type GatewayConfigurationSaveParameters added in v4.7.0

type GatewayConfigurationSaveParameters struct {
	*Options
	*GatewayConfiguration
	Settings           interface{} `json:"settings"`
	SubAccountsEnabled interface{} `json:"sub_accounts_enabled"`
}

GatewayConfigurationSaveParameters is the structure representing the additional parameters used to call GatewayConfiguration.Save

type GatewayFetchGatewayConfigurationsParameters added in v4.7.0

type GatewayFetchGatewayConfigurationsParameters struct {
	*Options
	*Gateway
}

GatewayFetchGatewayConfigurationsParameters is the structure representing the additional parameters used to call Gateway.FetchGatewayConfigurations

type GatewayRequest

type GatewayRequest struct {
	GatewayConfigurationUID string            `json:"gateway_configuration_id"`
	URL                     string            `json:"url"`
	Method                  string            `json:"method"`
	Headers                 map[string]string `json:"headers"`
	Body                    string            `json:"body"`
}

GatewayRequest is the struture representing an abstracted payment gateway request

func NewGatewayRequest

func NewGatewayRequest(gatewayConfigurationID string,
	req *http.Request, trimBodyLength ...int64) *GatewayRequest

NewGatewayRequest creates a new GatewayRequest from the given gateway configuration ID and request

func (*GatewayRequest) String

func (gr *GatewayRequest) String() string

String encodes the GatewayRequest to a source readable by ProcessOut

type Identifiable

type Identifiable interface {
	GetID() string
}

Identifiable is the interface used by the Iterator to get the ID of the resources

type Invoice

type Invoice struct {
	// ID is the iD of the invoice
	ID *string `json:"id,omitempty"`
	// Project is the project to which the invoice belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the invoice belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Transaction is the transaction generated by the invoice
	Transaction *Transaction `json:"transaction,omitempty"`
	// TransactionID is the iD of the transaction generated by the invoice
	TransactionID *string `json:"transaction_id,omitempty"`
	// Customer is the customer linked to the invoice, if any
	Customer *Customer `json:"customer,omitempty"`
	// CustomerID is the iD of the customer linked to the invoice, if any
	CustomerID *string `json:"customer_id,omitempty"`
	// Subscription is the subscription to which the invoice is linked to, if any
	Subscription *Subscription `json:"subscription,omitempty"`
	// SubscriptionID is the iD of the subscription to which the invoice is linked to, if any
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// Token is the token used to pay the invoice, if any
	Token *Token `json:"token,omitempty"`
	// TokenID is the iD of the token used to pay the invoice, if any
	TokenID *string `json:"token_id,omitempty"`
	// Details is the details of the invoice
	Details *[]*InvoiceDetail `json:"details,omitempty"`
	// URL is the uRL to which you may redirect your customer to proceed with the payment
	URL *string `json:"url,omitempty"`
	// Name is the name of the invoice
	Name *string `json:"name,omitempty"`
	// OrderID is the iD of the order for this transaction in merchant's system
	OrderID *string `json:"order_id,omitempty"`
	// Amount is the amount to be paid
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency of the invoice
	Currency *string `json:"currency,omitempty"`
	// MerchantInitiatorType is the type of the transaction initiated by the merchant (off-session). Can be either one-off or recurring, depending on the nature of the merchant initiated transaction.
	MerchantInitiatorType *string `json:"merchant_initiator_type,omitempty"`
	// StatementDescriptor is the statement to be shown on the bank statement of your customer
	StatementDescriptor *string `json:"statement_descriptor,omitempty"`
	// StatementDescriptorPhone is the support phone number shown on the customer's bank statement
	StatementDescriptorPhone *string `json:"statement_descriptor_phone,omitempty"`
	// StatementDescriptorCity is the city shown on the customer's bank statement
	StatementDescriptorCity *string `json:"statement_descriptor_city,omitempty"`
	// StatementDescriptorCompany is the your company name shown on the customer's bank statement
	StatementDescriptorCompany *string `json:"statement_descriptor_company,omitempty"`
	// StatementDescriptorURL is the uRL shown on the customer's bank statement
	StatementDescriptorURL *string `json:"statement_descriptor_url,omitempty"`
	// Metadata is the metadata related to the invoice, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// GatewayData is the dictionary that transmit specific informations to gateways (key-value pair)
	GatewayData *map[string]string `json:"gateway_data,omitempty"`
	// ReturnURL is the uRL where the customer will be redirected upon payment
	ReturnURL *string `json:"return_url,omitempty"`
	// CancelURL is the uRL where the customer will be redirected if the payment was canceled
	CancelURL *string `json:"cancel_url,omitempty"`
	// WebhookURL is the custom webhook URL where updates about this specific payment will be sent, on top of your project-wide URLs
	WebhookURL *string `json:"webhook_url,omitempty"`
	// RequireBackendCapture is the define whether the invoice can be captured from the front-end or not
	RequireBackendCapture *bool `json:"require_backend_capture,omitempty"`
	// Sandbox is the define whether or not the invoice is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the invoice was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Risk is the risk information
	Risk *InvoiceRisk `json:"risk,omitempty"`
	// Shipping is the shipping information
	Shipping *InvoiceShipping `json:"shipping,omitempty"`
	// Device is the device information
	Device *InvoiceDevice `json:"device,omitempty"`
	// ExternalFraudTools is the contain objects that'll be forwarded to external fraud tools
	ExternalFraudTools *InvoiceExternalFraudTools `json:"external_fraud_tools,omitempty"`
	// ExemptionReason3ds2 is the (Deprecated - use sca_exemption_reason) Reason provided to request 3DS2 exemption
	ExemptionReason3ds2 *string `json:"exemption_reason_3ds2,omitempty"`
	// ScaExemptionReason is the reason provided to request SCA exemption
	ScaExemptionReason *string `json:"sca_exemption_reason,omitempty"`
	// ChallengeIndicator is the challenge indicator when requesting 3DS2
	ChallengeIndicator *string `json:"challenge_indicator,omitempty"`
	// Incremental is the a boolean to indicate if an invoice can have incremental authorizations created for it.
	Incremental *bool `json:"incremental,omitempty"`
	// Tax is the tax for an invoice
	Tax *InvoiceTax `json:"tax,omitempty"`
	// PaymentType is the payment type
	PaymentType *string `json:"payment_type,omitempty"`
	// NativeApm is the native APM data
	NativeApm *NativeAPMRequest `json:"native_apm,omitempty"`
	// InitiationType is the initiation type of invoice
	InitiationType *string `json:"initiation_type,omitempty"`
	// PaymentIntent is the payment intent of invoice
	PaymentIntent *string `json:"payment_intent,omitempty"`
	// Billing is the billing information
	Billing *InvoiceBilling `json:"billing,omitempty"`
	// UnsupportedFeatureBypass is the flags to bypass unsupported features
	UnsupportedFeatureBypass *UnsupportedFeatureBypass `json:"unsupported_feature_bypass,omitempty"`
	// Verification is the a boolean to indicate if an invoice is a verification invoice. This is used to manually create a verification invoice.
	Verification *bool `json:"verification,omitempty"`
	// AutoCaptureAt is the a timestamp to indicate when an auto capture should take place following an authorization. This takes priority over the value sent in the authorization request.
	AutoCaptureAt *time.Time `json:"auto_capture_at,omitempty"`
	// contains filtered or unexported fields
}

Invoice represents the Invoice API object

func (Invoice) All

func (s Invoice) All(options ...InvoiceAllParameters) (*Iterator, error)

All allows you to get all the invoices.

func (Invoice) AssignCustomer

func (s Invoice) AssignCustomer(customerID string, options ...InvoiceAssignCustomerParameters) (*Customer, error)

AssignCustomer allows you to assign a customer to the invoice.

func (Invoice) Authorize

func (s Invoice) Authorize(source string, options ...InvoiceAuthorizeParameters) (*Transaction, error)

Authorize allows you to authorize the invoice using the given source (customer or token)

func (Invoice) Capture

func (s Invoice) Capture(source string, options ...InvoiceCaptureParameters) (*Transaction, error)

Capture allows you to capture the invoice using the given source (customer or token)

func (Invoice) Create

func (s Invoice) Create(options ...InvoiceCreateParameters) (*Invoice, error)

Create allows you to create a new invoice.

func (Invoice) FetchCustomer

func (s Invoice) FetchCustomer(options ...InvoiceFetchCustomerParameters) (*Customer, error)

FetchCustomer allows you to get the customer linked to the invoice.

func (Invoice) FetchTransaction

func (s Invoice) FetchTransaction(options ...InvoiceFetchTransactionParameters) (*Transaction, error)

FetchTransaction allows you to get the transaction of the invoice.

func (Invoice) Find

func (s Invoice) Find(invoiceID string, options ...InvoiceFindParameters) (*Invoice, error)

Find allows you to find an invoice by its ID.

func (*Invoice) GetID added in v4.1.0

func (s *Invoice) GetID() string

GetID implements the Identiable interface

func (Invoice) IncrementAuthorization added in v4.21.0

func (s Invoice) IncrementAuthorization(amount float64, options ...InvoiceIncrementAuthorizationParameters) (*Transaction, error)

IncrementAuthorization allows you to create an incremental authorization

func (Invoice) InitiateThreeDS added in v4.5.0

func (s Invoice) InitiateThreeDS(source string, options ...InvoiceInitiateThreeDSParameters) (*CustomerAction, error)

InitiateThreeDS allows you to initiate a 3-D Secure authentication

func (Invoice) Payout added in v4.32.2

func (s Invoice) Payout(gatewayConfigurationID, source string, options ...InvoicePayoutParameters) (*Transaction, error)

Payout allows you to process the payout invoice using the given source (customer or token)

func (*Invoice) Prefill

func (s *Invoice) Prefill(c *Invoice) *Invoice

Prefil prefills the object with data provided in the parameter

func (Invoice) ProcessNativePayment added in v4.31.0

func (s Invoice) ProcessNativePayment(invoiceID string, options ...InvoiceProcessNativePaymentParameters) (*InvoicesProcessNativePaymentResponse, error)

ProcessNativePayment allows you to process the Native APM payment flow

func (*Invoice) SetClient

func (s *Invoice) SetClient(c *ProcessOut) *Invoice

SetClient sets the client for the Invoice object and its children

func (Invoice) ShowNativePaymentTransaction added in v4.31.0

func (s Invoice) ShowNativePaymentTransaction(invoiceID, gatewayConfigurationID string, options ...InvoiceShowNativePaymentTransactionParameters) (*NativeAPMTransactionDetails, error)

ShowNativePaymentTransaction allows you to fetches the Native APM payment

func (Invoice) Void

func (s Invoice) Void(options ...InvoiceVoidParameters) (*Transaction, error)

Void allows you to void the invoice

type InvoiceAllParameters

type InvoiceAllParameters struct {
	*Options
	*Invoice
}

InvoiceAllParameters is the structure representing the additional parameters used to call Invoice.All

type InvoiceAssignCustomerParameters

type InvoiceAssignCustomerParameters struct {
	*Options
	*Invoice
}

InvoiceAssignCustomerParameters is the structure representing the additional parameters used to call Invoice.AssignCustomer

type InvoiceAuthorizeParameters

type InvoiceAuthorizeParameters struct {
	*Options
	*Invoice
	Synchronous             interface{} `json:"synchronous"`
	RetryDropLiabilityShift interface{} `json:"retry_drop_liability_shift"`
	CaptureAmount           interface{} `json:"capture_amount"`
	EnableThreeDS2          interface{} `json:"enable_three_d_s_2"`
	AllowFallbackToSale     interface{} `json:"allow_fallback_to_sale"`
	AutoCaptureAt           interface{} `json:"auto_capture_at"`
	Metadata                interface{} `json:"metadata"`
	OverrideMacBlocking     interface{} `json:"override_mac_blocking"`
}

InvoiceAuthorizeParameters is the structure representing the additional parameters used to call Invoice.Authorize

type InvoiceBilling added in v4.31.0

type InvoiceBilling struct {
	// Address1 is the address of the cardholder
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address of the cardholder
	Address2 *string `json:"address2,omitempty"`
	// City is the city of the cardholder
	City *string `json:"city,omitempty"`
	// State is the state of the cardholder
	State *string `json:"state,omitempty"`
	// CountryCode is the country code of the cardholder
	CountryCode *string `json:"country_code,omitempty"`
	// Zip is the zIP of the cardholder
	Zip *string `json:"zip,omitempty"`
	// contains filtered or unexported fields
}

InvoiceBilling represents the InvoiceBilling API object

func (*InvoiceBilling) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*InvoiceBilling) SetClient added in v4.31.0

func (s *InvoiceBilling) SetClient(c *ProcessOut) *InvoiceBilling

SetClient sets the client for the InvoiceBilling object and its children

type InvoiceCaptureParameters

type InvoiceCaptureParameters struct {
	*Options
	*Invoice
	AuthorizeOnly              interface{} `json:"authorize_only"`
	Synchronous                interface{} `json:"synchronous"`
	RetryDropLiabilityShift    interface{} `json:"retry_drop_liability_shift"`
	CaptureAmount              interface{} `json:"capture_amount"`
	AutoCaptureAt              interface{} `json:"auto_capture_at"`
	EnableThreeDS2             interface{} `json:"enable_three_d_s_2"`
	Metadata                   interface{} `json:"metadata"`
	CaptureStatementDescriptor interface{} `json:"capture_statement_descriptor"`
	OverrideMacBlocking        interface{} `json:"override_mac_blocking"`
}

InvoiceCaptureParameters is the structure representing the additional parameters used to call Invoice.Capture

type InvoiceCreateParameters

type InvoiceCreateParameters struct {
	*Options
	*Invoice
}

InvoiceCreateParameters is the structure representing the additional parameters used to call Invoice.Create

type InvoiceDetail

type InvoiceDetail struct {
	// ID is the iD of the invoice detail
	ID *string `json:"id,omitempty"`
	// Name is the name of the invoice detail
	Name *string `json:"name,omitempty"`
	// Type is the type of the invoice detail. Can be a string containing anything, up to 30 characters
	Type *string `json:"type,omitempty"`
	// Amount is the amount represented by the invoice detail
	Amount *string `json:"amount,omitempty"`
	// Quantity is the quantity of items represented by the invoice detail
	Quantity *int `json:"quantity,omitempty"`
	// Metadata is the metadata related to the invoice detail, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Reference is the reference of the product
	Reference *string `json:"reference,omitempty"`
	// Description is the description of the invoice detail
	Description *string `json:"description,omitempty"`
	// Brand is the brand of the product
	Brand *string `json:"brand,omitempty"`
	// Model is the model of the product
	Model *string `json:"model,omitempty"`
	// DiscountAmount is the discount amount represented by the invoice detail
	DiscountAmount *string `json:"discount_amount,omitempty"`
	// Condition is the condition of the product
	Condition *string `json:"condition,omitempty"`
	// MarketplaceMerchant is the marketplace merchant of the invoice detail
	MarketplaceMerchant *string `json:"marketplace_merchant,omitempty"`
	// MarketplaceMerchantIsBusiness is the define whether or not the marketplace merchant is a business
	MarketplaceMerchantIsBusiness *bool `json:"marketplace_merchant_is_business,omitempty"`
	// MarketplaceMerchantCreatedAt is the date at which the merchant was created
	MarketplaceMerchantCreatedAt *time.Time `json:"marketplace_merchant_created_at,omitempty"`
	// Category is the category of the product
	Category *string `json:"category,omitempty"`
	// contains filtered or unexported fields
}

InvoiceDetail represents the InvoiceDetail API object

func (*InvoiceDetail) GetID added in v4.25.0

func (s *InvoiceDetail) GetID() string

GetID implements the Identiable interface

func (*InvoiceDetail) Prefill

func (s *InvoiceDetail) Prefill(c *InvoiceDetail) *InvoiceDetail

Prefil prefills the object with data provided in the parameter

func (*InvoiceDetail) SetClient

func (s *InvoiceDetail) SetClient(c *ProcessOut) *InvoiceDetail

SetClient sets the client for the InvoiceDetail object and its children

type InvoiceDevice added in v4.17.1

type InvoiceDevice struct {
	// Channel is the channel of the device
	Channel *string `json:"channel,omitempty"`
	// IpAddress is the iP address of the device
	IpAddress *string `json:"ip_address,omitempty"`
	// ID is the iD of the device
	ID *string `json:"id,omitempty"`
	// contains filtered or unexported fields
}

InvoiceDevice represents the InvoiceDevice API object

func (*InvoiceDevice) GetID added in v4.20.1

func (s *InvoiceDevice) GetID() string

GetID implements the Identiable interface

func (*InvoiceDevice) Prefill added in v4.17.1

func (s *InvoiceDevice) Prefill(c *InvoiceDevice) *InvoiceDevice

Prefil prefills the object with data provided in the parameter

func (*InvoiceDevice) SetClient added in v4.17.1

func (s *InvoiceDevice) SetClient(c *ProcessOut) *InvoiceDevice

SetClient sets the client for the InvoiceDevice object and its children

type InvoiceExternalFraudTools added in v4.20.1

type InvoiceExternalFraudTools struct {
	// Forter is the forter
	Forter *string `json:"forter,omitempty"`
	// Ravelin is the ravelin
	Ravelin *string `json:"ravelin,omitempty"`
	// Signifyd is the signifyd
	Signifyd *string `json:"signifyd,omitempty"`
	// contains filtered or unexported fields
}

InvoiceExternalFraudTools represents the InvoiceExternalFraudTools API object

func (*InvoiceExternalFraudTools) Prefill added in v4.20.1

Prefil prefills the object with data provided in the parameter

func (*InvoiceExternalFraudTools) SetClient added in v4.20.1

SetClient sets the client for the InvoiceExternalFraudTools object and its children

type InvoiceFetchCustomerParameters

type InvoiceFetchCustomerParameters struct {
	*Options
	*Invoice
}

InvoiceFetchCustomerParameters is the structure representing the additional parameters used to call Invoice.FetchCustomer

type InvoiceFetchTransactionParameters

type InvoiceFetchTransactionParameters struct {
	*Options
	*Invoice
}

InvoiceFetchTransactionParameters is the structure representing the additional parameters used to call Invoice.FetchTransaction

type InvoiceFindParameters

type InvoiceFindParameters struct {
	*Options
	*Invoice
}

InvoiceFindParameters is the structure representing the additional parameters used to call Invoice.Find

type InvoiceIncrementAuthorizationParameters added in v4.21.0

type InvoiceIncrementAuthorizationParameters struct {
	*Options
	*Invoice
	Metadata interface{} `json:"metadata"`
}

InvoiceIncrementAuthorizationParameters is the structure representing the additional parameters used to call Invoice.IncrementAuthorization

type InvoiceInitiateThreeDSParameters added in v4.5.0

type InvoiceInitiateThreeDSParameters struct {
	*Options
	*Invoice
	EnableThreeDS2 interface{} `json:"enable_three_d_s_2"`
}

InvoiceInitiateThreeDSParameters is the structure representing the additional parameters used to call Invoice.InitiateThreeDS

type InvoicePayoutParameters added in v4.32.2

type InvoicePayoutParameters struct {
	*Options
	*Invoice
	ForceGatewayConfigurationID interface{} `json:"force_gateway_configuration_id"`
}

InvoicePayoutParameters is the structure representing the additional parameters used to call Invoice.Payout

type InvoiceProcessNativePaymentParameters added in v4.31.0

type InvoiceProcessNativePaymentParameters struct {
	*Options
	*Invoice
	GatewayConfigurationID interface{} `json:"gateway_configuration_id"`
	NativeApm              interface{} `json:"native_apm"`
}

InvoiceProcessNativePaymentParameters is the structure representing the additional parameters used to call Invoice.ProcessNativePayment

type InvoiceRisk added in v4.17.1

type InvoiceRisk struct {
	// Score is the scoring of the invoice
	Score *string `json:"score,omitempty"`
	// IsLegit is the define whether or not the invoice is legit
	IsLegit *bool `json:"is_legit,omitempty"`
	// SkipGatewayRules is the skip payment gateway fraud engine rules (on compatible gateways only.)
	SkipGatewayRules *bool `json:"skip_gateway_rules,omitempty"`
	// contains filtered or unexported fields
}

InvoiceRisk represents the InvoiceRisk API object

func (*InvoiceRisk) Prefill added in v4.17.1

func (s *InvoiceRisk) Prefill(c *InvoiceRisk) *InvoiceRisk

Prefil prefills the object with data provided in the parameter

func (*InvoiceRisk) SetClient added in v4.17.1

func (s *InvoiceRisk) SetClient(c *ProcessOut) *InvoiceRisk

SetClient sets the client for the InvoiceRisk object and its children

type InvoiceShipping added in v4.17.1

type InvoiceShipping struct {
	// Amount is the amount of the shipping
	Amount *string `json:"amount,omitempty"`
	// Method is the delivery method
	Method *string `json:"method,omitempty"`
	// Provider is the delivery provider
	Provider *string `json:"provider,omitempty"`
	// Delay is the shipping delay
	Delay *string `json:"delay,omitempty"`
	// Address1 is the address where the shipment will be delivered
	Address1 *string `json:"address1,omitempty"`
	// Address2 is the secondary address where the shipment will be delivered
	Address2 *string `json:"address2,omitempty"`
	// City is the city where the shipment will be delivered
	City *string `json:"city,omitempty"`
	// State is the state where the shipment will be delivered
	State *string `json:"state,omitempty"`
	// CountryCode is the country code where the shipment will be delivered
	CountryCode *string `json:"country_code,omitempty"`
	// Zip is the zIP where the shipment will be delivered
	Zip *string `json:"zip,omitempty"`
	// PhoneNumber is the shipment full phone number, consisting of a combined dialing code and phone number
	PhoneNumber *string `json:"phone_number,omitempty"`
	// Phone is the phone number for the shipment
	Phone *InvoiceShippingPhone `json:"phone,omitempty"`
	// ExpectsShippingAt is the date at which the shipment is expected to be sent
	ExpectsShippingAt *time.Time `json:"expects_shipping_at,omitempty"`
	// RelayStoreName is the relay store name
	RelayStoreName *string `json:"relay_store_name,omitempty"`
	// contains filtered or unexported fields
}

InvoiceShipping represents the InvoiceShipping API object

func (*InvoiceShipping) Prefill added in v4.17.1

Prefil prefills the object with data provided in the parameter

func (*InvoiceShipping) SetClient added in v4.17.1

func (s *InvoiceShipping) SetClient(c *ProcessOut) *InvoiceShipping

SetClient sets the client for the InvoiceShipping object and its children

type InvoiceShippingPhone added in v4.32.2

type InvoiceShippingPhone struct {
	// Number is the phone number for the shipment
	Number *string `json:"number,omitempty"`
	// DialingCode is the phone number dialing code for the shipment
	DialingCode *string `json:"dialing_code,omitempty"`
	// contains filtered or unexported fields
}

InvoiceShippingPhone represents the InvoiceShippingPhone API object

func (*InvoiceShippingPhone) Prefill added in v4.32.2

Prefil prefills the object with data provided in the parameter

func (*InvoiceShippingPhone) SetClient added in v4.32.2

SetClient sets the client for the InvoiceShippingPhone object and its children

type InvoiceShowNativePaymentTransactionParameters added in v4.31.0

type InvoiceShowNativePaymentTransactionParameters struct {
	*Options
	*Invoice
}

InvoiceShowNativePaymentTransactionParameters is the structure representing the additional parameters used to call Invoice.ShowNativePaymentTransaction

type InvoiceTax added in v4.21.0

type InvoiceTax struct {
	// Amount is the amount of the tax for an invoice
	Amount *string `json:"amount,omitempty"`
	// Rate is the rate of the tax for an invoice
	Rate *string `json:"rate,omitempty"`
	// contains filtered or unexported fields
}

InvoiceTax represents the InvoiceTax API object

func (*InvoiceTax) Prefill added in v4.21.0

func (s *InvoiceTax) Prefill(c *InvoiceTax) *InvoiceTax

Prefil prefills the object with data provided in the parameter

func (*InvoiceTax) SetClient added in v4.21.0

func (s *InvoiceTax) SetClient(c *ProcessOut) *InvoiceTax

SetClient sets the client for the InvoiceTax object and its children

type InvoiceVoidParameters

type InvoiceVoidParameters struct {
	*Options
	*Invoice
	Metadata interface{} `json:"metadata"`
	Amount   interface{} `json:"amount"`
}

InvoiceVoidParameters is the structure representing the additional parameters used to call Invoice.Void

type InvoicesProcessNativePaymentResponse added in v4.32.2

type InvoicesProcessNativePaymentResponse struct {
	// Transaction is the transaction linked to this Native APM
	Transaction *Transaction `json:"transaction,omitempty"`
	// NativeApm is the native APM response
	NativeApm *NativeAPMResponse `json:"native_apm,omitempty"`
	// contains filtered or unexported fields
}

InvoicesProcessNativePaymentResponse represents the InvoicesProcessNativePaymentResponse API object

func (*InvoicesProcessNativePaymentResponse) Prefill added in v4.32.2

Prefil prefills the object with data provided in the parameter

func (*InvoicesProcessNativePaymentResponse) SetClient added in v4.32.2

SetClient sets the client for the InvoicesProcessNativePaymentResponse object and its children

type Iterator

type Iterator struct {
	// contains filtered or unexported fields
}

Iterator is the structure used to iterate over resources sent by the API

func (*Iterator) Data

func (i *Iterator) Data() []Identifiable

Data returns the data currently fetched by the iterator

func (*Iterator) Error

func (i *Iterator) Error() error

Error returns the error that occured when paginating, if any

func (*Iterator) Get

func (i *Iterator) Get() interface{}

Get returns the current element

func (*Iterator) Next

func (i *Iterator) Next() bool

Next iterates on the objects list and fetches new data if available

func (*Iterator) NextPage

func (i *Iterator) NextPage() (bool, error)

NextPage fetches the next data page

func (*Iterator) Prev

func (i *Iterator) Prev() bool

Prev iterates on the objects list and fetches new data if available

func (*Iterator) PrevPage

func (i *Iterator) PrevPage() (bool, error)

PrevPage fetches the previous data page

type NativeAPMParameterDefinition added in v4.31.0

type NativeAPMParameterDefinition struct {
	// Key is the native APM parameter value key
	Key *string `json:"key,omitempty"`
	// Type is the nativeAPM parameter value type
	Type *string `json:"type,omitempty"`
	// Required is the nativeAPM parameter value requirement
	Required *bool `json:"required,omitempty"`
	// Length is the nativeAPM parameter value length
	Length *int `json:"length,omitempty"`
	// DisplayName is the native APM parameter display name
	DisplayName *string `json:"display_name,omitempty"`
	// AvailableValues is the native APM parameter available input values
	AvailableValues *[]*NativeAPMParameterValueDefinition `json:"available_values,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMParameterDefinition represents the NativeAPMParameterDefinition API object

func (*NativeAPMParameterDefinition) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMParameterDefinition) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMParameterDefinition object and its children

type NativeAPMParameterValue added in v4.31.0

type NativeAPMParameterValue struct {
	// Key is the native APM parameter value key
	Key *string `json:"key,omitempty"`
	// Value is the native APM parameter value value
	Value *string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMParameterValue represents the NativeAPMParameterValue API object

func (*NativeAPMParameterValue) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMParameterValue) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMParameterValue object and its children

type NativeAPMParameterValueDefinition added in v4.31.0

type NativeAPMParameterValueDefinition struct {
	// Value is the native APM parameter value
	Value *string `json:"value,omitempty"`
	// Default is the native APM parameter default value flag
	Default *bool `json:"default,omitempty"`
	// DisplayName is the native APM parameter value display name
	DisplayName *string `json:"display_name,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMParameterValueDefinition represents the NativeAPMParameterValueDefinition API object

func (*NativeAPMParameterValueDefinition) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMParameterValueDefinition) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMParameterValueDefinition object and its children

type NativeAPMRequest added in v4.31.0

type NativeAPMRequest struct {
	// ParameterValues is the native APM parameter values
	ParameterValues *[]*NativeAPMParameterValue `json:"parameter_values,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMRequest represents the NativeAPMRequest API object

func (*NativeAPMRequest) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMRequest) SetClient added in v4.31.0

func (s *NativeAPMRequest) SetClient(c *ProcessOut) *NativeAPMRequest

SetClient sets the client for the NativeAPMRequest object and its children

type NativeAPMResponse added in v4.31.0

type NativeAPMResponse struct {
	// State is the native APM response state
	State *string `json:"state,omitempty"`
	// ParameterDefinitions is the native APM parameter values description
	ParameterDefinitions *[]*NativeAPMParameterDefinition `json:"parameter_definitions,omitempty"`
	// ParameterValues is the native APM parameter values
	ParameterValues *[]*NativeAPMParameterValue `json:"parameter_values,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMResponse represents the NativeAPMResponse API object

func (*NativeAPMResponse) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMResponse) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMResponse object and its children

type NativeAPMTransactionDetails added in v4.31.0

type NativeAPMTransactionDetails struct {
	// Gateway is the native APM Gateway details
	Gateway *NativeAPMTransactionDetailsGateway `json:"gateway,omitempty"`
	// Invoice is the native APM Invoice details
	Invoice *NativeAPMTransactionDetailsInvoice `json:"invoice,omitempty"`
	// Parameters is the native APM Parameter details
	Parameters *[]*NativeAPMParameterDefinition `json:"parameters,omitempty"`
	// State is the native APM Transaction State
	State *string `json:"state,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMTransactionDetails represents the NativeAPMTransactionDetails API object

func (*NativeAPMTransactionDetails) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMTransactionDetails) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMTransactionDetails object and its children

type NativeAPMTransactionDetailsGateway added in v4.31.0

type NativeAPMTransactionDetailsGateway struct {
	// DisplayName is the native APM Gateway display name
	DisplayName *string `json:"display_name,omitempty"`
	// LogoURL is the native APM Gateway logo url
	LogoURL *string `json:"logo_url,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMTransactionDetailsGateway represents the NativeAPMTransactionDetailsGateway API object

func (*NativeAPMTransactionDetailsGateway) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMTransactionDetailsGateway) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMTransactionDetailsGateway object and its children

type NativeAPMTransactionDetailsInvoice added in v4.31.0

type NativeAPMTransactionDetailsInvoice struct {
	// Amount is the native APM Invoice amount
	Amount *string `json:"amount,omitempty"`
	// CurrencyCode is the native APM Invoice currency code
	CurrencyCode *string `json:"currency_code,omitempty"`
	// contains filtered or unexported fields
}

NativeAPMTransactionDetailsInvoice represents the NativeAPMTransactionDetailsInvoice API object

func (*NativeAPMTransactionDetailsInvoice) Prefill added in v4.31.0

Prefil prefills the object with data provided in the parameter

func (*NativeAPMTransactionDetailsInvoice) SetClient added in v4.31.0

SetClient sets the client for the NativeAPMTransactionDetailsInvoice object and its children

type Options

type Options struct {
	IdempotencyKey string   `json:"-"`
	Expand         []string `json:"expand"`
	Filter         string   `json:"filter"`
	Limit          uint64   `json:"limit"`
	EndBefore      string   `json:"end_before"`
	StartAfter     string   `json:"start_after"`
	DisableLogging bool     `json:"-"`
}

Options represents the options available when doing a request to the ProcessOut API

type PaymentDataNetworkAuthentication added in v4.9.0

type PaymentDataNetworkAuthentication struct {
	// Cavv is the authentication CAVV
	Cavv *string `json:"cavv,omitempty"`
	// contains filtered or unexported fields
}

PaymentDataNetworkAuthentication represents the PaymentDataNetworkAuthentication API object

func (*PaymentDataNetworkAuthentication) Prefill added in v4.9.0

Prefil prefills the object with data provided in the parameter

func (*PaymentDataNetworkAuthentication) SetClient added in v4.9.0

SetClient sets the client for the PaymentDataNetworkAuthentication object and its children

type PaymentDataThreeDSAuthentication added in v4.9.0

type PaymentDataThreeDSAuthentication struct {
	// XID is the authentication XID
	XID *string `json:"XID,omitempty"`
	// contains filtered or unexported fields
}

PaymentDataThreeDSAuthentication represents the PaymentDataThreeDSAuthentication API object

func (*PaymentDataThreeDSAuthentication) Prefill added in v4.9.0

Prefil prefills the object with data provided in the parameter

func (*PaymentDataThreeDSAuthentication) SetClient added in v4.9.0

SetClient sets the client for the PaymentDataThreeDSAuthentication object and its children

type PaymentDataThreeDSRequest added in v4.9.0

type PaymentDataThreeDSRequest struct {
	// AcsURL is the uRL of the ACS
	AcsURL *string `json:"acs_url,omitempty"`
	// Pareq is the pAReq used during the 3DS authentication
	Pareq *string `json:"pareq,omitempty"`
	// Md is the mD used during the 3DS authentication
	Md *string `json:"md,omitempty"`
	// TermURL is the uRL of the 3DS term
	TermURL *string `json:"term_url,omitempty"`
	// contains filtered or unexported fields
}

PaymentDataThreeDSRequest represents the PaymentDataThreeDSRequest API object

func (*PaymentDataThreeDSRequest) Prefill added in v4.9.0

Prefil prefills the object with data provided in the parameter

func (*PaymentDataThreeDSRequest) SetClient added in v4.9.0

SetClient sets the client for the PaymentDataThreeDSRequest object and its children

type Payout added in v4.9.0

type Payout struct {
	// ID is the iD of the payout
	ID *string `json:"id,omitempty"`
	// Project is the project to which the payout belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the payout belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Status is the status of the payout
	Status *string `json:"status,omitempty"`
	// Amount is the amount of the payout
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency of the payout
	Currency *string `json:"currency,omitempty"`
	// Metadata is the metadata related to the payout, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// BankName is the name of the bank to which the payout was issued, if available
	BankName *string `json:"bank_name,omitempty"`
	// BankSummary is the summary of the bank to which the payout was issued, if available
	BankSummary *string `json:"bank_summary,omitempty"`
	// SalesTransactions is the number of completed transactions linked to the payout, if available
	SalesTransactions *int `json:"sales_transactions,omitempty"`
	// SalesVolume is the volume of completed transactions linked to the payout, if available
	SalesVolume *string `json:"sales_volume,omitempty"`
	// RefundsTransactions is the number of refunded transactions linked to the payout, if available
	RefundsTransactions *int `json:"refunds_transactions,omitempty"`
	// RefundsVolume is the volume of refunded transactions linked to the payout, if available
	RefundsVolume *string `json:"refunds_volume,omitempty"`
	// ChargebacksTransactions is the number of chargebacked transactions linked to the payout, if available
	ChargebacksTransactions *int `json:"chargebacks_transactions,omitempty"`
	// ChargebacksVolume is the volume of chargebacked transactions linked to the payout, if available
	ChargebacksVolume *string `json:"chargebacks_volume,omitempty"`
	// Fees is the fees linked to the payout, if available
	Fees *string `json:"fees,omitempty"`
	// Adjustments is the adjustments linked to the payout, if available
	Adjustments *string `json:"adjustments,omitempty"`
	// Reserve is the reserve kept on the payout, if available
	Reserve *string `json:"reserve,omitempty"`
	// SettledAt is the date at which the payout was settled
	SettledAt *time.Time `json:"settled_at,omitempty"`
	// CreatedAt is the date at which the payout was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Payout represents the Payout API object

func (Payout) All added in v4.9.0

func (s Payout) All(options ...PayoutAllParameters) (*Iterator, error)

All allows you to get all the payouts.

func (Payout) Delete added in v4.35.0

func (s Payout) Delete(payoutID string, options ...PayoutDeleteParameters) error

Delete allows you to delete the payout along with its payout items

func (Payout) FetchItems added in v4.9.0

func (s Payout) FetchItems(options ...PayoutFetchItemsParameters) (*Iterator, error)

FetchItems allows you to get all the items linked to the payout.

func (Payout) Find added in v4.9.0

func (s Payout) Find(payoutID string, options ...PayoutFindParameters) (*Payout, error)

Find allows you to find a payout by its ID.

func (*Payout) GetID added in v4.9.0

func (s *Payout) GetID() string

GetID implements the Identiable interface

func (*Payout) Prefill added in v4.9.0

func (s *Payout) Prefill(c *Payout) *Payout

Prefil prefills the object with data provided in the parameter

func (*Payout) SetClient added in v4.9.0

func (s *Payout) SetClient(c *ProcessOut) *Payout

SetClient sets the client for the Payout object and its children

type PayoutAllParameters added in v4.9.0

type PayoutAllParameters struct {
	*Options
	*Payout
}

PayoutAllParameters is the structure representing the additional parameters used to call Payout.All

type PayoutDeleteParameters added in v4.35.0

type PayoutDeleteParameters struct {
	*Options
	*Payout
}

PayoutDeleteParameters is the structure representing the additional parameters used to call Payout.Delete

type PayoutFetchItemsParameters added in v4.9.0

type PayoutFetchItemsParameters struct {
	*Options
	*Payout
}

PayoutFetchItemsParameters is the structure representing the additional parameters used to call Payout.FetchItems

type PayoutFindParameters added in v4.9.0

type PayoutFindParameters struct {
	*Options
	*Payout
}

PayoutFindParameters is the structure representing the additional parameters used to call Payout.Find

type PayoutItem added in v4.9.0

type PayoutItem struct {
	// ID is the iD of the payout item
	ID *string `json:"id,omitempty"`
	// Project is the project to which the payout item belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the payout item belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Payout is the payout to which the item belongs
	Payout *Payout `json:"payout,omitempty"`
	// PayoutID is the iD of the payout to which the item belongs
	PayoutID *string `json:"payout_id,omitempty"`
	// Transaction is the transaction linked to this payout item. Can be null
	Transaction *Transaction `json:"transaction,omitempty"`
	// TransactionID is the iD of the transaction linked to this payout item. Can be null
	TransactionID *string `json:"transaction_id,omitempty"`
	// Type is the type of the payout item
	Type *string `json:"type,omitempty"`
	// GatewayResourceID is the iD of the payout item from the payment gateway
	GatewayResourceID *string `json:"gateway_resource_id,omitempty"`
	// Amount is the amount related to this specific payout item. Can be null or 0.
	Amount *string `json:"amount,omitempty"`
	// Fees is the fee linked to this specific payout item. Can be null or 0.
	Fees *string `json:"fees,omitempty"`
	// Metadata is the metadata related to the payout item, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// CreatedAt is the date at which the payout item was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Breakdown is the breakdown of amount for the item
	Breakdown *PayoutItemAmountBreakdowns `json:"breakdown,omitempty"`
	// contains filtered or unexported fields
}

PayoutItem represents the PayoutItem API object

func (*PayoutItem) GetID added in v4.9.0

func (s *PayoutItem) GetID() string

GetID implements the Identiable interface

func (*PayoutItem) Prefill added in v4.9.0

func (s *PayoutItem) Prefill(c *PayoutItem) *PayoutItem

Prefil prefills the object with data provided in the parameter

func (*PayoutItem) SetClient added in v4.9.0

func (s *PayoutItem) SetClient(c *ProcessOut) *PayoutItem

SetClient sets the client for the PayoutItem object and its children

type PayoutItemAmountBreakdowns added in v4.36.0

type PayoutItemAmountBreakdowns struct {
	// SchemeFee is the amount relating to scheme fee
	SchemeFee *string `json:"scheme_fee,omitempty"`
	// InterchangeFee is the amount relating to interchange fee
	InterchangeFee *string `json:"interchange_fee,omitempty"`
	// GatewayFee is the amount relating to gateway fee
	GatewayFee *string `json:"gateway_fee,omitempty"`
	// MarkupFee is the amount relating to markup fee
	MarkupFee *string `json:"markup_fee,omitempty"`
	// AcquirerFee is the amount relating to acquirer fee
	AcquirerFee *string `json:"acquirer_fee,omitempty"`
	// OtherFee is the amount relating to other fee
	OtherFee *string `json:"other_fee,omitempty"`
	// contains filtered or unexported fields
}

PayoutItemAmountBreakdowns represents the PayoutItemAmountBreakdowns API object

func (*PayoutItemAmountBreakdowns) Prefill added in v4.36.0

Prefil prefills the object with data provided in the parameter

func (*PayoutItemAmountBreakdowns) SetClient added in v4.36.0

SetClient sets the client for the PayoutItemAmountBreakdowns object and its children

type Phone added in v4.36.0

type Phone struct {
	// Number is the phone number (without dialing code)
	Number *string `json:"number,omitempty"`
	// DialingCode is the phone number dialing code
	DialingCode *string `json:"dialing_code,omitempty"`
	// contains filtered or unexported fields
}

Phone represents the Phone API object

func (*Phone) Prefill added in v4.36.0

func (s *Phone) Prefill(c *Phone) *Phone

Prefil prefills the object with data provided in the parameter

func (*Phone) SetClient added in v4.36.0

func (s *Phone) SetClient(c *ProcessOut) *Phone

SetClient sets the client for the Phone object and its children

type Plan

type Plan struct {
	// ID is the iD of the plan
	ID *string `json:"id,omitempty"`
	// Project is the project to which the plan belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the plan belongs
	ProjectID *string `json:"project_id,omitempty"`
	// URL is the uRL to which you may redirect your customer to activate the subscription plan
	URL *string `json:"url,omitempty"`
	// Name is the name of the plan
	Name *string `json:"name,omitempty"`
	// Amount is the amount of the plan
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency of the plan
	Currency *string `json:"currency,omitempty"`
	// Metadata is the metadata related to the plan, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Interval is the the plan interval, formatted in the format "1d2w3m4y" (day, week, month, year)
	Interval *string `json:"interval,omitempty"`
	// TrialPeriod is the the trial period. The customer will not be charged during this time span. Formatted in the format "1d2w3m4y" (day, week, month, year)
	TrialPeriod *string `json:"trial_period,omitempty"`
	// ReturnURL is the uRL where the customer will be redirected when activating the subscription created using this plan
	ReturnURL *string `json:"return_url,omitempty"`
	// CancelURL is the uRL where the customer will be redirected when cancelling the subscription created using this plan
	CancelURL *string `json:"cancel_url,omitempty"`
	// Sandbox is the define whether or not the plan is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the plan was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Plan represents the Plan API object

func (Plan) All

func (s Plan) All(options ...PlanAllParameters) (*Iterator, error)

All allows you to get all the plans.

func (Plan) Create

func (s Plan) Create(options ...PlanCreateParameters) (*Plan, error)

Create allows you to create a new plan.

func (Plan) End

func (s Plan) End(options ...PlanEndParameters) error

End allows you to delete a plan. Subscriptions linked to this plan won't be affected.

func (Plan) Find

func (s Plan) Find(planID string, options ...PlanFindParameters) (*Plan, error)

Find allows you to find a plan by its ID.

func (*Plan) GetID added in v4.1.0

func (s *Plan) GetID() string

GetID implements the Identiable interface

func (*Plan) Prefill

func (s *Plan) Prefill(c *Plan) *Plan

Prefil prefills the object with data provided in the parameter

func (Plan) Save

func (s Plan) Save(options ...PlanSaveParameters) (*Plan, error)

Save allows you to save the updated plan attributes. This action won't affect subscriptions already linked to this plan.

func (*Plan) SetClient

func (s *Plan) SetClient(c *ProcessOut) *Plan

SetClient sets the client for the Plan object and its children

type PlanAllParameters

type PlanAllParameters struct {
	*Options
	*Plan
}

PlanAllParameters is the structure representing the additional parameters used to call Plan.All

type PlanCreateParameters

type PlanCreateParameters struct {
	*Options
	*Plan
}

PlanCreateParameters is the structure representing the additional parameters used to call Plan.Create

type PlanEndParameters

type PlanEndParameters struct {
	*Options
	*Plan
}

PlanEndParameters is the structure representing the additional parameters used to call Plan.End

type PlanFindParameters

type PlanFindParameters struct {
	*Options
	*Plan
}

PlanFindParameters is the structure representing the additional parameters used to call Plan.Find

type PlanSaveParameters

type PlanSaveParameters struct {
	*Options
	*Plan
}

PlanSaveParameters is the structure representing the additional parameters used to call Plan.Save

type ProcessOut

type ProcessOut struct {
	// APIVersion is the version of the API to use
	APIVersion string
	// UserAgent is the UserAgent that will be used to send the request
	UserAgent string

	// HTTPClient used to make requests
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ProcessOut wraps all the components of the package in a single structure

func New

func New(projectID, projectSecret string) *ProcessOut

New creates a new struct *ProcessOut with the given API credentials. It initializes all the resources available so they can be used immediately.

func (*ProcessOut) NewAPIVersion

func (c *ProcessOut) NewAPIVersion(prefill ...*APIVersion) *APIVersion

NewAPIVersion creates a new APIVersion object

func (*ProcessOut) NewActivity

func (c *ProcessOut) NewActivity(prefill ...*Activity) *Activity

NewActivity creates a new Activity object

func (*ProcessOut) NewAddon

func (c *ProcessOut) NewAddon(prefill ...*Addon) *Addon

NewAddon creates a new Addon object

func (*ProcessOut) NewAlternativeMerchantCertificate added in v4.25.0

func (c *ProcessOut) NewAlternativeMerchantCertificate(prefill ...*AlternativeMerchantCertificate) *AlternativeMerchantCertificate

NewAlternativeMerchantCertificate creates a new AlternativeMerchantCertificate object

func (*ProcessOut) NewApplePayAlternativeMerchantCertificates added in v4.25.0

func (c *ProcessOut) NewApplePayAlternativeMerchantCertificates(prefill ...*ApplePayAlternativeMerchantCertificates) *ApplePayAlternativeMerchantCertificates

NewApplePayAlternativeMerchantCertificates creates a new ApplePayAlternativeMerchantCertificates object

func (*ProcessOut) NewBalance added in v4.22.0

func (c *ProcessOut) NewBalance(prefill ...*Balance) *Balance

NewBalance creates a new Balance object

func (*ProcessOut) NewBalances added in v4.22.0

func (c *ProcessOut) NewBalances(prefill ...*Balances) *Balances

NewBalances creates a new Balances object

func (*ProcessOut) NewCard

func (c *ProcessOut) NewCard(prefill ...*Card) *Card

NewCard creates a new Card object

func (*ProcessOut) NewCardContact added in v4.36.0

func (c *ProcessOut) NewCardContact(prefill ...*CardContact) *CardContact

NewCardContact creates a new CardContact object

func (*ProcessOut) NewCardCreateRequest added in v4.36.0

func (c *ProcessOut) NewCardCreateRequest(prefill ...*CardCreateRequest) *CardCreateRequest

NewCardCreateRequest creates a new CardCreateRequest object

func (*ProcessOut) NewCardInformation

func (c *ProcessOut) NewCardInformation(prefill ...*CardInformation) *CardInformation

NewCardInformation creates a new CardInformation object

func (*ProcessOut) NewCardShipping added in v4.36.0

func (c *ProcessOut) NewCardShipping(prefill ...*CardShipping) *CardShipping

NewCardShipping creates a new CardShipping object

func (*ProcessOut) NewCardUpdateRequest added in v4.36.0

func (c *ProcessOut) NewCardUpdateRequest(prefill ...*CardUpdateRequest) *CardUpdateRequest

NewCardUpdateRequest creates a new CardUpdateRequest object

func (*ProcessOut) NewCategoryErrorCodes added in v4.32.2

func (c *ProcessOut) NewCategoryErrorCodes(prefill ...*CategoryErrorCodes) *CategoryErrorCodes

NewCategoryErrorCodes creates a new CategoryErrorCodes object

func (*ProcessOut) NewCoupon

func (c *ProcessOut) NewCoupon(prefill ...*Coupon) *Coupon

NewCoupon creates a new Coupon object

func (*ProcessOut) NewCustomer

func (c *ProcessOut) NewCustomer(prefill ...*Customer) *Customer

NewCustomer creates a new Customer object

func (*ProcessOut) NewCustomerAction

func (c *ProcessOut) NewCustomerAction(prefill ...*CustomerAction) *CustomerAction

NewCustomerAction creates a new CustomerAction object

func (*ProcessOut) NewCustomerPhone added in v4.32.2

func (c *ProcessOut) NewCustomerPhone(prefill ...*CustomerPhone) *CustomerPhone

NewCustomerPhone creates a new CustomerPhone object

func (*ProcessOut) NewDevice added in v4.36.0

func (c *ProcessOut) NewDevice(prefill ...*Device) *Device

NewDevice creates a new Device object

func (*ProcessOut) NewDiscount

func (c *ProcessOut) NewDiscount(prefill ...*Discount) *Discount

NewDiscount creates a new Discount object

func (*ProcessOut) NewDunningAction

func (c *ProcessOut) NewDunningAction(prefill ...*DunningAction) *DunningAction

NewDunningAction creates a new DunningAction object

func (*ProcessOut) NewErrorCodes added in v4.32.2

func (c *ProcessOut) NewErrorCodes(prefill ...*ErrorCodes) *ErrorCodes

NewErrorCodes creates a new ErrorCodes object

func (*ProcessOut) NewEvent

func (c *ProcessOut) NewEvent(prefill ...*Event) *Event

NewEvent creates a new Event object

func (*ProcessOut) NewGateway

func (c *ProcessOut) NewGateway(prefill ...*Gateway) *Gateway

NewGateway creates a new Gateway object

func (*ProcessOut) NewGatewayConfiguration

func (c *ProcessOut) NewGatewayConfiguration(prefill ...*GatewayConfiguration) *GatewayConfiguration

NewGatewayConfiguration creates a new GatewayConfiguration object

func (*ProcessOut) NewInvoice

func (c *ProcessOut) NewInvoice(prefill ...*Invoice) *Invoice

NewInvoice creates a new Invoice object

func (*ProcessOut) NewInvoiceBilling added in v4.31.0

func (c *ProcessOut) NewInvoiceBilling(prefill ...*InvoiceBilling) *InvoiceBilling

NewInvoiceBilling creates a new InvoiceBilling object

func (*ProcessOut) NewInvoiceDetail

func (c *ProcessOut) NewInvoiceDetail(prefill ...*InvoiceDetail) *InvoiceDetail

NewInvoiceDetail creates a new InvoiceDetail object

func (*ProcessOut) NewInvoiceDevice added in v4.17.1

func (c *ProcessOut) NewInvoiceDevice(prefill ...*InvoiceDevice) *InvoiceDevice

NewInvoiceDevice creates a new InvoiceDevice object

func (*ProcessOut) NewInvoiceExternalFraudTools added in v4.20.1

func (c *ProcessOut) NewInvoiceExternalFraudTools(prefill ...*InvoiceExternalFraudTools) *InvoiceExternalFraudTools

NewInvoiceExternalFraudTools creates a new InvoiceExternalFraudTools object

func (*ProcessOut) NewInvoiceRisk added in v4.17.1

func (c *ProcessOut) NewInvoiceRisk(prefill ...*InvoiceRisk) *InvoiceRisk

NewInvoiceRisk creates a new InvoiceRisk object

func (*ProcessOut) NewInvoiceShipping added in v4.17.1

func (c *ProcessOut) NewInvoiceShipping(prefill ...*InvoiceShipping) *InvoiceShipping

NewInvoiceShipping creates a new InvoiceShipping object

func (*ProcessOut) NewInvoiceShippingPhone added in v4.32.2

func (c *ProcessOut) NewInvoiceShippingPhone(prefill ...*InvoiceShippingPhone) *InvoiceShippingPhone

NewInvoiceShippingPhone creates a new InvoiceShippingPhone object

func (*ProcessOut) NewInvoiceTax added in v4.21.0

func (c *ProcessOut) NewInvoiceTax(prefill ...*InvoiceTax) *InvoiceTax

NewInvoiceTax creates a new InvoiceTax object

func (*ProcessOut) NewInvoicesProcessNativePaymentResponse added in v4.32.2

func (c *ProcessOut) NewInvoicesProcessNativePaymentResponse(prefill ...*InvoicesProcessNativePaymentResponse) *InvoicesProcessNativePaymentResponse

NewInvoicesProcessNativePaymentResponse creates a new InvoicesProcessNativePaymentResponse object

func (*ProcessOut) NewNativeAPMParameterDefinition added in v4.31.0

func (c *ProcessOut) NewNativeAPMParameterDefinition(prefill ...*NativeAPMParameterDefinition) *NativeAPMParameterDefinition

NewNativeAPMParameterDefinition creates a new NativeAPMParameterDefinition object

func (*ProcessOut) NewNativeAPMParameterValue added in v4.31.0

func (c *ProcessOut) NewNativeAPMParameterValue(prefill ...*NativeAPMParameterValue) *NativeAPMParameterValue

NewNativeAPMParameterValue creates a new NativeAPMParameterValue object

func (*ProcessOut) NewNativeAPMParameterValueDefinition added in v4.31.0

func (c *ProcessOut) NewNativeAPMParameterValueDefinition(prefill ...*NativeAPMParameterValueDefinition) *NativeAPMParameterValueDefinition

NewNativeAPMParameterValueDefinition creates a new NativeAPMParameterValueDefinition object

func (*ProcessOut) NewNativeAPMRequest added in v4.31.0

func (c *ProcessOut) NewNativeAPMRequest(prefill ...*NativeAPMRequest) *NativeAPMRequest

NewNativeAPMRequest creates a new NativeAPMRequest object

func (*ProcessOut) NewNativeAPMResponse added in v4.31.0

func (c *ProcessOut) NewNativeAPMResponse(prefill ...*NativeAPMResponse) *NativeAPMResponse

NewNativeAPMResponse creates a new NativeAPMResponse object

func (*ProcessOut) NewNativeAPMTransactionDetails added in v4.31.0

func (c *ProcessOut) NewNativeAPMTransactionDetails(prefill ...*NativeAPMTransactionDetails) *NativeAPMTransactionDetails

NewNativeAPMTransactionDetails creates a new NativeAPMTransactionDetails object

func (*ProcessOut) NewNativeAPMTransactionDetailsGateway added in v4.31.0

func (c *ProcessOut) NewNativeAPMTransactionDetailsGateway(prefill ...*NativeAPMTransactionDetailsGateway) *NativeAPMTransactionDetailsGateway

NewNativeAPMTransactionDetailsGateway creates a new NativeAPMTransactionDetailsGateway object

func (*ProcessOut) NewNativeAPMTransactionDetailsInvoice added in v4.31.0

func (c *ProcessOut) NewNativeAPMTransactionDetailsInvoice(prefill ...*NativeAPMTransactionDetailsInvoice) *NativeAPMTransactionDetailsInvoice

NewNativeAPMTransactionDetailsInvoice creates a new NativeAPMTransactionDetailsInvoice object

func (*ProcessOut) NewPaymentDataNetworkAuthentication added in v4.9.0

func (c *ProcessOut) NewPaymentDataNetworkAuthentication(prefill ...*PaymentDataNetworkAuthentication) *PaymentDataNetworkAuthentication

NewPaymentDataNetworkAuthentication creates a new PaymentDataNetworkAuthentication object

func (*ProcessOut) NewPaymentDataThreeDSAuthentication added in v4.9.0

func (c *ProcessOut) NewPaymentDataThreeDSAuthentication(prefill ...*PaymentDataThreeDSAuthentication) *PaymentDataThreeDSAuthentication

NewPaymentDataThreeDSAuthentication creates a new PaymentDataThreeDSAuthentication object

func (*ProcessOut) NewPaymentDataThreeDSRequest added in v4.9.0

func (c *ProcessOut) NewPaymentDataThreeDSRequest(prefill ...*PaymentDataThreeDSRequest) *PaymentDataThreeDSRequest

NewPaymentDataThreeDSRequest creates a new PaymentDataThreeDSRequest object

func (*ProcessOut) NewPayout added in v4.9.0

func (c *ProcessOut) NewPayout(prefill ...*Payout) *Payout

NewPayout creates a new Payout object

func (*ProcessOut) NewPayoutItem added in v4.9.0

func (c *ProcessOut) NewPayoutItem(prefill ...*PayoutItem) *PayoutItem

NewPayoutItem creates a new PayoutItem object

func (*ProcessOut) NewPayoutItemAmountBreakdowns added in v4.36.0

func (c *ProcessOut) NewPayoutItemAmountBreakdowns(prefill ...*PayoutItemAmountBreakdowns) *PayoutItemAmountBreakdowns

NewPayoutItemAmountBreakdowns creates a new PayoutItemAmountBreakdowns object

func (*ProcessOut) NewPhone added in v4.36.0

func (c *ProcessOut) NewPhone(prefill ...*Phone) *Phone

NewPhone creates a new Phone object

func (*ProcessOut) NewPlan

func (c *ProcessOut) NewPlan(prefill ...*Plan) *Plan

NewPlan creates a new Plan object

func (*ProcessOut) NewProduct

func (c *ProcessOut) NewProduct(prefill ...*Product) *Product

NewProduct creates a new Product object

func (*ProcessOut) NewProject

func (c *ProcessOut) NewProject(prefill ...*Project) *Project

NewProject creates a new Project object

func (*ProcessOut) NewProjectSFTPSettings added in v4.32.2

func (c *ProcessOut) NewProjectSFTPSettings(prefill ...*ProjectSFTPSettings) *ProjectSFTPSettings

NewProjectSFTPSettings creates a new ProjectSFTPSettings object

func (*ProcessOut) NewProjectSFTPSettingsPublic added in v4.37.0

func (c *ProcessOut) NewProjectSFTPSettingsPublic(prefill ...*ProjectSFTPSettingsPublic) *ProjectSFTPSettingsPublic

NewProjectSFTPSettingsPublic creates a new ProjectSFTPSettingsPublic object

func (*ProcessOut) NewRefund

func (c *ProcessOut) NewRefund(prefill ...*Refund) *Refund

NewRefund creates a new Refund object

func (*ProcessOut) NewSubscription

func (c *ProcessOut) NewSubscription(prefill ...*Subscription) *Subscription

NewSubscription creates a new Subscription object

func (*ProcessOut) NewThreeDS added in v4.20.4

func (c *ProcessOut) NewThreeDS(prefill ...*ThreeDS) *ThreeDS

NewThreeDS creates a new ThreeDS object

func (*ProcessOut) NewToken

func (c *ProcessOut) NewToken(prefill ...*Token) *Token

NewToken creates a new Token object

func (*ProcessOut) NewTransaction

func (c *ProcessOut) NewTransaction(prefill ...*Transaction) *Transaction

NewTransaction creates a new Transaction object

func (*ProcessOut) NewTransactionOperation

func (c *ProcessOut) NewTransactionOperation(prefill ...*TransactionOperation) *TransactionOperation

NewTransactionOperation creates a new TransactionOperation object

func (*ProcessOut) NewUnsupportedFeatureBypass added in v4.32.2

func (c *ProcessOut) NewUnsupportedFeatureBypass(prefill ...*UnsupportedFeatureBypass) *UnsupportedFeatureBypass

NewUnsupportedFeatureBypass creates a new UnsupportedFeatureBypass object

func (*ProcessOut) NewWebhook

func (c *ProcessOut) NewWebhook(prefill ...*Webhook) *Webhook

NewWebhook creates a new Webhook object

func (*ProcessOut) NewWebhookEndpoint

func (c *ProcessOut) NewWebhookEndpoint(prefill ...*WebhookEndpoint) *WebhookEndpoint

NewWebhookEndpoint creates a new WebhookEndpoint object

type Product

type Product struct {
	// ID is the iD of the product
	ID *string `json:"id,omitempty"`
	// Project is the project to which the product belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the product belongs
	ProjectID *string `json:"project_id,omitempty"`
	// URL is the uRL to which you may redirect your customer to proceed with the payment
	URL *string `json:"url,omitempty"`
	// Name is the name of the product
	Name *string `json:"name,omitempty"`
	// Amount is the amount of the product
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency of the product
	Currency *string `json:"currency,omitempty"`
	// Metadata is the metadata related to the product, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// ReturnURL is the uRL where the customer will be redirected upon payment
	ReturnURL *string `json:"return_url,omitempty"`
	// CancelURL is the uRL where the customer will be redirected if the paymen was canceled
	CancelURL *string `json:"cancel_url,omitempty"`
	// Sandbox is the define whether or not the product is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the product was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Product represents the Product API object

func (Product) All

func (s Product) All(options ...ProductAllParameters) (*Iterator, error)

All allows you to get all the products.

func (Product) Create

func (s Product) Create(options ...ProductCreateParameters) (*Product, error)

Create allows you to create a new product.

func (Product) CreateInvoice

func (s Product) CreateInvoice(options ...ProductCreateInvoiceParameters) (*Invoice, error)

CreateInvoice allows you to create a new invoice from the product.

func (Product) Delete

func (s Product) Delete(options ...ProductDeleteParameters) error

Delete allows you to delete the product.

func (Product) Find

func (s Product) Find(productID string, options ...ProductFindParameters) (*Product, error)

Find allows you to find a product by its ID.

func (*Product) GetID added in v4.1.0

func (s *Product) GetID() string

GetID implements the Identiable interface

func (*Product) Prefill

func (s *Product) Prefill(c *Product) *Product

Prefil prefills the object with data provided in the parameter

func (Product) Save

func (s Product) Save(options ...ProductSaveParameters) (*Product, error)

Save allows you to save the updated product attributes.

func (*Product) SetClient

func (s *Product) SetClient(c *ProcessOut) *Product

SetClient sets the client for the Product object and its children

type ProductAllParameters

type ProductAllParameters struct {
	*Options
	*Product
}

ProductAllParameters is the structure representing the additional parameters used to call Product.All

type ProductCreateInvoiceParameters

type ProductCreateInvoiceParameters struct {
	*Options
	*Product
}

ProductCreateInvoiceParameters is the structure representing the additional parameters used to call Product.CreateInvoice

type ProductCreateParameters

type ProductCreateParameters struct {
	*Options
	*Product
}

ProductCreateParameters is the structure representing the additional parameters used to call Product.Create

type ProductDeleteParameters

type ProductDeleteParameters struct {
	*Options
	*Product
}

ProductDeleteParameters is the structure representing the additional parameters used to call Product.Delete

type ProductFindParameters

type ProductFindParameters struct {
	*Options
	*Product
}

ProductFindParameters is the structure representing the additional parameters used to call Product.Find

type ProductSaveParameters

type ProductSaveParameters struct {
	*Options
	*Product
}

ProductSaveParameters is the structure representing the additional parameters used to call Product.Save

type Project

type Project struct {
	// ID is the iD of the project
	ID *string `json:"id,omitempty"`
	// SupervisorProject is the project used to create this project
	SupervisorProject *Project `json:"supervisor_project,omitempty"`
	// SupervisorProjectID is the iD of the project used to create this project
	SupervisorProjectID *string `json:"supervisor_project_id,omitempty"`
	// APIVersion is the current API version of the project
	APIVersion *APIVersion `json:"api_version,omitempty"`
	// Name is the name of the project
	Name *string `json:"name,omitempty"`
	// LogoURL is the name of the project
	LogoURL *string `json:"logo_url,omitempty"`
	// Email is the email of the project
	Email *string `json:"email,omitempty"`
	// DefaultCurrency is the default currency of the project, used to compute analytics amounts
	DefaultCurrency *string `json:"default_currency,omitempty"`
	// PrivateKey is the private key of the project. Only returned when creating a project
	PrivateKey *string `json:"private_key,omitempty"`
	// DunningConfiguration is the dunning configuration of the project
	DunningConfiguration *[]*DunningAction `json:"dunning_configuration,omitempty"`
	// CreatedAt is the date at which the project was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

Project represents the Project API object

func (Project) CreateSupervised added in v4.7.0

func (s Project) CreateSupervised(options ...ProjectCreateSupervisedParameters) (*Project, error)

CreateSupervised allows you to create a new supervised project.

func (Project) Delete added in v4.9.0

func (s Project) Delete(options ...ProjectDeleteParameters) error

Delete allows you to delete the project. Be careful! Executing this request will prevent any further interaction with the API that uses this project.

func (Project) Fetch added in v4.9.0

func (s Project) Fetch(options ...ProjectFetchParameters) (*Project, error)

Fetch allows you to fetch the current project information.

func (Project) FetchSupervised added in v4.9.0

func (s Project) FetchSupervised(options ...ProjectFetchSupervisedParameters) (*Iterator, error)

FetchSupervised allows you to get all the supervised projects.

func (*Project) GetID added in v4.1.0

func (s *Project) GetID() string

GetID implements the Identiable interface

func (*Project) Prefill

func (s *Project) Prefill(c *Project) *Project

Prefil prefills the object with data provided in the parameter

func (Project) Save added in v4.9.0

func (s Project) Save(options ...ProjectSaveParameters) (*Project, error)

Save allows you to save the updated project's attributes.

func (*Project) SetClient

func (s *Project) SetClient(c *ProcessOut) *Project

SetClient sets the client for the Project object and its children

type ProjectCreateSupervisedParameters added in v4.7.0

type ProjectCreateSupervisedParameters struct {
	*Options
	*Project
	ApplepaySettings interface{} `json:"applepay_settings"`
}

ProjectCreateSupervisedParameters is the structure representing the additional parameters used to call Project.CreateSupervised

type ProjectDeleteParameters added in v4.9.0

type ProjectDeleteParameters struct {
	*Options
	*Project
}

ProjectDeleteParameters is the structure representing the additional parameters used to call Project.Delete

type ProjectFetchParameters added in v4.9.0

type ProjectFetchParameters struct {
	*Options
	*Project
}

ProjectFetchParameters is the structure representing the additional parameters used to call Project.Fetch

type ProjectFetchSupervisedParameters added in v4.9.0

type ProjectFetchSupervisedParameters struct {
	*Options
	*Project
}

ProjectFetchSupervisedParameters is the structure representing the additional parameters used to call Project.FetchSupervised

type ProjectSFTPSettings added in v4.32.2

type ProjectSFTPSettings struct {
	// Endpoint is the sFTP server endpoint, port is required
	Endpoint *string `json:"endpoint,omitempty"`
	// Username is the sFTP server username
	Username *string `json:"username,omitempty"`
	// Password is the sFTP server password, required when no 'private_key' is passed
	Password *string `json:"password,omitempty"`
	// PrivateKey is the sFTP server private key, required when no 'password' is passed
	PrivateKey *string `json:"private_key,omitempty"`
	// contains filtered or unexported fields
}

ProjectSFTPSettings represents the ProjectSFTPSettings API object

func (ProjectSFTPSettings) DeleteSftpSettings added in v4.32.2

DeleteSftpSettings allows you to delete the SFTP settings for the project.

func (*ProjectSFTPSettings) Prefill added in v4.32.2

Prefil prefills the object with data provided in the parameter

func (ProjectSFTPSettings) SaveSftpSettings added in v4.32.2

SaveSftpSettings allows you to save the SFTP settings for the project.

func (*ProjectSFTPSettings) SetClient added in v4.32.2

SetClient sets the client for the ProjectSFTPSettings object and its children

type ProjectSFTPSettingsDeleteSftpSettingsParameters added in v4.32.2

type ProjectSFTPSettingsDeleteSftpSettingsParameters struct {
	*Options
	*ProjectSFTPSettings
}

ProjectSFTPSettingsDeleteSftpSettingsParameters is the structure representing the additional parameters used to call ProjectSFTPSettings.DeleteSftpSettings

type ProjectSFTPSettingsPublic added in v4.37.0

type ProjectSFTPSettingsPublic struct {
	// Enabled is the whether the SFTP settings are enabled
	Enabled *bool `json:"enabled,omitempty"`
	// Endpoint is the sFTP server endpoint with port
	Endpoint *string `json:"endpoint,omitempty"`
	// Username is the sFTP server username
	Username *string `json:"username,omitempty"`
	// contains filtered or unexported fields
}

ProjectSFTPSettingsPublic represents the ProjectSFTPSettingsPublic API object

func (ProjectSFTPSettingsPublic) FetchSftpSettings added in v4.37.0

FetchSftpSettings allows you to fetch the SFTP settings for the project.

func (*ProjectSFTPSettingsPublic) Prefill added in v4.37.0

Prefil prefills the object with data provided in the parameter

func (*ProjectSFTPSettingsPublic) SetClient added in v4.37.0

SetClient sets the client for the ProjectSFTPSettingsPublic object and its children

type ProjectSFTPSettingsPublicFetchSftpSettingsParameters added in v4.37.0

type ProjectSFTPSettingsPublicFetchSftpSettingsParameters struct {
	*Options
	*ProjectSFTPSettingsPublic
}

ProjectSFTPSettingsPublicFetchSftpSettingsParameters is the structure representing the additional parameters used to call ProjectSFTPSettingsPublic.FetchSftpSettings

type ProjectSFTPSettingsSaveSftpSettingsParameters added in v4.32.2

type ProjectSFTPSettingsSaveSftpSettingsParameters struct {
	*Options
	*ProjectSFTPSettings
}

ProjectSFTPSettingsSaveSftpSettingsParameters is the structure representing the additional parameters used to call ProjectSFTPSettings.SaveSftpSettings

type ProjectSaveParameters added in v4.9.0

type ProjectSaveParameters struct {
	*Options
	*Project
}

ProjectSaveParameters is the structure representing the additional parameters used to call Project.Save

type Refund

type Refund struct {
	// ID is the iD of the refund
	ID *string `json:"id,omitempty"`
	// Transaction is the transaction to which the refund is applied
	Transaction *Transaction `json:"transaction,omitempty"`
	// TransactionID is the iD of the transaction to which the refund is applied
	TransactionID *string `json:"transaction_id,omitempty"`
	// Amount is the amount to be refunded. Must not be greater than the amount still available on the transaction
	Amount *string `json:"amount,omitempty"`
	// Reason is the reason for the refund. Either customer_request, duplicate or fraud
	Reason *string `json:"reason,omitempty"`
	// Information is the custom details regarding the refund
	Information *string `json:"information,omitempty"`
	// HasFailed is the true if the refund was asynchronously failed, false otherwise
	HasFailed *bool `json:"has_failed,omitempty"`
	// Metadata is the metadata related to the refund, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Sandbox is the define whether or not the refund is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the refund was done
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// InvoiceDetailIds is the list of invoice details ids to refund
	InvoiceDetailIds *[]string `json:"invoice_detail_ids,omitempty"`
	// contains filtered or unexported fields
}

Refund represents the Refund API object

func (Refund) Create added in v4.1.0

func (s Refund) Create(options ...RefundCreateParameters) error

Create allows you to create a refund for a transaction.

func (Refund) CreateForInvoice added in v4.32.2

func (s Refund) CreateForInvoice(invoiceID string, options ...RefundCreateForInvoiceParameters) error

CreateForInvoice allows you to create a refund for an invoice.

func (Refund) FetchTransactionRefunds added in v4.1.0

func (s Refund) FetchTransactionRefunds(transactionID string, options ...RefundFetchTransactionRefundsParameters) (*Iterator, error)

FetchTransactionRefunds allows you to get the transaction's refunds.

func (Refund) Find

func (s Refund) Find(transactionID, refundID string, options ...RefundFindParameters) (*Refund, error)

Find allows you to find a transaction's refund by its ID.

func (*Refund) GetID added in v4.1.0

func (s *Refund) GetID() string

GetID implements the Identiable interface

func (*Refund) Prefill

func (s *Refund) Prefill(c *Refund) *Refund

Prefil prefills the object with data provided in the parameter

func (*Refund) SetClient

func (s *Refund) SetClient(c *ProcessOut) *Refund

SetClient sets the client for the Refund object and its children

type RefundCreateForInvoiceParameters added in v4.32.2

type RefundCreateForInvoiceParameters struct {
	*Options
	*Refund
	Metadata interface{} `json:"metadata"`
}

RefundCreateForInvoiceParameters is the structure representing the additional parameters used to call Refund.CreateForInvoice

type RefundCreateParameters added in v4.1.0

type RefundCreateParameters struct {
	*Options
	*Refund
	Metadata interface{} `json:"metadata"`
}

RefundCreateParameters is the structure representing the additional parameters used to call Refund.Create

type RefundFetchTransactionRefundsParameters added in v4.1.0

type RefundFetchTransactionRefundsParameters struct {
	*Options
	*Refund
}

RefundFetchTransactionRefundsParameters is the structure representing the additional parameters used to call Refund.FetchTransactionRefunds

type RefundFindParameters

type RefundFindParameters struct {
	*Options
	*Refund
}

RefundFindParameters is the structure representing the additional parameters used to call Refund.Find

type Subscription

type Subscription struct {
	// ID is the iD of the subscription
	ID *string `json:"id,omitempty"`
	// Project is the project to which the subscription belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the subscription belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Plan is the plan linked to this subscription, if any
	Plan *Plan `json:"plan,omitempty"`
	// PlanID is the iD of the plan linked to this subscription, if any
	PlanID *string `json:"plan_id,omitempty"`
	// Discounts is the list of the subscription discounts
	Discounts *[]*Discount `json:"discounts,omitempty"`
	// Addons is the list of the subscription addons
	Addons *[]*Addon `json:"addons,omitempty"`
	// Transactions is the list of the subscription transactions
	Transactions *[]*Transaction `json:"transactions,omitempty"`
	// Customer is the customer linked to the subscription
	Customer *Customer `json:"customer,omitempty"`
	// CustomerID is the iD of the customer linked to the subscription
	CustomerID *string `json:"customer_id,omitempty"`
	// Token is the token used to capture payments on this subscription
	Token *Token `json:"token,omitempty"`
	// TokenID is the iD of the token used to capture payments on this subscription
	TokenID *string `json:"token_id,omitempty"`
	// URL is the uRL to which you may redirect your customer to activate the subscription
	URL *string `json:"url,omitempty"`
	// Name is the name of the subscription
	Name *string `json:"name,omitempty"`
	// Amount is the base amount of the subscription
	Amount *string `json:"amount,omitempty"`
	// BillableAmount is the amount to be paid at each billing cycle of the subscription
	BillableAmount *string `json:"billable_amount,omitempty"`
	// DiscountedAmount is the amount discounted by discounts applied to the subscription
	DiscountedAmount *string `json:"discounted_amount,omitempty"`
	// AddonsAmount is the amount applied on top of the subscription base price with addons
	AddonsAmount *string `json:"addons_amount,omitempty"`
	// Currency is the currency of the subscription
	Currency *string `json:"currency,omitempty"`
	// Metadata is the metadata related to the subscription, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Interval is the the subscription interval, formatted in the format "1d2w3m4y" (day, week, month, year)
	Interval *string `json:"interval,omitempty"`
	// TrialEndAt is the date at which the subscription trial should end. Can be null to set no trial
	TrialEndAt *time.Time `json:"trial_end_at,omitempty"`
	// Activated is the whether or not the subscription was activated. This field does not take into account whether or not the subscription was canceled. Use the active field to know if the subscription is currently active
	Activated *bool `json:"activated,omitempty"`
	// Active is the whether or not the subscription is currently active (ie activated and not cancelled)
	Active *bool `json:"active,omitempty"`
	// CancelAt is the date at which the subscription will automatically be canceled. Can be null
	CancelAt *time.Time `json:"cancel_at,omitempty"`
	// Canceled is the whether or not the subscription was canceled. The cancellation reason can be found in the cancellation_reason field
	Canceled *bool `json:"canceled,omitempty"`
	// CancellationReason is the reason as to why the subscription was cancelled
	CancellationReason *string `json:"cancellation_reason,omitempty"`
	// PendingCancellation is the whether or not the subscription is pending cancellation (meaning a cancel_at date was set)
	PendingCancellation *bool `json:"pending_cancellation,omitempty"`
	// ReturnURL is the uRL where the customer will be redirected upon activation of the subscription
	ReturnURL *string `json:"return_url,omitempty"`
	// CancelURL is the uRL where the customer will be redirected if the subscription activation was canceled
	CancelURL *string `json:"cancel_url,omitempty"`
	// UnpaidState is the when the subscription has unpaid invoices, defines the dunning logic of the subscription (as specified in the project settings)
	UnpaidState *string `json:"unpaid_state,omitempty"`
	// Sandbox is the define whether or not the subscription is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the subscription was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// ActivatedAt is the date at which the subscription was activated. Null if the subscription hasn't been activated yet
	ActivatedAt *time.Time `json:"activated_at,omitempty"`
	// IterateAt is the next iteration date, corresponding to the next billing cycle start date
	IterateAt *time.Time `json:"iterate_at,omitempty"`
	// contains filtered or unexported fields
}

Subscription represents the Subscription API object

func (Subscription) All

func (s Subscription) All(options ...SubscriptionAllParameters) (*Iterator, error)

All allows you to get all the subscriptions.

func (Subscription) Cancel

Cancel allows you to cancel a subscription. The reason may be provided as well.

func (Subscription) Create

Create allows you to create a new subscription for the given customer.

func (Subscription) DeleteAddon added in v4.1.0

func (s Subscription) DeleteAddon(addonID string, options ...SubscriptionDeleteAddonParameters) error

DeleteAddon allows you to delete an addon applied to a subscription.

func (Subscription) DeleteDiscount added in v4.1.0

func (s Subscription) DeleteDiscount(discountID string, options ...SubscriptionDeleteDiscountParameters) error

DeleteDiscount allows you to delete a discount applied to a subscription.

func (Subscription) FetchAddons

func (s Subscription) FetchAddons(options ...SubscriptionFetchAddonsParameters) (*Iterator, error)

FetchAddons allows you to get the addons applied to the subscription.

func (Subscription) FetchCustomer

func (s Subscription) FetchCustomer(options ...SubscriptionFetchCustomerParameters) (*Customer, error)

FetchCustomer allows you to get the customer owning the subscription.

func (Subscription) FetchDiscounts

func (s Subscription) FetchDiscounts(options ...SubscriptionFetchDiscountsParameters) (*Iterator, error)

FetchDiscounts allows you to get the discounts applied to the subscription.

func (Subscription) FetchTransactions

func (s Subscription) FetchTransactions(options ...SubscriptionFetchTransactionsParameters) (*Iterator, error)

FetchTransactions allows you to get the subscriptions past transactions.

func (Subscription) Find

func (s Subscription) Find(subscriptionID string, options ...SubscriptionFindParameters) (*Subscription, error)

Find allows you to find a subscription by its ID.

func (Subscription) FindAddon

func (s Subscription) FindAddon(addonID string, options ...SubscriptionFindAddonParameters) (*Addon, error)

FindAddon allows you to find a subscription's addon by its ID.

func (Subscription) FindDiscount

func (s Subscription) FindDiscount(discountID string, options ...SubscriptionFindDiscountParameters) (*Discount, error)

FindDiscount allows you to find a subscription's discount by its ID.

func (*Subscription) GetID added in v4.1.0

func (s *Subscription) GetID() string

GetID implements the Identiable interface

func (*Subscription) Prefill

func (s *Subscription) Prefill(c *Subscription) *Subscription

Prefil prefills the object with data provided in the parameter

func (Subscription) Save

Save allows you to save the updated subscription attributes.

func (*Subscription) SetClient

func (s *Subscription) SetClient(c *ProcessOut) *Subscription

SetClient sets the client for the Subscription object and its children

type SubscriptionAllParameters

type SubscriptionAllParameters struct {
	*Options
	*Subscription
}

SubscriptionAllParameters is the structure representing the additional parameters used to call Subscription.All

type SubscriptionCancelParameters

type SubscriptionCancelParameters struct {
	*Options
	*Subscription
	CancelAtEnd interface{} `json:"cancel_at_end"`
}

SubscriptionCancelParameters is the structure representing the additional parameters used to call Subscription.Cancel

type SubscriptionCreateParameters

type SubscriptionCreateParameters struct {
	*Options
	*Subscription
	Source   interface{} `json:"source"`
	CouponID interface{} `json:"coupon_id"`
}

SubscriptionCreateParameters is the structure representing the additional parameters used to call Subscription.Create

type SubscriptionDeleteAddonParameters added in v4.1.0

type SubscriptionDeleteAddonParameters struct {
	*Options
	*Subscription
	Prorate       interface{} `json:"prorate"`
	ProrationDate interface{} `json:"proration_date"`
	Preview       interface{} `json:"preview"`
}

SubscriptionDeleteAddonParameters is the structure representing the additional parameters used to call Subscription.DeleteAddon

type SubscriptionDeleteDiscountParameters added in v4.1.0

type SubscriptionDeleteDiscountParameters struct {
	*Options
	*Subscription
}

SubscriptionDeleteDiscountParameters is the structure representing the additional parameters used to call Subscription.DeleteDiscount

type SubscriptionFetchAddonsParameters

type SubscriptionFetchAddonsParameters struct {
	*Options
	*Subscription
}

SubscriptionFetchAddonsParameters is the structure representing the additional parameters used to call Subscription.FetchAddons

type SubscriptionFetchCustomerParameters

type SubscriptionFetchCustomerParameters struct {
	*Options
	*Subscription
}

SubscriptionFetchCustomerParameters is the structure representing the additional parameters used to call Subscription.FetchCustomer

type SubscriptionFetchDiscountsParameters

type SubscriptionFetchDiscountsParameters struct {
	*Options
	*Subscription
}

SubscriptionFetchDiscountsParameters is the structure representing the additional parameters used to call Subscription.FetchDiscounts

type SubscriptionFetchTransactionsParameters

type SubscriptionFetchTransactionsParameters struct {
	*Options
	*Subscription
}

SubscriptionFetchTransactionsParameters is the structure representing the additional parameters used to call Subscription.FetchTransactions

type SubscriptionFindAddonParameters

type SubscriptionFindAddonParameters struct {
	*Options
	*Subscription
}

SubscriptionFindAddonParameters is the structure representing the additional parameters used to call Subscription.FindAddon

type SubscriptionFindDiscountParameters

type SubscriptionFindDiscountParameters struct {
	*Options
	*Subscription
}

SubscriptionFindDiscountParameters is the structure representing the additional parameters used to call Subscription.FindDiscount

type SubscriptionFindParameters

type SubscriptionFindParameters struct {
	*Options
	*Subscription
}

SubscriptionFindParameters is the structure representing the additional parameters used to call Subscription.Find

type SubscriptionSaveParameters

type SubscriptionSaveParameters struct {
	*Options
	*Subscription
	CouponID      interface{} `json:"coupon_id"`
	Source        interface{} `json:"source"`
	Prorate       interface{} `json:"prorate"`
	ProrationDate interface{} `json:"proration_date"`
	Preview       interface{} `json:"preview"`
}

SubscriptionSaveParameters is the structure representing the additional parameters used to call Subscription.Save

type ThreeDS added in v4.20.4

type ThreeDS struct {
	// Version is the version of the 3DS
	Version *string `json:"version,omitempty"`
	// Status is the current status of the authentication
	Status *string `json:"status,omitempty"`
	// Fingerprinted is the true if a fingerprint has occured
	Fingerprinted *bool `json:"fingerprinted,omitempty"`
	// Challenged is the true if a challenge has occured
	Challenged *bool `json:"challenged,omitempty"`
	// AresTransStatus is the ares transaction status
	AresTransStatus *string `json:"ares_trans_status,omitempty"`
	// CresTransStatus is the cres transaction status
	CresTransStatus *string `json:"cres_trans_status,omitempty"`
	// DsTransID is the universally unique transaction identifier assigned by the DS to identify a single transaction
	DsTransID *string `json:"ds_trans_id,omitempty"`
	// FingerprintCompletionIndicator is the indicates whether the 3DS fingerprint successfully completed
	FingerprintCompletionIndicator *string `json:"fingerprint_completion_indicator,omitempty"`
	// ServerTransID is the universally unique transaction identifier assigned by the 3DS Server to identify a single transaction
	ServerTransID *string `json:"server_trans_id,omitempty"`
	// contains filtered or unexported fields
}

ThreeDS represents the ThreeDS API object

func (*ThreeDS) Prefill added in v4.20.4

func (s *ThreeDS) Prefill(c *ThreeDS) *ThreeDS

Prefil prefills the object with data provided in the parameter

func (*ThreeDS) SetClient added in v4.20.4

func (s *ThreeDS) SetClient(c *ProcessOut) *ThreeDS

SetClient sets the client for the ThreeDS object and its children

type Token

type Token struct {
	// ID is the iD of the customer token
	ID *string `json:"id,omitempty"`
	// Customer is the customer owning the token
	Customer *Customer `json:"customer,omitempty"`
	// CustomerID is the iD of the customer linked to the token
	CustomerID *string `json:"customer_id,omitempty"`
	// GatewayConfiguration is the gateway configuration to which the token is linked, if any
	GatewayConfiguration *GatewayConfiguration `json:"gateway_configuration,omitempty"`
	// GatewayConfigurationID is the iD of the gateway configuration to which the token is linked, if any
	GatewayConfigurationID *string `json:"gateway_configuration_id,omitempty"`
	// Card is the card used to create this token, if any
	Card *Card `json:"card,omitempty"`
	// CardID is the iD of the card used to create the token, if any
	CardID *string `json:"card_id,omitempty"`
	// Type is the type of the token. Can be card or gateway_token
	Type *string `json:"type,omitempty"`
	// Metadata is the metadata related to the token, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// IsSubscriptionOnly is the define whether or not the customer token is used on a recurring invoice
	IsSubscriptionOnly *bool `json:"is_subscription_only,omitempty"`
	// IsDefault is the true if the token it the default token of the customer, false otherwise
	IsDefault *bool `json:"is_default,omitempty"`
	// ReturnURL is the uRL where the customer will be redirected upon payment authentication (if required by tokenization method)
	ReturnURL *string `json:"return_url,omitempty"`
	// CancelURL is the uRL where the customer will be redirected if the tokenization was canceled (if required by tokenization method)
	CancelURL *string `json:"cancel_url,omitempty"`
	// Summary is the summary of the customer token, such as a description of the card used or the email of a PayPal account
	Summary *string `json:"summary,omitempty"`
	// IsChargeable is the true if the token is chargeable, false otherwise
	IsChargeable *bool `json:"is_chargeable,omitempty"`
	// CreatedAt is the date at which the customer token was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// Description is the description of the created token
	Description *string `json:"description,omitempty"`
	// Invoice is the invoice used to verify this token, if any
	Invoice *Invoice `json:"invoice,omitempty"`
	// InvoiceID is the iD of the invoice used to verify that token
	InvoiceID *string `json:"invoice_id,omitempty"`
	// ManualInvoiceCancellation is the if true, allows to refund or void the invoice manually following the token verification process
	ManualInvoiceCancellation *bool `json:"manual_invoice_cancellation,omitempty"`
	// VerificationStatus is the when a token has been requested to be verified, the status will be displayed using this field. The status can have the following values: `success`, `pending`, `failed`, `not-requested` and `unknown`
	VerificationStatus *string `json:"verification_status,omitempty"`
	// CanGetBalance is the if true, the balance can be retrieved from the balances endpoint
	CanGetBalance *bool `json:"can_get_balance,omitempty"`
	// contains filtered or unexported fields
}

Token represents the Token API object

func (Token) Create

func (s Token) Create(options ...TokenCreateParameters) (*Token, error)

Create allows you to create a new token for the given customer ID.

func (Token) Delete

func (s Token) Delete(options ...TokenDeleteParameters) error

Delete allows you to delete a customer token

func (Token) FetchCustomerTokens added in v4.1.0

func (s Token) FetchCustomerTokens(customerID string, options ...TokenFetchCustomerTokensParameters) (*Iterator, error)

FetchCustomerTokens allows you to get the customer's tokens.

func (Token) Find

func (s Token) Find(customerID, tokenID string, options ...TokenFindParameters) (*Token, error)

Find allows you to find a customer's token by its ID.

func (*Token) GetID added in v4.1.0

func (s *Token) GetID() string

GetID implements the Identiable interface

func (*Token) Prefill

func (s *Token) Prefill(c *Token) *Token

Prefil prefills the object with data provided in the parameter

func (Token) Save added in v4.18.0

func (s Token) Save(options ...TokenSaveParameters) error

Save allows you to save the updated customer attributes.

func (*Token) SetClient

func (s *Token) SetClient(c *ProcessOut) *Token

SetClient sets the client for the Token object and its children

type TokenCreateParameters

type TokenCreateParameters struct {
	*Options
	*Token
	Source                    interface{} `json:"source"`
	Settings                  interface{} `json:"settings"`
	Device                    interface{} `json:"device"`
	Verify                    interface{} `json:"verify"`
	VerifyMetadata            interface{} `json:"verify_metadata"`
	SetDefault                interface{} `json:"set_default"`
	VerifyStatementDescriptor interface{} `json:"verify_statement_descriptor"`
	InvoiceReturnURL          interface{} `json:"invoice_return_url"`
}

TokenCreateParameters is the structure representing the additional parameters used to call Token.Create

type TokenDeleteParameters

type TokenDeleteParameters struct {
	*Options
	*Token
}

TokenDeleteParameters is the structure representing the additional parameters used to call Token.Delete

type TokenFetchCustomerTokensParameters added in v4.1.0

type TokenFetchCustomerTokensParameters struct {
	*Options
	*Token
}

TokenFetchCustomerTokensParameters is the structure representing the additional parameters used to call Token.FetchCustomerTokens

type TokenFindParameters

type TokenFindParameters struct {
	*Options
	*Token
}

TokenFindParameters is the structure representing the additional parameters used to call Token.Find

type TokenSaveParameters added in v4.18.0

type TokenSaveParameters struct {
	*Options
	*Token
	Source                    interface{} `json:"source"`
	Settings                  interface{} `json:"settings"`
	Device                    interface{} `json:"device"`
	Verify                    interface{} `json:"verify"`
	VerifyMetadata            interface{} `json:"verify_metadata"`
	SetDefault                interface{} `json:"set_default"`
	VerifyStatementDescriptor interface{} `json:"verify_statement_descriptor"`
	InvoiceReturnURL          interface{} `json:"invoice_return_url"`
}

TokenSaveParameters is the structure representing the additional parameters used to call Token.Save

type Transaction

type Transaction struct {
	// ID is the iD of the transaction
	ID *string `json:"id,omitempty"`
	// Project is the project to which the transaction belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the transaction belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Invoice is the invoice used to generate this transaction, if any
	Invoice *Invoice `json:"invoice,omitempty"`
	// InvoiceID is the iD of the invoice used to generate this transaction, if any
	InvoiceID *string `json:"invoice_id,omitempty"`
	// Customer is the customer that was linked to this transaction, if any
	Customer *Customer `json:"customer,omitempty"`
	// CustomerID is the iD of the customer that was linked to the transaction, if any
	CustomerID *string `json:"customer_id,omitempty"`
	// Subscription is the subscription to which this transaction belongs
	Subscription *Subscription `json:"subscription,omitempty"`
	// SubscriptionID is the iD of the subscription to which the transaction belongs, if any
	SubscriptionID *string `json:"subscription_id,omitempty"`
	// Token is the token that was used to capture the payment of the transaction, if any
	Token *Token `json:"token,omitempty"`
	// TokenID is the iD of the token was used to capture the payment of the transaction, if any
	TokenID *string `json:"token_id,omitempty"`
	// Card is the card that was used to capture the payment of the transaction, if any
	Card *Card `json:"card,omitempty"`
	// CardID is the iD of the card that was used to capture the payment of the transaction, if any
	CardID *string `json:"card_id,omitempty"`
	// GatewayConfiguration is the gateway Configuration is the last gateway configuration that was used to process the payment, if any
	GatewayConfiguration *GatewayConfiguration `json:"gateway_configuration,omitempty"`
	// ExternalThreeDSGatewayConfiguration is the external ThreeDS Gateway Configuration is the gateway configuration that was used to authenticate the payment, if configured
	ExternalThreeDSGatewayConfiguration *GatewayConfiguration `json:"external_three_d_s_gateway_configuration,omitempty"`
	// GatewayConfigurationID is the iD of the last gateway configuration that was used to process the payment, if any
	GatewayConfigurationID *string `json:"gateway_configuration_id,omitempty"`
	// Operations is the operations linked to the transaction
	Operations *[]*TransactionOperation `json:"operations,omitempty"`
	// Refunds is the list of the transaction refunds
	Refunds *[]*Refund `json:"refunds,omitempty"`
	// Name is the name of the transaction
	Name *string `json:"name,omitempty"`
	// Amount is the amount requested when creating the transaction
	Amount *string `json:"amount,omitempty"`
	// AmountLocal is the amount requested when creating the transaction, in the currency of the project
	AmountLocal *string `json:"amount_local,omitempty"`
	// AuthorizedAmount is the amount that was successfully authorized on the transaction
	AuthorizedAmount *string `json:"authorized_amount,omitempty"`
	// AuthorizedAmountLocal is the amount that was successfully authorized on the transaction, in the currency of the project
	AuthorizedAmountLocal *string `json:"authorized_amount_local,omitempty"`
	// CapturedAmount is the amount that was successfully captured on the transaction
	CapturedAmount *string `json:"captured_amount,omitempty"`
	// CapturedAmountLocal is the amount that was successfully captured on the transaction, in the currency of the project
	CapturedAmountLocal *string `json:"captured_amount_local,omitempty"`
	// RefundedAmount is the amount that was successfully refunded on the transaction
	RefundedAmount *string `json:"refunded_amount,omitempty"`
	// RefundedAmountLocal is the amount that was successfully refunded on the transaction, in the currency of the project
	RefundedAmountLocal *string `json:"refunded_amount_local,omitempty"`
	// AvailableAmount is the amount available on the transaction (captured - refunded)
	AvailableAmount *string `json:"available_amount,omitempty"`
	// AvailableAmountLocal is the amount available on the transaction (captured - refunded), in the currency of the project
	AvailableAmountLocal *string `json:"available_amount_local,omitempty"`
	// VoidedAmount is the amount that was voided on the transaction
	VoidedAmount *string `json:"voided_amount,omitempty"`
	// VoidedAmountLocal is the amount that was voided on the transaction, in the currency of the project
	VoidedAmountLocal *string `json:"voided_amount_local,omitempty"`
	// Currency is the currency of the transaction
	Currency *string `json:"currency,omitempty"`
	// ErrorCode is the error code of the transaction, when the payment has failed
	ErrorCode *string `json:"error_code,omitempty"`
	// ErrorMessage is the error message of the transaction, when the payment has failed
	ErrorMessage *string `json:"error_message,omitempty"`
	// AcquirerName is the name of the merchant acquirer
	AcquirerName *string `json:"acquirer_name,omitempty"`
	// GatewayName is the name of the last gateway the transaction was attempted on (successfully or not). Use the operations list to get the full transaction's history
	GatewayName *string `json:"gateway_name,omitempty"`
	// ThreeDSStatus is the status of the potential 3-D Secure authentication
	ThreeDSStatus *string `json:"three_d_s_status,omitempty"`
	// Status is the status of the transaction
	Status *string `json:"status,omitempty"`
	// Authorized is the whether the transaction was authorized or not
	Authorized *bool `json:"authorized,omitempty"`
	// Captured is the whether the transaction was captured or not
	Captured *bool `json:"captured,omitempty"`
	// Voided is the whether the transaction was voided or not
	Voided *bool `json:"voided,omitempty"`
	// Refunded is the whether the transaction was refunded or not
	Refunded *bool `json:"refunded,omitempty"`
	// Chargedback is the whether the transaction was charged back or not
	Chargedback *bool `json:"chargedback,omitempty"`
	// ReceivedFraudNotification is the whether the transaction received a fraud notification event or not
	ReceivedFraudNotification *bool `json:"received_fraud_notification,omitempty"`
	// ReceivedRetrievalRequest is the whether the transaction received a retrieval request event or not
	ReceivedRetrievalRequest *bool `json:"received_retrieval_request,omitempty"`
	// ProcessoutFee is the processOut fee applied on the transaction
	ProcessoutFee *string `json:"processout_fee,omitempty"`
	// EstimatedFee is the gateway fee estimated before processing the payment
	EstimatedFee *string `json:"estimated_fee,omitempty"`
	// GatewayFee is the fee taken by the payment gateway to process the payment
	GatewayFee *string `json:"gateway_fee,omitempty"`
	// GatewayFeeLocal is the fee taken by the payment gateway to process the payment, in the currency of the project
	GatewayFeeLocal *string `json:"gateway_fee_local,omitempty"`
	// CurrencyFee is the currency of the fee taken on the transaction (field `gateway_fee`)
	CurrencyFee *string `json:"currency_fee,omitempty"`
	// Metadata is the metadata related to the transaction, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// Sandbox is the define whether or not the transaction is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the transaction was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// ChargedbackAt is the date at which the transaction was charged back
	ChargedbackAt *time.Time `json:"chargedback_at,omitempty"`
	// RefundedAt is the date at which the transaction was refunded
	RefundedAt *time.Time `json:"refunded_at,omitempty"`
	// AuthorizedAt is the date at which the transaction was authorized
	AuthorizedAt *time.Time `json:"authorized_at,omitempty"`
	// CapturedAt is the date at which the transaction was captured
	CapturedAt *time.Time `json:"captured_at,omitempty"`
	// VoidedAt is the date at which the transaction was voided
	VoidedAt *time.Time `json:"voided_at,omitempty"`
	// ThreeDS is the 3DS data of a transaction if it was authenticated
	ThreeDS *ThreeDS `json:"three_d_s,omitempty"`
	// CvcCheck is the cVC check done during the transaction
	CvcCheck *string `json:"cvc_check,omitempty"`
	// AvsCheck is the aVS check done during the transaction
	AvsCheck *string `json:"avs_check,omitempty"`
	// InitialSchemeTransactionID is the initial scheme ID that was referenced in the request
	InitialSchemeTransactionID *string `json:"initial_scheme_transaction_id,omitempty"`
	// SchemeID is the the ID assigned to the transaction by the scheme in the last successful authorization
	SchemeID *string `json:"scheme_id,omitempty"`
	// PaymentType is the payment type of the transaction
	PaymentType *string `json:"payment_type,omitempty"`
	// Eci is the the Electronic Commerce Indicator
	Eci *string `json:"eci,omitempty"`
	// NativeApm is the native APM response data
	NativeApm *NativeAPMResponse `json:"native_apm,omitempty"`
	// ExternalDetails is the additional data about the transaction, originating from a PSP, for example customer shipping address
	ExternalDetails interface{} `json:"external_details,omitempty"`
	// contains filtered or unexported fields
}

Transaction represents the Transaction API object

func (Transaction) All

func (s Transaction) All(options ...TransactionAllParameters) (*Iterator, error)

All allows you to get all the transactions.

func (Transaction) FetchRefunds

func (s Transaction) FetchRefunds(options ...TransactionFetchRefundsParameters) (*Iterator, error)

FetchRefunds allows you to get the transaction's refunds.

func (Transaction) Find

func (s Transaction) Find(transactionID string, options ...TransactionFindParameters) (*Transaction, error)

Find allows you to find a transaction by its ID.

func (Transaction) FindRefund

func (s Transaction) FindRefund(refundID string, options ...TransactionFindRefundParameters) (*Refund, error)

FindRefund allows you to find a transaction's refund by its ID.

func (*Transaction) GetID added in v4.1.0

func (s *Transaction) GetID() string

GetID implements the Identiable interface

func (*Transaction) Prefill

func (s *Transaction) Prefill(c *Transaction) *Transaction

Prefil prefills the object with data provided in the parameter

func (*Transaction) SetClient

func (s *Transaction) SetClient(c *ProcessOut) *Transaction

SetClient sets the client for the Transaction object and its children

type TransactionAllParameters

type TransactionAllParameters struct {
	*Options
	*Transaction
}

TransactionAllParameters is the structure representing the additional parameters used to call Transaction.All

type TransactionFetchRefundsParameters

type TransactionFetchRefundsParameters struct {
	*Options
	*Transaction
}

TransactionFetchRefundsParameters is the structure representing the additional parameters used to call Transaction.FetchRefunds

type TransactionFindParameters

type TransactionFindParameters struct {
	*Options
	*Transaction
}

TransactionFindParameters is the structure representing the additional parameters used to call Transaction.Find

type TransactionFindRefundParameters

type TransactionFindRefundParameters struct {
	*Options
	*Transaction
}

TransactionFindRefundParameters is the structure representing the additional parameters used to call Transaction.FindRefund

type TransactionOperation

type TransactionOperation struct {
	// ID is the iD of the transaction operation
	ID *string `json:"id,omitempty"`
	// Transaction is the transaction to which the operation belongs
	Transaction *Transaction `json:"transaction,omitempty"`
	// TransactionID is the iD of the transaction to which the operation belongs
	TransactionID *string `json:"transaction_id,omitempty"`
	// Token is the token that was used by the operation, if any
	Token *Token `json:"token,omitempty"`
	// TokenID is the iD of the token was used by the operation, if any
	TokenID *string `json:"token_id,omitempty"`
	// Card is the card that was used by the operation, if any
	Card *Card `json:"card,omitempty"`
	// CardID is the iD of the card that was used by the operation, if any
	CardID *string `json:"card_id,omitempty"`
	// GatewayConfiguration is the gateway configuration that was used to process the operation
	GatewayConfiguration *GatewayConfiguration `json:"gateway_configuration,omitempty"`
	// GatewayConfigurationID is the iD of the gateway configuration that was used to process the operation
	GatewayConfigurationID *string `json:"gateway_configuration_id,omitempty"`
	// Amount is the amount of the operation
	Amount *string `json:"amount,omitempty"`
	// Currency is the currency of the operation
	Currency *string `json:"currency,omitempty"`
	// IsAttempt is the true if the operation is an attempt, false otherwise
	IsAttempt *bool `json:"is_attempt,omitempty"`
	// HasFailed is the true if the operation has failed, false otherwise
	HasFailed *bool `json:"has_failed,omitempty"`
	// IsAccountable is the true if the operation amount can be accounted for, false otherwise
	IsAccountable *bool `json:"is_accountable,omitempty"`
	// Type is the type of the operation, such as authorization, capture, refund or void
	Type *string `json:"type,omitempty"`
	// GatewayOperationID is the iD of the operation done through the PSP
	GatewayOperationID *string `json:"gateway_operation_id,omitempty"`
	// Arn is the acquirer Routing Number, can be used to track a payment or refund at the issuer
	Arn *string `json:"arn,omitempty"`
	// ErrorCode is the error code returned when attempting the operation, if any
	ErrorCode *string `json:"error_code,omitempty"`
	// GatewayData is the additionnal context saved when processing the transaction on the specific PSP
	GatewayData *map[string]string `json:"gateway_data,omitempty"`
	// PaymentDataThreeDSRequest is the threeDS request payment data (read-only)
	PaymentDataThreeDSRequest *PaymentDataThreeDSRequest `json:"payment_data_three_d_s_request,omitempty"`
	// PaymentDataThreeDSAuthentication is the 3-D Secure authentication payment data (read-only)
	PaymentDataThreeDSAuthentication *PaymentDataThreeDSAuthentication `json:"payment_data_three_d_s_authentication,omitempty"`
	// PaymentDataNetworkAuthentication is the network authentication payment data (read-only)
	PaymentDataNetworkAuthentication *PaymentDataNetworkAuthentication `json:"payment_data_network_authentication,omitempty"`
	// InitialSchemeTransactionID is the initial scheme ID that was referenced in the request
	InitialSchemeTransactionID *string `json:"initial_scheme_transaction_id,omitempty"`
	// SchemeID is the the ID assigned to the transaction by the scheme in the last successful authorization
	SchemeID *string `json:"scheme_id,omitempty"`
	// PaymentType is the payment type of the transaction
	PaymentType *string `json:"payment_type,omitempty"`
	// Metadata is the metadata related to the operation, in the form of a dictionary (key-value pair)
	Metadata *map[string]string `json:"metadata,omitempty"`
	// GatewayFee is the gateway fee generated by the operation
	GatewayFee *string `json:"gateway_fee,omitempty"`
	// CreatedAt is the date at which the operation was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

TransactionOperation represents the TransactionOperation API object

func (*TransactionOperation) GetID added in v4.1.0

func (s *TransactionOperation) GetID() string

GetID implements the Identiable interface

func (*TransactionOperation) Prefill

Prefil prefills the object with data provided in the parameter

func (*TransactionOperation) SetClient

SetClient sets the client for the TransactionOperation object and its children

type UnsupportedFeatureBypass added in v4.32.2

type UnsupportedFeatureBypass struct {
	// IncrementalAuthorization is the indicates whether to fallback to normal authorization if incremental is not supported
	IncrementalAuthorization *bool `json:"incremental_authorization,omitempty"`
	// contains filtered or unexported fields
}

UnsupportedFeatureBypass represents the UnsupportedFeatureBypass API object

func (*UnsupportedFeatureBypass) Prefill added in v4.32.2

Prefil prefills the object with data provided in the parameter

func (*UnsupportedFeatureBypass) SetClient added in v4.32.2

SetClient sets the client for the UnsupportedFeatureBypass object and its children

type Webhook

type Webhook struct {
	// ID is the iD of the webhook
	ID *string `json:"id,omitempty"`
	// Project is the project to which the webhook belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the webhook belongs
	ProjectID *string `json:"project_id,omitempty"`
	// Event is the event the webhook is linked to
	Event *Event `json:"event,omitempty"`
	// EventID is the iD of the event the webhook is linked to
	EventID *string `json:"event_id,omitempty"`
	// RequestURL is the uRL to which the webhook will be posted
	RequestURL *string `json:"request_url,omitempty"`
	// RequestMethod is the method used to send the webhook (GET or POST)
	RequestMethod *string `json:"request_method,omitempty"`
	// ResponseBody is the the response body the webhook received when sending its payload
	ResponseBody *string `json:"response_body,omitempty"`
	// ResponseCode is the the response code the webhook received when sending its payload
	ResponseCode *string `json:"response_code,omitempty"`
	// ResponseHeaders is the the response headers the webhook received when sending its payload
	ResponseHeaders *string `json:"response_headers,omitempty"`
	// ResponseTimeMs is the the time it took for the webhook to send its payload
	ResponseTimeMs *int `json:"response_time_ms,omitempty"`
	// Status is the the status of the webhook. Either delivered or failed
	Status *string `json:"status,omitempty"`
	// CreatedAt is the date at which the webhook was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// ReleaseAt is the date at webhook will be/is released
	ReleaseAt *time.Time `json:"release_at,omitempty"`
	// contains filtered or unexported fields
}

Webhook represents the Webhook API object

func (*Webhook) GetID added in v4.1.0

func (s *Webhook) GetID() string

GetID implements the Identiable interface

func (*Webhook) Prefill

func (s *Webhook) Prefill(c *Webhook) *Webhook

Prefil prefills the object with data provided in the parameter

func (*Webhook) SetClient

func (s *Webhook) SetClient(c *ProcessOut) *Webhook

SetClient sets the client for the Webhook object and its children

type WebhookEndpoint

type WebhookEndpoint struct {
	// ID is the iD of the webhook endpoint
	ID *string `json:"id,omitempty"`
	// Project is the project to which the webhook endpoint belongs
	Project *Project `json:"project,omitempty"`
	// ProjectID is the iD of the project to which the webhook belongs
	ProjectID *string `json:"project_id,omitempty"`
	// URL is the uRL to which the webhook endpoint points to
	URL *string `json:"url,omitempty"`
	// EventsWhitelist is the slice of string representing the whitelisted events posted to the endpoint
	EventsWhitelist interface{} `json:"events_whitelist,omitempty"`
	// Sandbox is the define whether or not the webhook endpoint is in sandbox environment
	Sandbox *bool `json:"sandbox,omitempty"`
	// CreatedAt is the date at which the webhook endpoint was created
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

WebhookEndpoint represents the WebhookEndpoint API object

func (*WebhookEndpoint) GetID added in v4.1.0

func (s *WebhookEndpoint) GetID() string

GetID implements the Identiable interface

func (*WebhookEndpoint) Prefill

Prefil prefills the object with data provided in the parameter

func (*WebhookEndpoint) SetClient

func (s *WebhookEndpoint) SetClient(c *ProcessOut) *WebhookEndpoint

SetClient sets the client for the WebhookEndpoint object and its children

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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