Documentation ¶
Index ¶
- func AddFilterAndSort(url string, filter *Filter, sort *Sort) string
- func AddQueryParameter(url string, name string, value string) string
- func Bool(v bool) *bool
- func BoolValue(v *bool) bool
- func CleanMetaDataArray(b []byte) []byte
- func Float64(v float64) *float64
- func Float64Value(v *float64) float64
- func Int64(v int64) *int64
- func Int64Value(v *int64) int64
- func String(v string) *string
- func StringValue(v *string) string
- func Version() string
- type APIError
- type AccountingSyncStatus
- type Api
- func (c *Api) Count(endpoint string) (int64, error)
- func (c *Api) Create(endpoint string, requestData interface{}, responseData interface{}) error
- func (c *Api) Delete(endpoint string) error
- func (c *Api) Get(endpoint string, endpointData interface{}) (string, error)
- func (c *Api) PostWithoutData(endpoint string, responseData interface{}) error
- func (c *Api) Update(endpoint string, requestData interface{}, responseData interface{}) error
- func (c *Api) Upload(endpoint string, filePath string, fileParamName string, ...) error
- type Balance
- type BalanceHistories
- type BalanceHistory
- type BankAccount
- type Card
- type Charge
- type ChargeRequest
- type ChasingCadence
- type ChasingCadences
- type ChasingStep
- type Contact
- type ContactRequest
- type Contacts
- type Coupon
- type CouponRequest
- type Coupons
- type CreditBalanceAdjustment
- type CreditBalanceAdjustmentRequest
- type CreditBalanceAdjustments
- type CreditNote
- type CreditNoteRequest
- type CreditNotes
- type Customer
- type CustomerRequest
- type Customers
- type Discount
- type DiscountRequest
- type EmailRecipient
- type Estimate
- type EstimateRequest
- type Estimates
- type Event
- func (e *Event) ParseCustomerEvent() (*Customer, error)
- func (e *Event) ParseCustomerPreviousEvent() (*Customer, error)
- func (e *Event) ParseEventObject() (*json.RawMessage, error)
- func (e *Event) ParseEventPreviousObject() (*json.RawMessage, error)
- func (e *Event) ParseInvoiceEvent() (*Invoice, error)
- func (e *Event) ParseInvoicePreviousEvent() (*Invoice, error)
- func (e *Event) ParsePaymentEvent() (*Payment, error)
- func (e *Event) ParseSubscriptionEvent() (*Subscription, error)
- type EventObject
- type Events
- type Exclude
- type Expand
- type File
- type FileRequest
- type Files
- type Filter
- type Invoice
- type InvoiceRequest
- type Invoices
- type Item
- type ItemRequest
- type Items
- type Letter
- type LineItem
- type LineItemPreview
- type LineItemRequest
- type Member
- type MemberRequest
- type MemberRequests
- type Members
- type Note
- type NoteRequest
- type Notes
- type Notification
- type NotificationRequest
- type Notifications
- type Payment
- type PaymentItem
- type PaymentItemRequest
- type PaymentPlan
- type PaymentPlanApproval
- type PaymentPlanInstallment
- type PaymentPlanInstallmentRequest
- type PaymentPlanInstallments
- type PaymentPlanRequest
- type PaymentRequest
- type PaymentSource
- type PaymentSourceRequest
- type PaymentSources
- type Payments
- type PendingLineItem
- type PendingLineItemRequest
- type PendingLineItems
- type Plan
- type PlanRequest
- type Plans
- type Refund
- type RefundRequest
- type Role
- type Roles
- type SendEmailRequest
- type SendStatementEmailRequest
- type SendStatementLetterRequest
- type SendStatementTextMessageRequest
- type SendTextMessageRequest
- type ShippingDetail
- type ShippingDetailRequest
- type Sort
- type SortOrder
- type Subscription
- type SubscriptionAddon
- type SubscriptionAddonRequest
- type SubscriptionPreview
- type SubscriptionPreviewInvoice
- type SubscriptionPreviewRequest
- type SubscriptionRequest
- type Subscriptions
- type Task
- type TaskRequest
- type Tasks
- type Tax
- type TaxRate
- type TaxRateRequest
- type TaxRates
- type TaxRequest
- type TextMessage
- type TextMessageRecipient
- type TextMessages
- type Tier
- type TierRequest
- type User
- type UserEmailUpdateRequest
- type UserInvite
- type WebhookAttempt
- type WebhookAttemptStatus
- type WebhookAttempts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanMetaDataArray ¶
func Float64Value ¶
func Int64Value ¶
func StringValue ¶
Types ¶
type APIError ¶
type APIError struct { Type string `json:"type"` Message string `json:"message"` Param string `json:"param"` }
func NewAPIError ¶
type AccountingSyncStatus ¶ added in v2.3.0
type BalanceHistories ¶
type BalanceHistories []*BalanceHistory
type BalanceHistory ¶
type BankAccount ¶
type BankAccount struct { BankName string `json:"bank_name"` Chargeable bool `json:"chargeable"` Country string `json:"country"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` FailureReason string `json:"failure_reason"` Gateway string `json:"gateway"` GatewayCustomer string `json:"gateway_customer"` GatewayId string `json:"gateway_id"` Id int64 `json:"id"` Last4 string `json:"last4"` Object string `json:"object"` ReceiptEmail string `json:"receipt_email"` RoutingNumber string `json:"routing_number"` UpdatedAt int64 `json:"updated_at"` Verified bool `json:"verified"` }
type Card ¶
type Card struct { Brand string `json:"brand"` Chargeable bool `json:"chargeable"` CreatedAt int64 `json:"created_at"` ExpMonth int64 `json:"exp_month"` ExpYear int64 `json:"exp_year"` FailureReason string `json:"failure_reason"` Funding string `json:"funding"` Gateway string `json:"gateway"` GatewayCustomer string `json:"gateway_customer"` GatewayId string `json:"gateway_id"` Id int64 `json:"id"` Last4 string `json:"last4"` Object string `json:"object"` ReceiptEmail string `json:"receipt_email"` UpdatedAt int64 `json:"updated_at"` }
type Charge ¶
type Charge struct { Id int64 `json:"id"` Object string `json:"object"` Customer int64 `json:"customer"` Status string `json:"status"` Gateway string `json:"gateway"` GatewayId string `json:"gateway_id"` PaymentSource *PaymentSource `json:"payment_source"` Currency string `json:"currency"` Amount float64 `json:"amount"` FailureMessage string `json:"failure_message"` AmountRefunded float64 `json:"amount_refunded"` Refunded bool `json:"refunded"` Refunds []Refund `json:"refunds"` Disputed bool `json:"disputed"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` }
type ChargeRequest ¶
type ChargeRequest struct { Customer *int64 `json:"customer,omitempty"` Method *string `json:"method,omitempty"` Currency *string `json:"currency,omitempty"` Amount *float64 `json:"amount,omitempty"` InvoicedToken *string `json:"invoiced_token,omitempty"` GatewayToken *string `json:"gateway_token,omitempty"` PaymentSourceType *string `json:"payment_source_type,omitempty"` PaymentSourceId *int64 `json:"payment_source_id,omitempty"` VaultMethod *bool `json:"vault_method,omitempty"` MakeDefault *bool `json:"make_default,omitempty"` ReceiptEmail *string `json:"receipt_email,omitempty"` AppliedTo []*PaymentItemRequest `json:"applied_to,omitempty"` }
type ChasingCadence ¶
type ChasingCadence struct { AssignmentConditions *string `json:"assignment_conditions"` AssignmentMode string `json:"assignment_mode"` CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` Frequency string `json:"frequency"` Id int64 `json:"id"` LastRun *int64 `json:"last_run"` MinBalance *float64 `json:"min_balance"` Name string `json:"name"` NextRun *int64 `json:"nextrun"` NumCustomers int64 `json:"num_customers"` Object string `json:"object"` Paused bool `json:"paused"` RunDate int64 `json:"run_date"` Steps []ChasingStep `json:"steps"` TimeOfDay int64 `json:"time_of_day"` }
type ChasingCadences ¶
type ChasingCadences []*ChasingCadence
type ChasingStep ¶
type ChasingStep struct { Action string `json:"action"` AssignedUserId *int64 `json:"assigned_user_id"` CreatedAt int64 `json:"created_at"` EmailTemplateId *string `json:"email_template_id"` Id int64 `json:"id"` Name string `json:"name"` Schedule string `json:"schedule"` SmsTemplateId *string `json:"sms_template_id"` UpdatedAt int64 `json:"updated_at"` }
type Contact ¶
type Contact struct { Address1 *string `json:"address1"` Address2 *string `json:"address2"` City *string `json:"city"` Country *string `json:"country"` CreatedAt int64 `json:"created_at"` Department *string `json:"department"` Email *string `json:"email"` Id int64 `json:"id"` Name string `json:"name"` Object string `json:"object"` Phone *string `json:"phone"` PostalCode *string `json:"postal_code"` Primary bool `json:"primary"` SmsEnabled bool `json:"sms_enabled"` State *string `json:"state"` Title *string `json:"title"` UpdatedAt int64 `json:"updated_at"` }
type ContactRequest ¶
type ContactRequest struct { Address1 *string `json:"address1,omitempty"` Address2 *string `json:"address2,omitempty"` City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` Department *string `json:"department,omitempty"` Email *string `json:"email,omitempty"` Name *string `json:"name,omitempty"` Phone *string `json:"phone,omitempty"` PostalCode *string `json:"postal_code,omitempty"` Primary *bool `json:"primary"` SmsEnabled *bool `json:"sms_enabled"` State *string `json:"state,omitempty"` Title *string `json:"title,omitempty"` }
type Coupon ¶
type Coupon struct { CreatedAt int64 `json:"created_at"` Currency *string `json:"currency"` Duration *int64 `json:"duration"` Exclusive bool `json:"exclusive"` ExpirationDate *int64 `json:"expiration_date"` Id string `json:"id"` IsPercent bool `json:"is_percent"` MaxRedemptions *int64 `json:"max_redemptions"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Object string `json:"object"` UpdatedAt int64 `json:"updated_at"` Value int64 `json:"value"` }
type CouponRequest ¶
type CouponRequest struct { Currency *string `json:"currency,omitempty"` Duration *int64 `json:"durationo,omitempty"` Exclusive *bool `json:"exclusive,omitempty"` ExpirationDate *int64 `json:"expiration_date,omitempty"` Id *string `json:"id,omitempty"` IsPercent *bool `json:"is_percent,omitempty"` MaxRedemptions *int64 `json:"max_redemptions,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Value *int64 `json:"value,omitempty"` }
type CreditBalanceAdjustment ¶
type CreditBalanceAdjustment struct { Amount float64 `json:"amount,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` Currency string `json:"currency,omitempty"` Customer int64 `json:"customer,omitempty"` Date int64 `json:"date,omitempty"` ID int64 `json:"id,omitempty"` Notes string `json:"notes,omitempty"` Object string `json:"object,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` }
type CreditBalanceAdjustments ¶
type CreditBalanceAdjustments []*CreditBalanceAdjustment
type CreditNote ¶
type CreditNote struct { Attachments []int64 `json:"attachments"` Balance float64 `json:"balance"` Closed bool `json:"closed"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Customer int64 `json:"customer"` Date int64 `json:"date"` Discounts []Discount `json:"discounts"` Draft bool `json:"draft"` Id int64 `json:"id"` Invoice int64 `json:"invoice"` Items []LineItem `json:"items"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Notes string `json:"notes"` Number string `json:"number"` Object string `json:"object"` Paid bool `json:"paid"` PdfUrl string `json:"pdf_url"` PurchaseOrder string `json:"purchase_order"` Status string `json:"status"` Subtotal float64 `json:"subtotal"` Taxes []Tax `json:"taxes"` Total float64 `json:"total"` UpdatedAt int64 `json:"updated_at"` Url string `json:"url"` }
func (*CreditNote) String ¶
func (i *CreditNote) String() string
type CreditNoteRequest ¶
type CreditNoteRequest struct { Attachments []*int64 `json:"attachments,omitempty"` CalculateTax *bool `json:"calculate_taxes,omitempty"` Closed *bool `json:"closed,omitempty"` Currency *string `json:"currency,omitempty"` Customer *int64 `json:"customer,omitempty"` Date *int64 `json:"date,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` Draft *bool `json:"draft,omitempty"` Items []*LineItemRequest `json:"items,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Notes *string `json:"notes,omitempty"` Number *string `json:"number,omitempty"` Paid *bool `json:"paid,omitempty"` PurchaseOrder *string `json:"purchase_order,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` }
type CreditNotes ¶
type CreditNotes []*CreditNote
type Customer ¶
type Customer struct { Address1 string `json:"address1"` Address2 string `json:"address2"` AttentionTo string `json:"attention_to"` AutoPay bool `json:"autopay"` AutoPayDelays int64 `json:"autopay_delay_days"` AvalaraEntityUseCode string `json:"avalara_entity_use_code"` AvalaraExemptionNumber string `json:"avalara_exemption_number"` BillToParent bool `json:"bill_to_parent"` Chase bool `json:"boolean"` ChasingCadence int64 `json:"chasing_cadence"` City string `json:"city"` Country string `json:"country"` CreatedAt int64 `json:"created_at"` CreditHold bool `json:"credit_hold"` CreditLimit float64 `json:"credit_limit"` Currency string `json:"currency"` DisabledPaymentMethods []string `json:"disabled_payment_methods"` Email string `json:"email"` Id int64 `json:"id"` Language string `json:"language"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` NextChaseStep int64 `json:"next_chase_step"` Notes string `json:"notes"` Number string `json:"number"` Object string `json:"object"` Owner int64 `json:"owner"` ParentCustomer int64 `json:"parent_customer"` PaymentSource *PaymentSource `json:"payment_source"` PaymentTerms string `json:"payment_terms"` Phone string `json:"phone"` PostalCode string `json:"postal_code"` SignUpPage int64 `json:"sign_up_page"` SignUpUrl string `json:"sign_up_url"` State string `json:"state"` StatementPdfUrl string `json:"statement_pdf_url"` TaxId string `json:"taxid"` Taxable bool `json:"taxable"` Taxes []TaxRate `json:"taxes"` Type string `json:"type"` UpdatedAt int64 `json:"updated_at"` }
type CustomerRequest ¶
type CustomerRequest struct { Address1 *string `json:"address1,omitempty"` Address2 *string `json:"address2,omitempty"` AttentionTo *string `json:"attention_to,omitempty"` AutoPay *bool `json:"autopay,omitempty"` AutoPayDelays *int64 `json:"autopay_delay_days,omitempty"` AvalaraEntityUseCode *string `json:"avalara_entity_use_code,omitempty"` AvalaraExemptionNumber *string `json:"avalara_exemption_number,omitempty"` BillToParent *bool `json:"bill_to_parent,omitempty"` Chase *bool `json:"boolean,omitempty"` ChasingCadence *int64 `json:"chasing_cadence,omitempty"` City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` CreatedAt *int64 `json:"created_at,omitempty"` CreditHold *bool `json:"credit_hold,omitempty"` CreditLimit *float64 `json:"credit_limit,omitempty"` Currency *string `json:"currency,omitempty"` DisabledPaymentMethods []*string `json:"disabled_payment_methods,omitempty"` Email *string `json:"email,omitempty"` Id *int64 `json:"id,omitempty"` Language *string `json:"language,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` NextChaseStep *int64 `json:"next_chase_step,omitempty"` Notes *string `json:"notes,omitempty"` Number *string `json:"number,omitempty"` Object *string `json:"object,omitempty"` Owner *int64 `json:"owner,omitempty"` ParentCustomer *int64 `json:"parent_customer,omitempty"` PaymentSource *PaymentSource `json:"payment_source,omitempty"` PaymentTerms *string `json:"payment_terms,omitempty"` Phone *string `json:"phone,omitempty"` PostalCode *string `json:"postal_code,omitempty"` SignUpPage *int64 `json:"sign_up_page,omitempty"` SignUpUrl *string `json:"sign_up_url,omitempty"` State *string `json:"state,omitempty"` StatementPdfUrl *string `json:"statement_pdf_url,omitempty"` TaxId *string `json:"taxid,omitempty"` Taxable *bool `json:"taxable,omitempty"` Taxes []*TaxRate `json:"taxes,omitempty"` Type *string `json:"type,omitempty"` UpdatedAt *int64 `json:"updated_at,omitempty"` }
type DiscountRequest ¶
type EmailRecipient ¶
type Estimate ¶
type Estimate struct { Approved string `json:"approved"` Attachments []int64 `json:"attachments"` Closed bool `json:"closed"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Customer int64 `json:"customer"` Date int64 `json:"date"` Deposit float64 `json:"deposit"` DepositPaid bool `json:"deposit_paid"` DisabledPaymentMethods []string `json:"disabled_payment_methods"` Discounts []Discount `json:"discounts"` Draft bool `json:"draft"` ExpirationDate int64 `json:"expiration_date"` Id int64 `json:"id"` Invoice int64 `json:"invoice"` Items []LineItem `json:"items"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Notes string `json:"notes"` Number string `json:"number"` Object string `json:"object"` PaymentTerms string `json:"payment_terms"` PdfUrl string `json:"pdf_url"` PurchaseOrder string `json:"purchase_order"` ShipTo string `json:"ship_to"` Status string `json:"status"` Subtotal float64 `json:"subtotal"` Taxes []Tax `json:"taxes"` Total float64 `json:"total"` UpdatedAt int64 `json:"updated_at"` Url string `json:"url"` }
type EstimateRequest ¶
type EstimateRequest struct { Approved *string `json:"approved,omitempty"` Attachments []*int64 `json:"attachments,omitempty"` CalculateTax *bool `json:"calculate_taxes,omitempty"` Closed *bool `json:"closed,omitempty"` Currency *string `json:"currency,omitempty"` Customer *int64 `json:"customer,omitempty"` Date *int64 `json:"date,omitempty"` Deposit *float64 `json:"deposit,omitempty"` DepositPaid *bool `json:"deposit_paid,omitempty"` DisabledPaymentMethods []*string `json:"disabled_payment_methods,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` Draft *bool `json:"draft,omitempty"` ExpirationDate *int64 `json:"expiration_date,omitempty"` Items []*LineItemRequest `json:"items,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Notes *string `json:"notes,omitempty"` Number *string `json:"number,omitempty"` PaymentTerms *string `json:"payment_terms,omitempty"` PurchaseOrder *string `json:"purchase_order,omitempty"` ShipTo *string `json:"ship_to,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` UpdatedAt *int64 `json:"updated_at,omitempty"` }
type Event ¶
type Event struct { Id int64 `json:"id"` Object string `json:"object"` Type string `json:"type"` Timestamp int64 `json:"timestamp"` Data json.RawMessage `json:"data"` User *User `json:"user"` }
func (*Event) ParseCustomerEvent ¶
func (*Event) ParseCustomerPreviousEvent ¶
func (*Event) ParseEventObject ¶
func (e *Event) ParseEventObject() (*json.RawMessage, error)
func (*Event) ParseEventPreviousObject ¶
func (e *Event) ParseEventPreviousObject() (*json.RawMessage, error)
func (*Event) ParseInvoiceEvent ¶
func (*Event) ParseInvoicePreviousEvent ¶
func (*Event) ParsePaymentEvent ¶
func (*Event) ParseSubscriptionEvent ¶
func (e *Event) ParseSubscriptionEvent() (*Subscription, error)
type EventObject ¶
type EventObject struct { Object *json.RawMessage `json:"object"` PreviousObject *json.RawMessage `json:"previous"` }
type Exclude ¶
type Exclude struct {
// contains filtered or unexported fields
}
func NewExclude ¶
func NewExclude() *Exclude
type FileRequest ¶
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func NewMetadataFilter ¶
func NewMetadataFilter() *Filter
type Invoice ¶
type Invoice struct { Attachments []int64 `json:"attachments"` AttemptCount int64 `json:"attempt_count"` AutoPay bool `json:"autopay"` Balance float64 `json:"balance"` Closed bool `json:"closed"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Customer int64 `json:"-"` CustomerFull *Customer `json:"-"` CustomerRaw json.RawMessage `json:"customer"` Date int64 `json:"date"` DisabledPaymentMethods []string `json:"disabled_payment_methods"` Discounts []Discount `json:"discounts"` Draft bool `json:"draft"` DueDate int64 `json:"due_date"` Id int64 `json:"id"` Items []LineItem `json:"items"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` NextPaymentAttempt int64 `json:"next_payment_attempt"` Notes string `json:"notes"` Number string `json:"number"` Object string `json:"object"` Paid bool `json:"paid"` PaymentPlan int64 `json:"payment_plan"` PaymentTerms string `json:"payment_terms"` PaymentUrl string `json:"payment_url"` PdfUrl string `json:"pdf_url"` PurchaseOrder string `json:"purchase_order"` Sent bool `json:"sent"` ShipTo *ShippingDetail `json:"ship_to"` Status string `json:"status"` Subscription int64 `json:"subscription"` Subtotal float64 `json:"subtotal"` Taxes []Tax `json:"taxes"` Total float64 `json:"total"` UpdatedAt int64 `json:"updated_at"` Url string `json:"url"` }
func (*Invoice) MarshalJSON ¶
func (*Invoice) TotalDiscountAmount ¶
func (*Invoice) TotalTaxAmount ¶
func (*Invoice) UnmarshalJSON ¶
type InvoiceRequest ¶
type InvoiceRequest struct { Attachments []*int64 `json:"attachments,omitempty"` AutoPay *bool `json:"autopay,omitempty"` CalculateTaxes *bool `json:"calculate_taxes,omitempty"` Closed *bool `json:"closed,omitempty"` Currency *string `json:"currency,omitempty"` Customer *int64 `json:"-"` Date *int64 `json:"date,omitempty"` DisabledPaymentMethods []*string `json:"disabled_payment_methods,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` Draft *bool `json:"draft,omitempty"` DueDate *int64 `json:"due_date,omitempty"` Items []*LineItemRequest `json:"items,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` NextPaymentAttempt *int64 `json:"next_payment_attempt,omitempty"` Notes *string `json:"notes,omitempty"` Number *string `json:"number,omitempty"` PaymentTerms *string `json:"payment_terms,omitempty"` PurchaseOrder *string `json:"purchase_order,omitempty"` Sent *bool `json:"sent,omitempty"` ShipTo *ShippingDetailRequest `json:"ship_to,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` }
type Item ¶
type Item struct { AvalaraLocationCode string `json:"avalara_location_code"` AvalaraTaxCode string `json:"avalara_tax_code"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Description string `json:"description"` Discountable bool `json:"discountable"` GlAccount string `json:"gl_account"` Id string `json:"id"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Object string `json:"object"` Taxable bool `json:"taxable"` Taxes []Tax `json:"taxes"` Type string `json:"service"` UnitCost float64 `json:"unit_cost"` UpdatedAt int64 `json:"updated_at"` }
type ItemRequest ¶
type ItemRequest struct { AvalaraLocationCode *string `json:"avalara_location_code,omitempty"` AvalaraTaxCode *string `json:"avalara_tax_code,omitempty"` Currency *string `json:"currency,omitempty"` Description *string `json:"description,omitempty"` Discountable *bool `json:"discountable,omitempty"` GlAccount *string `json:"gl_account,omitempty"` Id *string `json:"id,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Taxable *bool `json:"taxable,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` Type *string `json:"service,omitempty"` UnitCost *float64 `json:"unit_cost,omitempty"` }
type LineItem ¶
type LineItem struct { Amount float64 `json:"amount"` Description string `json:"description"` Discountable bool `json:"discountable"` Discounts []Discount `json:"discounts"` Id int64 `json:"id"` Item string `json:"catalog_item"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` PeriodEnd int64 `json:"period_end"` PeriodStart int64 `json:"period_start"` Plan string `json:"plan"` Prorated bool `json:"prorated"` Quantity float64 `json:"quantity"` Taxable bool `json:"taxable"` Taxes []Tax `json:"taxes"` Type string `json:"type"` UnitCost float64 `json:"unit_cost"` }
type LineItemPreview ¶
type LineItemPreview struct { Amount float64 `json:"amount"` Description string `json:"description"` Discountable bool `json:"discountable"` Discounts []Discount `json:"discounts"` Item string `json:"catalog_item"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` PeriodEnd int64 `json:"period_end"` PeriodStart int64 `json:"period_start"` Plan string `json:"plan"` Prorated bool `json:"prorated"` Quantity float64 `json:"quantity"` Taxable bool `json:"taxable"` Taxes []Tax `json:"taxes"` Type string `json:"type"` UnitCost float64 `json:"unit_cost"` }
type LineItemRequest ¶
type LineItemRequest struct { Amount *float64 `json:"amount,omitempty"` Description *string `json:"description,omitempty"` Discountable *bool `json:"discountable,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` Item *string `json:"catalog_item,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` PeriodEnd *int64 `json:"period_end,omitempty"` PeriodStart *int64 `json:"period_start,omitempty"` Plan *string `json:"plan,omitempty"` Prorated *bool `json:"prorated,omitempty"` Quantity *float64 `json:"quantity,omitempty"` Taxable *bool `json:"taxable,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` Type *string `json:"type,omitempty"` UnitCost *float64 `json:"unit_cost,omitempty"` }
type Member ¶
type Member struct { CreatedAt int64 `json:"created_at"` UpdatedAt int64 `json:"updated_at"` EmailUpdateFrequency string `json:"email_update_frequency"` Id int64 `json:"id"` LastSignedIn int64 `json:"last_accessed"` RestrictionMode string `json:"restriction_mode"` Restrictions map[string][]string `json:"restrictions"` Role string `json:"role"` User *User `json:"user"` }
type MemberRequest ¶
type MemberRequest struct { Email *string `json:"email,omitempty"` FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` RestrictionMode *string `json:"restriction_mode,omitempty"` Restrictions *map[string][]string `json:"restrictions,omitempty"` Role *string `json:"role,omitempty"` }
type MemberRequests ¶
type MemberRequests []MemberRequest
type NoteRequest ¶
type Notification ¶
type NotificationRequest ¶
type Notifications ¶
type Notifications []*Notification
type Payment ¶
type Payment struct { Amount float64 `json:"amount"` AppliedTo []PaymentItem `json:"applied_to"` Balance float64 `json:"balance"` Charge *Charge `json:"charge"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Customer int64 `json:"-"` CustomerFull *Customer `json:"-"` CustomerRaw json.RawMessage `json:"customer"` Date int64 `json:"date"` Id int64 `json:"id"` Matched bool `json:"matched"` Metadata map[string]interface{} `json:"metadata"` Method string `json:"method"` Notes string `json:"notes"` Object string `json:"object"` PdfUrl string `json:"pdf_url"` Reference string `json:"reference"` Source string `json:"source"` Status string `json:"status"` UpdatedAt int64 `json:"updated_at"` Voided bool `json:"voided"` }
func (*Payment) MarshalJSON ¶
func (*Payment) UnmarshalJSON ¶
type PaymentItem ¶
type PaymentItemRequest ¶
type PaymentItemRequest struct { Amount *float64 `json:"amount,omitempty"` CreditNote *int64 `json:"credit_note,omitempty"` DocumentType *string `json:"document_type,omitempty"` Estimate *int64 `json:"estimate,omitempty"` Invoice *int64 `json:"invoice,omitempty"` Type *string `json:"type,omitempty"` }
type PaymentPlan ¶
type PaymentPlan struct { Approval *PaymentPlanApproval `json:"approval,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` Id int64 `json:"id,omitempty"` Installments []PaymentPlanInstallment `json:"installments,omitempty"` Object string `json:"object,omitempty"` Status string `json:"status,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` }
type PaymentPlanApproval ¶
type PaymentPlanInstallment ¶
type PaymentPlanInstallments ¶
type PaymentPlanInstallments []*PaymentPlanInstallment
type PaymentPlanRequest ¶
type PaymentPlanRequest struct {
Installments []*PaymentPlanInstallmentRequest `json:"installments,omitempty"`
}
type PaymentRequest ¶
type PaymentRequest struct { Amount *float64 `json:"amount,omitempty"` AppliedTo []*PaymentItemRequest `json:"applied_to,omitempty"` Currency *string `json:"currency,omitempty"` Customer *int64 `json:"-"` Date *int64 `json:"date,omitempty"` Method *string `json:"method,omitempty"` Notes *string `json:"notes,omitempty"` Metadata map[string]interface{} `json:"metadata"` Reference *string `json:"reference,omitempty"` Source *string `json:"source,omitempty"` Voided *bool `json:"voided,omitempty"` }
type PaymentSource ¶
type PaymentSource struct { *BankAccount *Card Object string `json:"object"` }
func (*PaymentSource) UnmarshalJSON ¶
func (d *PaymentSource) UnmarshalJSON(data []byte) error
type PaymentSourceRequest ¶
type PaymentSources ¶
type PaymentSources []*PaymentSource
type PendingLineItem ¶
type PendingLineItem struct { Description string `json:"description"` Discountable bool `json:"discountable"` Discounts []Discount `json:"discounts"` Id int64 `json:"id"` Item string `json:"catalog_item"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Quantity float64 `json:"quantity"` Taxable bool `json:"taxable"` Taxes []Tax `json:"taxes"` Type string `json:"type"` UnitCost float64 `json:"unit_cost"` }
type PendingLineItemRequest ¶
type PendingLineItemRequest struct { Description *string `json:"description,omitempty"` Discountable *bool `json:"discountable,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` Item *string `json:"catalog_item,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Quantity *float64 `json:"quantity,omitempty"` Taxable *bool `json:"taxable,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` Type *string `json:"type,omitempty"` UnitCost *float64 `json:"unit_cost,omitempty"` }
type PendingLineItems ¶
type PendingLineItems []PendingLineItem
type Plan ¶
type Plan struct { Amount float64 `json:"amount"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Id string `json:"id"` Interval string `json:"interval"` IntervalCount float64 `json:"interval_count"` Item string `json:"catalog_item"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` NumberOfSubscriptions *int64 `json:"num_subscriptions"` Object string `json:"object"` PricingMode string `json:"pricing_mode"` QuantityType string `json:"quantity_type"` Tiers []Tier `json:"tier"` UpdatedAt int64 `json:"updated_at"` }
type PlanRequest ¶
type PlanRequest struct { Amount *float64 `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` Id *string `json:"id,omitempty"` Interval *string `json:"interval,omitempty"` IntervalCount *float64 `json:"interval_count,omitempty"` Item *string `json:"catalog_item,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` PricingMode *string `json:"pricing_mode,omitempty"` QuantityType *string `json:"quantity_type,omitempty"` Tiers []*TierRequest `json:"tier,omitempty"` }
type Refund ¶
type Refund struct { Amount float64 `json:"amount,omitempty"` Charge int64 `json:"charge,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` Currency string `json:"currency,omitempty"` FailureMessage string `json:"failure_message,omitempty"` Gateway string `json:"gateway,omitempty"` GatewayId string `json:"gateway_id,omitempty"` Id int64 `json:"id,omitempty"` Object string `json:"object,omitempty"` Status string `json:"status,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` }
type RefundRequest ¶
type RefundRequest struct {
Amount *float64 `json:"amount,omitempty"`
}
type SendEmailRequest ¶
type SendEmailRequest struct { Bcc *string `json:"bcc,omitempty"` Message *string `json:"message,omitempty"` Subject *string `json:"subject,omitempty"` Template *string `json:"template,omitempty"` To []*EmailRecipient `json:"to,omitempty"` }
type SendStatementEmailRequest ¶
type SendStatementEmailRequest struct { Bcc *string `json:"bcc,omitempty"` End *int64 `json:"end,omitempty"` Items *string `json:"items,omitempty"` Message *string `json:"message,omitempty"` Start *int64 `json:"start,omitempty"` Subject *string `json:"subject,omitempty"` Template *string `json:"template,omitempty"` To []*EmailRecipient `json:"to,omitempty"` Type *string `json:"type,omitempty"` }
type SendTextMessageRequest ¶
type SendTextMessageRequest struct { To []*TextMessageRecipient `json:"to,omitempty"` Message *string `json:"message,omitempty"` }
type ShippingDetail ¶
type ShippingDetailRequest ¶
type ShippingDetailRequest struct { Address1 *string `json:"address1,omitempty"` Address2 *string `json:"address2,omitempty"` AttentionTo *string `json:"attention_to,omitempty"` City *string `json:"city,omitempty"` Country *string `json:"country,omitempty"` Name *string `json:"name,omitempty"` PostalCode *string `json:"postal_code,omitempty"` State *string `json:"state,omitempty"` }
type Subscription ¶
type Subscription struct { Addons []SubscriptionAddon `json:"addons"` Amount float64 `json:"amount"` BillIn string `json:"bill_in"` BillInAdvanceDays int64 `json:"bill_in_advance_days"` CancelAtPeriodEnd bool `json:"cancel_at_period_end"` CanceledAt int64 `json:"cancel_at"` ContractPeriodEnd int64 `json:"contract_period_end"` ContractPeriodStart int64 `json:"contract_period_start"` ContractRenewalCycles int64 `json:"contract_renewal_cycles"` ContractRenewalMode string `json:"contract_renewal_mode"` CreatedAt int64 `json:"created_at"` Customer int64 `json:"-"` CustomerFull *Customer `json:"-"` CustomerRaw json.RawMessage `json:"customer"` Cycles int64 `json:"cycles"` Discounts []Discount `json:"discount"` Id int64 `json:"id"` Metadata map[string]interface{} `json:"metadata"` Mrr float64 `json:"MRR"` Object string `json:"object"` Paused bool `json:"paused"` PeriodEnd int64 `json:"period_end"` PeriodStart int64 `json:"period_start"` Plan string `json:"-"` PlanFull *Plan `json:"-"` PlanRaw json.RawMessage `json:"plan"` Prorate bool `json:"prorate"` Quantity float64 `json:"quantity"` RecurringTotal float64 `json:"recurring_total"` ShipTo *ShippingDetail `json:"ship_to"` StartDate int64 `json:"start_date"` Status string `json:"status"` Taxes []Tax `json:"taxes"` UpdatedAt int64 `json:"updated_at"` Url string `json:"url"` }
func (*Subscription) MarshalJSON ¶
func (i *Subscription) MarshalJSON() ([]byte, error)
func (*Subscription) String ¶
func (s *Subscription) String() string
func (*Subscription) UnmarshalJSON ¶
func (i *Subscription) UnmarshalJSON(data []byte) error
type SubscriptionAddon ¶
type SubscriptionPreview ¶
type SubscriptionPreview struct { FirstInvoice *SubscriptionPreviewInvoice `json:"first_invoice"` MRR float64 `json:"mrr"` RecurringTotal float64 `json:"recurring_total"` }
type SubscriptionPreviewInvoice ¶
type SubscriptionPreviewInvoice struct { AttemptCount int64 `json:"attempt_count"` AutoPay bool `json:"autopay"` Balance float64 `json:"balance"` Closed bool `json:"closed"` CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Customer int64 `json:"customer"` Date int64 `json:"date"` Discounts []Discount `json:"discounts"` Draft bool `json:"draft"` DueDate int64 `json:"due_date"` Items []LineItemPreview `json:"items"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` NextPaymentAttempt int64 `json:"next_payment_attempt"` Notes string `json:"notes"` Number string `json:"number"` Paid bool `json:"paid"` PaymentTerms string `json:"payment_terms"` PaymentUrl string `json:"payment_url"` PdfUrl string `json:"pdf_url"` Status string `json:"status"` Subtotal float64 `json:"subtotal"` Taxes []Tax `json:"taxes"` Total float64 `json:"total"` UpdatedAt int64 `json:"updated_at"` Url string `json:"url"` }
type SubscriptionPreviewRequest ¶
type SubscriptionPreviewRequest struct { Addons []*SubscriptionAddonRequest `json:"addons,omitempty"` Customer *int64 `json:"customer,omitempty"` Discounts []*DiscountRequest `json:"discounts,omitempty"` PendingLineItems []*PendingLineItemRequest `json:"pending_line_item,omitempty"` Plan *string `json:"plan,omitempty"` Quantity *float64 `json:"quantity,omitempty"` Taxes []*TaxRequest `json:"Taxes,omitempty"` }
type SubscriptionRequest ¶
type SubscriptionRequest struct { Addons []*SubscriptionAddonRequest `json:"addons,omitempty"` Amount *float64 `json:"amount,omitempty"` BillIn *string `json:"bill_in,omitempty"` BillInAdvanceDays *int64 `json:"bill_in_advance_days,omitempty"` CancelAtPeriodEnd *bool `json:"cancel_at_period_end,omitempty"` ContractPeriodEnd *int64 `json:"contract_period_end,omitempty"` ContractPeriodStart *int64 `json:"contract_period_start,omitempty"` ContractRenewalCycles *int64 `json:"contract_renewal_cycles,omitempty"` ContractRenewalMode *string `json:"contract_renewal_mode,omitempty"` Customer *int64 `json:"customer,omitempty"` Cycles *int64 `json:"cycles,omitempty"` Discounts []*DiscountRequest `json:"discount,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Paused *bool `json:"paused,omitempty"` PeriodEnd *int64 `json:"period_end,omitempty"` Plan *string `json:"plan,omitempty"` Prorate *bool `json:"prorate,omitempty"` ProrationDate *int64 `json:"proration_date,omitempty"` Quantity *float64 `json:"quantity,omitempty"` ShipTo *ShippingDetail `json:"ship_to,omitempty"` SnapToNthDay *int64 `json:"snap_to_nth_day,omitempty"` StartDate *int64 `json:"start_date,omitempty"` Taxes []*TaxRequest `json:"taxes,omitempty"` }
type Subscriptions ¶
type Subscriptions []*Subscription
type Task ¶
type Task struct { Action string `json:"action"` ChaseStep int64 `json:"chase_step_id"` Complete bool `json:"complete"` CompletedByUser int64 `json:"completed_by_user_id"` CompletedDate int64 `json:"completed_date"` CreatedAt int64 `json:"created_at"` Customer int64 `json:"customer_id"` DueDate int64 `json:"due_date"` Id int64 `json:"id"` Name string `json:"name"` UpdatedAt int64 `json:"updated_at"` User int64 `json:"user_id"` }
type TaskRequest ¶
type TaxRate ¶
type TaxRate struct { CreatedAt int64 `json:"created_at"` Currency string `json:"currency"` Id string `json:"id"` Inclusive bool `json:"inclusive"` IsPercent bool `json:"is_percent"` Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` Object string `json:"object"` UpdatedAt int64 `json:"updated_at"` Value float64 `json:"value"` }
type TaxRateRequest ¶
type TaxRateRequest struct { Currency *string `json:"currency,omitempty"` Id *string `json:"id,omitempty"` Inclusive *bool `json:"inclusive,omitempty"` IsPercent *bool `json:"is_percent,omitempty"` Metadata *map[string]interface{} `json:"metadata,omitempty"` Name *string `json:"name,omitempty"` Value *float64 `json:"value,omitempty"` }
type TaxRequest ¶
type TextMessage ¶
type TextMessageRecipient ¶
type TextMessages ¶
type TextMessages []*TextMessage
type TierRequest ¶
type User ¶
type User struct { Email string `json:"email,omitempty"` FirstName string `json:"first_name,omitempty"` Id int64 `json:"id,omitempty"` LastName string `json:"last_name,omitempty"` Registered bool `json:"registered,omitempty"` TwoFactorEnabled bool `json:"two_factor_enabled,omitempty"` }
func (*User) GenerateRegistrationURL ¶
type UserEmailUpdateRequest ¶
type UserEmailUpdateRequest struct {
EmailUpdateFrequency *string `json:"email_update_frequency"`
}
type UserInvite ¶
type UserInvite struct {
Id int64 `json:"id"`
}
type WebhookAttempt ¶
type WebhookAttempt struct { Attempts []WebhookAttemptStatus `json:"attempts,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` EventId int64 `json:"event_id,omitempty"` Id int64 `json:"id,omitempty"` Payload json.RawMessage `json:"payload,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` }
type WebhookAttemptStatus ¶
type WebhookAttempts ¶
type WebhookAttempts []*WebhookAttempt
Source Files ¶
- accounting_sync_status.go
- api.go
- balance.go
- charges.go
- chasing.go
- contacts.go
- coupons.go
- credit_balance_adjustment.go
- credit_notes.go
- customers.go
- discounts.go
- emails.go
- errors.go
- estimates.go
- events.go
- exclude.go
- expand.go
- files.go
- filters.go
- invoices.go
- items.go
- letters.go
- line_items.go
- mock.go
- notes.go
- notifications.go
- payment_plans.go
- payment_sources.go
- payments.go
- pending_line_items.go
- plans.go
- refunds.go
- roles.go
- shipping_detail.go
- sort.go
- subscription_addons.go
- subscriptions.go
- tasks.go
- tax_rates.go
- taxes.go
- text_messages.go
- users.go
- util.go
- version.go
- webhook_attempts.go
Click to show internal directories.
Click to hide internal directories.