Documentation ¶
Index ¶
- type Amount
- type Boat
- type Breakdown
- type CUTime
- type Capture
- type CheckoutOrder
- type GiftCard
- type Item
- type Link
- type LogAction
- type Manual
- type MerchantConfig
- type PassItem
- type Payer
- type PayerInfo
- type Payment
- type Product
- type PurchaseItem
- type PurchaseUnit
- type Refund
- type Sale
- type SandboxInfo
- type Schedule
- type ScheduleTime
- type Show
- type TicketUsage
- type Transaction
- type TransferReq
- type WebHookEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capture ¶
type Capture struct { CUTime ID string `json:"id" gorm:"primary_key"` CheckoutID string `json:"-"` Status string `json:"status"` Amount Amount `json:"amount" gorm:"embedded"` FinalCapture bool `json:"final_capture" gorm:"-"` SellerProtection struct { Status string `json:"string"` DisputeCategories []string `json:"dispute_categories"` } `json:"seller_protection" gorm:"-"` Receivable struct { GrossAmount Amount `json:"gross_amount" gorm:"embedded;embedded_prefix:gross_"` PaypalFee Amount `json:"paypal_fee" gorm:"embedded;embedded_prefix:paypal_fee_"` NetAmount Amount `json:"net_amount" gorm:"embedded;embedded_prefix:net_"` } `json:"seller_receivable_breakdown" gorm:"embedded"` Links []Link `json:"links"` }
type CheckoutOrder ¶
type CheckoutOrder struct { CUTime ID string `json:"id" gorm:"primary_key"` PurchaseUnits []PurchaseUnit `json:"purchase_units"` Links []Link `json:"links"` Intent string `json:"intent"` PayerID string `json:"-"` Payer *Payer `json:"payer"` Status string `json:"status"` }
func (*CheckoutOrder) AfterCreate ¶
func (c *CheckoutOrder) AfterCreate(tx *gorm.DB) error
type MerchantConfig ¶
type MerchantConfig struct { ID string `json:"-" gorm:"primary_key"` PassTitle string `json:"passTitle"` NotifyNumber string `json:"notifyNumber"` EmailFrom string `json:"emailFrom"` EmailName string `json:"emailName"` EmailContent string `json:"emailContent"` SendSMS bool `json:"sendSMS" gorm:"default:false"` TermsConds string `json:"terms"` SandboxID string `json:"-"` TwilioAcctSID string `json:"-"` TwilioAcctToken string `json:"-"` TwilioFromNumber string `json:"-"` StripeKey string `json:"-"` StripeSecondary string `json:"-"` StripeAcctMap hstore.Hstore `json:"-"` PaymentType string `json:"-"` FeePercent float64 `json:"-"` FuelSurcharge float64 `json:"-"` LogoBytes []byte `json:"-"` StripeManagedProds bool `json:"-"` }
type Payer ¶
type Payer struct { ID string `json:"payer_id" gorm:"primary_key"` Name struct { GivenName string `json:"given_name"` Surname string `json:"surname"` } `json:"name" gorm:"embedded"` Email string `json:"email_address"` Address struct { CountryCode string `json:"country_code"` } `json:"address" gorm:"-"` Phone struct { PhoneNumber struct { NationalNumber string `json:"national_number" gorm:"column:phone_number"` } `json:"phone_number" gorm:"embedded"` } `json:"phone" gorm:"embedded"` AltEmail string `json:"alt_email"` }
type Payment ¶
type Payment struct { CUTime ID string `json:"id" gorm:"primary_key"` Links []Link `json:"links"` State string `json:"state"` Transactions []Transaction `json:"transactions"` Intent string `json:"intent"` Payer struct { PaymentMethod string `json:"payment_method"` Status string `json:"status"` PayerInfoID string `json:"-"` PayerInfo PayerInfo `json:"payer_info"` } `json:"payer" gorm:"embedded"` CartID string `json:"cart"` }
type Product ¶
type Product struct { ID uint `json:"id" gorm:"primary_key"` StripeID string `json:"stripeId" gorm:"-"` MerchantID string `json:"-" gorm:"type:varchar;not null;primary_key;"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt *time.Time `json:"-"` Name string `json:"name"` Desc string `json:"desc"` Color string `json:"color"` Publish bool `json:"publish"` ShowTickets bool `json:"showTickets"` Schedules []Schedule `json:"schedList"` Fish string `json:"fish"` Boat *Boat `json:"-"` BoatID uint `json:"boatId" gorm:"default:1"` Type string `json:"type" gorm:"default:'trip'"` BoatOverride bool `json:"boatOverride" gorm:"default:false"` }
Product represents a specific Type of tickets sold
type PurchaseItem ¶
type PurchaseItem struct { CheckoutID string `json:"coid" gorm:"primary_key"` Sku string `json:"sku" gorm:"primary_key"` Name string `json:"name"` Amount Amount `json:"unit_amount" gorm:"embedded"` Quantity uint `json:"quantity,string"` Description string `json:"description"` }
func (*PurchaseItem) GetAmount ¶
func (p *PurchaseItem) GetAmount() string
func (*PurchaseItem) GetDesc ¶
func (p *PurchaseItem) GetDesc() string
func (*PurchaseItem) GetID ¶
func (p *PurchaseItem) GetID() string
func (*PurchaseItem) GetName ¶
func (p *PurchaseItem) GetName() string
func (*PurchaseItem) GetQuantity ¶
func (p *PurchaseItem) GetQuantity() uint
func (*PurchaseItem) GetSku ¶
func (p *PurchaseItem) GetSku() string
type PurchaseUnit ¶
type PurchaseUnit struct { CheckoutID string `json:"-" gorm:"primary_key"` RefID string `json:"reference_id"` Amount Breakdown `json:"amount" gorm:"embedded"` Payee struct { MerchantID string `json:"merchant_id"` Email string `json:"email_address"` } `json:"payee" gorm:"embedded;embedded_prefix:payee_"` Description string `json:"description"` Items []PurchaseItem `json:"items" gorm:"foriegnkey:CheckoutID;association_foreignkey:CheckoutID"` Payments struct { Captures []*Capture `json:"captures" gorm:"foreignkey:CheckoutID;association_foreignkey:CheckoutID"` } `json:"payments" gorm:"embedded"` }
func (*PurchaseUnit) AfterCreate ¶
func (pu *PurchaseUnit) AfterCreate(tx *gorm.DB) error
type Refund ¶
type Refund struct { CUTime ID string `json:"id" gorm:"primary_key"` Links []Link `json:"links"` Amount Amount `json:"amount" gorm:"embedded"` Status string `json:"status"` Breakdown struct { Net Amount `json:"net_amount" gorm:"embedded;embedded_prefix:net_"` PayPalFee Amount `json:"paypal_fee" gorm:"embedded;embedded_prefix:fee_"` Gross Amount `json:"gross_amount" gorm:"embedded;embedded_prefix:gross_"` Total Amount `json:"total_refunded_amount" gorm:"embedded"` } `json:"seller_payable_breakdown" gorm:"embedded;embedded_prefix:refund_"` }
type Sale ¶
type Sale struct { CUTime ID string `json:"id" gorm:"primary_key"` Amount amount `json:"amount" gorm:"embedded"` PaymentMode string `json:"payment_mode"` TransactionFee struct { Value string `json:"value" gorm:"column:transaction_fee;type:money"` Currency string `json:"currency" gorm:"-"` } `json:"transaction_fee" gorm:"embedded"` ParentPayment string `json:"parent_payment"` SoftDesc string `json:"soft_descriptor"` ProtectEligible string `json:"protection_eligibility"` Links []Link `json:"links"` State string `json:"state"` InvoiceNum string `json:"invoice_number"` RelatedTrans []*Transaction `json:"-" gorm:"many2many:transaction_related"` }
type SandboxInfo ¶
type SandboxInfo struct { ID string `gorm:"primary_key"` SandboxIDs pq.StringArray `gorm:"type:text[]"` }
type Schedule ¶
type Schedule struct { ProductID uint `json:"-"` ID uint `json:"id" gorm:"primary_key"` TicketsAvail uint `json:"ticketsAvail"` Start time.Time `json:"-"` End time.Time `json:"-"` TimeArray []ScheduleTime `json:"timeArray"` Days pq.Int64Array `json:"selectedDays" gorm:"type:integer[]"` NotAvail pq.StringArray `json:"notAvailArray,nilasempty" gorm:"type:text[]"` ShowAllCal bool `json:"showAll" gorm:"default:false"` }
Schedule represents a full schedule that a Product can have multiple of
func (*Schedule) MarshalJSON ¶
MarshalJSON handles the proper date formatting for schedules
func (*Schedule) UnmarshalJSON ¶
type ScheduleTime ¶
type ScheduleTime struct { ID uint `json:"id"` ScheduleID uint `json:"-"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` Price string `json:"price"` }
ScheduleTime represents a specific trip time for the schedule
type Show ¶
type Show struct { MerchantID string `json:"-"` ID int `json:"id" gorm:"primary_key;auto_increment;"` CreatedAt time.Time `json:"-"` UpdatedAt time.Time `json:"-"` DeletedAt *time.Time `json:"-"` Name string `json:"name"` Publish bool `json:"publish"` Desc string `json:"desc"` Price string `json:"price"` Dates string `json:"dates" gorm:"type:daterange"` Logo string `json:"logoData"` }
type TicketUsage ¶
type Transaction ¶
type Transaction struct { PaymentID string `json:"-" gorm:"primary_key"` Amount amount `json:"amount" gorm:"embedded"` Payee struct { MerchantID string `json:"merchant_id"` Email string `json:"email"` } `json:"payee" gorm:"embedded;embedded_prefix:payee_"` Desc string `json:"description"` SoftDesc string `json:"soft_descriptor"` ItemList struct { Items []Item `json:"items"` } `json:"item_list" gorm:"-"` RelatedResources []interface{} `gorm:"-"` Sales []*Sale `json:"-" gorm:"many2many:transaction_related;"` }
func (*Transaction) AfterCreate ¶
func (t *Transaction) AfterCreate(tx *gorm.DB) error
func (*Transaction) BeforeSave ¶
func (t *Transaction) BeforeSave() error
func (*Transaction) UnmarshalJSON ¶
func (t *Transaction) UnmarshalJSON(data []byte) error
type TransferReq ¶
type WebHookEvent ¶
type WebHookEvent struct { ID string `json:"id" gorm:"primary_key"` CreateTime time.Time `json:"create_time"` UpdatedAt time.Time `json:"-"` ResourceType string `json:"resource_type"` EventType string `json:"event_type"` Summary string `json:"summary"` Resource interface{} `gorm:"-"` Status string `json:"status"` Transmissions []struct { WebhookURL string `json:"webhook_url"` TransmissionID string `json:"transmission_id"` Status string `json:"status"` } `json:"transmissions" gorm:"-"` Links []Link `json:"links" gorm:"-"` EventVersion float32 `json:"event_version,string"` RawMessage postgres.Jsonb `json:"-"` }
func (WebHookEvent) TableName ¶
func (WebHookEvent) TableName() string
func (*WebHookEvent) UnmarshalJSON ¶
func (w *WebHookEvent) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.