Documentation ¶
Index ¶
- Constants
- func API() *api
- func CreateAuthorization(username, apiKey string) string
- func Sandbox() *api
- type Accounts
- type Address
- type Config
- type CreditCard
- type CreditCardResponse
- type Customer
- type CustomerResponse
- type Customers
- type CustomersResponse
- type Date
- type Empty
- type ErrorCode
- type ErrorMessage
- type Errors
- type Failure
- type Filters
- type Issuer
- type Meta
- type PaginationFilters
- type Payment
- type PaymentFilters
- type Payments
- type PaymentsResponse
- type Status
Constants ¶
View Source
const ( Visa Issuer = "12" MasterCard = "13" Amex = "14" Discover = "15" )
Variables ¶
This section is empty.
Functions ¶
func CreateAuthorization ¶
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts handles requests to the Account API endpoint
func (*Accounts) CreateCreditCard ¶
func (c *Accounts) CreateCreditCard(create CreditCard) (CreditCard, error)
CreateCreditCard creates a new credit card account
type CreditCard ¶
type CreditCardResponse ¶
type CreditCardResponse struct { Meta Meta Response CreditCard }
CreditCardResponse is returned by Accounts.CreateCreditCard
type Customer ¶
type Customer struct { ID int64 `json:"Id,omitempty"` FirstName string MiddleName string `json:",omitempty"` LastName string BillingAddress *Address `json:",omitempty"` ShippingSameAsBilling bool ShippingAddress *Address `json:",omitempty"` Company string `json:",omitempty"` CustomerAccount string `json:",omitempty"` Phone string `json:",omitempty"` AltPhone string `json:",omitempty"` MobilePhone string `json:",omitempty"` Fax string `json:",omitempty"` Email string `json:",omitempty"` AltEmail string `json:",omitempty"` Website string `json:",omitempty"` Notes string `json:",omitempty"` LastModified *time.Time `json:",omitempty"` CreatedOn *time.Time `json:",omitempty"` }
type CustomerResponse ¶
CustomerResponse is returned by Customers.Create
type Customers ¶
type Customers struct {
// contains filtered or unexported fields
}
Customers handles requests to the Customer API endpoint
type CustomersResponse ¶
CustomersResponse is returned by Customers.List
type Empty ¶
type Empty struct {
Meta Meta
}
Empty responses are returned when detail operations fail
type ErrorMessage ¶
func (ErrorMessage) String ¶
func (msg ErrorMessage) String() string
type Errors ¶
type Errors struct { ErrorCode ErrorCode ErrorMessages []ErrorMessage TraceCode string StatusCode int // Not part of the API - added so error has code }
type PaginationFilters ¶
type PaginationFilters struct {
Page, PageSize int
}
func (PaginationFilters) Values ¶
func (f PaginationFilters) Values() url.Values
Values generates GET parameters from the given filters
type Payment ¶
type Payment struct { ID int64 `json:"Id"` CustomerID int64 `json:"CustomerId"` CustomerFirstName string CustomerLastName string CustomerCompany string ReferenceID int64 `json:"ReferenceId"` Status string RecurringScheduleID int64 `json:"RecurringScheduleId"` PaymentType string PaymentSubType string ProviderAuthCode string TraceNumber string PaymentDate time.Time ReturnDate *time.Time EstimatedSettleDate time.Time ActualSettledDate *time.Time CanVoidUntil time.Time Amount float64 FailureData Failure AccountID int64 `json:"AccountId"` InvoiceID int64 `json:"InvoiceId"` IsDebit bool InvoiceNumber string // TODO or int64? PurchaseOrderNumber string // TODO or int64? OrderID int64 `json:"OrderId"` Description string Latitude *float64 Longitude *float64 LastModified time.Time CreateOn time.Time }
type PaymentFilters ¶
type PaymentFilters struct { PaginationFilters StartDate, EndDate Date Lite bool }
PaymentFilters create GET parameters for the payments endpoint
func (PaymentFilters) Values ¶
func (f PaymentFilters) Values() url.Values
Values returns GET parameters for payments
type Payments ¶
type Payments struct {
// contains filtered or unexported fields
}
Payments handles requests to the Payment API endpoint
type PaymentsResponse ¶
PaymentsResponse is the response returned from the payments endpoint
Click to show internal directories.
Click to hide internal directories.