base

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Type        addresstype.AddressType
	StreetAddr1 string
	StreetAddr2 string
	StreetAddr3 string
	City        string
	Name        string
	Province    string
	PostalCode  string
	Country     string
	CountryCode string
}

func NewAddress

func NewAddress(postalCode string) *Address

func NewAddressWithStreet

func NewAddressWithStreet(postalCode, streetAddress1 string) *Address

func (*Address) GetState

func (a *Address) GetState() string

func (*Address) IsCountry

func (address *Address) IsCountry(countryCode string) bool

func (*Address) SetCountry

func (a *Address) SetCountry(country string) *Address

func (*Address) SetCountryCode

func (a *Address) SetCountryCode(countryCode string) *Address

func (*Address) SetState

func (a *Address) SetState(province string) *Address

type EncryptionData

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

func EncryptionDataAdd

func EncryptionDataAdd(ksn string, trackNumber string) *EncryptionData

func EncryptionDataSetKSNAndEncryptedData

func EncryptionDataSetKSNAndEncryptedData(ktb string, ksn string) *EncryptionData

func EncryptionDataSetKtbAndKsn

func EncryptionDataSetKtbAndKsn(ktb string, ksn string) *EncryptionData

func EncryptionDataVersion1

func EncryptionDataVersion1() *EncryptionData

func EncryptionDataVersion2

func EncryptionDataVersion2(ktb string, trackNumber ...string) *EncryptionData

func (*EncryptionData) GetKsn

func (e *EncryptionData) GetKsn() string

func (*EncryptionData) GetKtb

func (e *EncryptionData) GetKtb() string

func (*EncryptionData) GetTrackNumber

func (e *EncryptionData) GetTrackNumber() string

func (*EncryptionData) GetVersion

func (e *EncryptionData) GetVersion() string

func (*EncryptionData) SetKsn

func (e *EncryptionData) SetKsn(ksn string)

func (*EncryptionData) SetKtb

func (e *EncryptionData) SetKtb(ktb string)

func (*EncryptionData) SetTrackNumber

func (e *EncryptionData) SetTrackNumber(trackNumber string)

func (*EncryptionData) SetVersion

func (e *EncryptionData) SetVersion(version string)

type OrderDetails

type OrderDetails struct {
	InsuranceAmount *decimal.Decimal
	HasInsurance    bool
	HandlingAmount  *decimal.Decimal
	Description     string
}

type PhoneNumber

type PhoneNumber struct {
	CountryCode string
	AreaCode    string
	Number      string
	Extension   string
}

func (*PhoneNumber) ToString

func (p *PhoneNumber) ToString() string

type Product

type Product struct {
	ProductId        string
	ProductName      string
	Description      string
	Quantity         int
	UnitPrice        *decimal.Decimal
	NetUnitPrice     *decimal.Decimal
	Gift             bool
	UnitCurrency     string
	Type             string
	Risk             string
	TaxAmount        *decimal.Decimal
	TaxPercentage    *decimal.Decimal
	NetUnitAmount    *decimal.Decimal
	DiscountAmount   *decimal.Decimal
	GiftCardCurrency string
	Url              string
	ImageUrl         string
}

func (*Product) GetDescription

func (p *Product) GetDescription() string

Description

func (*Product) GetDiscountAmount

func (p *Product) GetDiscountAmount() *decimal.Decimal

DiscountAmount

func (*Product) GetGift

func (p *Product) GetGift() bool

Gift

func (*Product) GetGiftCardCurrency

func (p *Product) GetGiftCardCurrency() string

GiftCardCurrency

func (*Product) GetImageUrl

func (p *Product) GetImageUrl() string

ImageUrl

func (*Product) GetNetUnitAmount

func (p *Product) GetNetUnitAmount() *decimal.Decimal

NetUnitAmount

func (*Product) GetNetUnitPrice

func (p *Product) GetNetUnitPrice() *decimal.Decimal

NetUnitPrice

func (*Product) GetProductId

func (p *Product) GetProductId() string

ProductId

func (*Product) GetProductName

func (p *Product) GetProductName() string

ProductName

func (*Product) GetQuantity

func (p *Product) GetQuantity() int

Quantity

func (*Product) GetRisk

func (p *Product) GetRisk() string

Risk

func (*Product) GetTaxAmount

func (p *Product) GetTaxAmount() *decimal.Decimal

TaxAmount

func (*Product) GetTaxPercentage

func (p *Product) GetTaxPercentage() *decimal.Decimal

TaxPercentage

func (*Product) GetType

func (p *Product) GetType() string

Type

func (*Product) GetUnitCurrency

func (p *Product) GetUnitCurrency() string

UnitCurrency

func (*Product) GetUnitPrice

func (p *Product) GetUnitPrice() *decimal.Decimal

UnitPrice

func (*Product) GetUrl

func (p *Product) GetUrl() string

Url

func (*Product) SetDescription

func (p *Product) SetDescription(description string)

func (*Product) SetDiscountAmount

func (p *Product) SetDiscountAmount(discountAmount *decimal.Decimal)

func (*Product) SetGift

func (p *Product) SetGift(gift bool)

func (*Product) SetGiftCardCurrency

func (p *Product) SetGiftCardCurrency(giftCardCurrency string)

func (*Product) SetImageUrl

func (p *Product) SetImageUrl(imageUrl string)

func (*Product) SetNetUnitAmount

func (p *Product) SetNetUnitAmount(netUnitAmount *decimal.Decimal)

func (*Product) SetNetUnitPrice

func (p *Product) SetNetUnitPrice(netUnitPrice *decimal.Decimal)

func (*Product) SetProductId

func (p *Product) SetProductId(productId string)

func (*Product) SetProductName

func (p *Product) SetProductName(productName string)

func (*Product) SetQuantity

func (p *Product) SetQuantity(quantity int)

func (*Product) SetRisk

func (p *Product) SetRisk(risk string)

func (*Product) SetTaxAmount

func (p *Product) SetTaxAmount(taxAmount *decimal.Decimal)

func (*Product) SetTaxPercentage

func (p *Product) SetTaxPercentage(taxPercentage *decimal.Decimal)

func (*Product) SetType

func (p *Product) SetType(typeValue string)

func (*Product) SetUnitCurrency

func (p *Product) SetUnitCurrency(unitCurrency string)

func (*Product) SetUnitPrice

func (p *Product) SetUnitPrice(unitPrice *decimal.Decimal)

func (*Product) SetUrl

func (p *Product) SetUrl(url string)

Jump to

Keyboard shortcuts

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