Documentation
¶
Index ¶
- type CreditCardHolderInfo
- type CreditCardInfo
- type Echarge
- func (s *Echarge) CreateCharge(body RequestCharge) (*ResponseCharge, error)
- func (s *Echarge) CreateClient(body RequestClient) (*ResponseClient, error)
- func (s *Echarge) CreateToken(body RequestCreditCard) (*ResponseCreditCard, error)
- func (s *Echarge) DeleteCharge(param string) error
- func (s *Echarge) DeleteClient(param string) error
- func (s *Echarge) ListClient(param string) (*ResponseClient, error)
- func (s *Echarge) RestoreClient(param string) (*ResponseClient, error)
- func (s *Echarge) SearchCharge(param string) (*ResponseCharge, error)
- func (e *Echarge) SetEnvironment(env Environment) *Echarge
- func (e *Echarge) SetHeader() *Echarge
- func (e *Echarge) SetKey(key string) *Echarge
- func (s *Echarge) UpdateCharge(param string, body RequestCharge) (*ResponseCharge, error)
- func (s *Echarge) UpdateClient(param string, body RequestClient) (*ResponseClient, error)
- type Environment
- type RequestCharge
- type RequestClient
- type RequestCreditCard
- type RequestPayment
- type ResponseCharge
- type ResponseClient
- type ResponseCreditCard
- type ResponsePayment
- type Slipt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreditCardHolderInfo ¶
type CreditCardHolderInfo struct {
Name string `json:"name" bson:"name"`
Email string `json:"email" bson:"email"`
Document string `json:"cpfCnpj" bson:"document"`
PostalCode string `json:"postalCode" bson:"postal_code"`
AddressNumber string `json:"addressNumber" bson:"address_number"`
AddressComplement string `json:"addressComplement" bson:"address_complement"`
Phone string `json:"phone" bson:"phone"`
MobilePhone string `json:"mobilePhone" bson:"mobile_phone"`
}
type CreditCardInfo ¶
type Echarge ¶
type Echarge struct {
// contains filtered or unexported fields
}
func (*Echarge) CreateCharge ¶
func (s *Echarge) CreateCharge(body RequestCharge) (*ResponseCharge, error)
func (*Echarge) CreateClient ¶
func (s *Echarge) CreateClient(body RequestClient) (*ResponseClient, error)
func (*Echarge) CreateToken ¶
func (s *Echarge) CreateToken(body RequestCreditCard) (*ResponseCreditCard, error)
func (*Echarge) DeleteCharge ¶
func (*Echarge) DeleteClient ¶
func (*Echarge) ListClient ¶
func (s *Echarge) ListClient(param string) (*ResponseClient, error)
func (*Echarge) RestoreClient ¶
func (s *Echarge) RestoreClient(param string) (*ResponseClient, error)
func (*Echarge) SearchCharge ¶
func (s *Echarge) SearchCharge(param string) (*ResponseCharge, error)
func (*Echarge) SetEnvironment ¶
func (e *Echarge) SetEnvironment(env Environment) *Echarge
func (*Echarge) UpdateCharge ¶
func (s *Echarge) UpdateCharge(param string, body RequestCharge) (*ResponseCharge, error)
func (*Echarge) UpdateClient ¶
func (s *Echarge) UpdateClient(param string, body RequestClient) (*ResponseClient, error)
type Environment ¶
type Environment string
const ( Prodution Environment = "https://api.asaas.com/" Homologation Environment = "https://api-sandbox.asaas.com/" )
type RequestCharge ¶
type RequestCharge struct {
Customer string `json:"customer,omitempty" bson:"costumer,omitempty"`
BillingType string `json:"billingType" bson:"billing_type"`
DueDate string `json:"dueDate" bson:"due_date"`
Description string `json:"description" bson:"description"`
Value float64 `json:"value" bson:"value"`
Split []Slipt `json:"split" bson:"split"`
}
type RequestClient ¶
type RequestCreditCard ¶
type RequestCreditCard struct {
RemoteIP string `json:"remoteIp" bson:"remote_ip"`
Customer string `json:"customer" bson:"customer"`
CreditCard CreditCardInfo `json:"creditCardInfo" bson:"credit_card_info"`
CreditCardHolderInfo CreditCardHolderInfo `json:"creditCardHolderInfo" bson:"credit_card_holder_info"`
}
type RequestPayment ¶
type RequestPayment struct {
CreditCardToken string `json:"creditCardToken" bson:"credit_card_token"`
}
type ResponseCharge ¶
type ResponseCharge struct {
ChargeID string `json:"id" bson:"id"`
Object string `json:"object" bson:"object"`
Customer string `json:"customer" bson:"customer"`
DateCreated string `json:"dateCreated" bson:"date_created"`
Description string `json:"description" bson:"description"`
Status string `json:"status" bson:"status"`
BillingType string `json:"billingType" bson:"billing_type"`
Value float64 `json:"value" bson:"value"`
NetValue float64 `json:"netValue" bson:"net_value"`
}
type ResponseClient ¶
type ResponseClient struct {
Costumer string `json:"id" bson:"id"`
Object string `json:"object" bson:"object"`
Name string `json:"name,omitempty" bson:"name,omitempty"`
Email string `json:"email,omitempty" bson:"email,omitempty"`
Document string `json:"cpfCnpj,omitempty" bson:"document,omitempty"`
Deleted bool `json:"deleted,omitempty" bson:"deleted,omitempty"`
}
type ResponseCreditCard ¶
type ResponsePayment ¶
type ResponsePayment struct {
ChargeID string `json:"id" bson:"id"`
Object string `json:"object" bson:"object"`
Customer string `json:"customer" bson:"customer"`
DateCreated string `json:"dateCreated" bson:"date_created"`
Description string `json:"description" bson:"description"`
Status string `json:"status" bson:"status"`
BillingType string `json:"billingType" bson:"billing_type"`
Value float64 `json:"value" bson:"value"`
NetValue float64 `json:"netValue" bson:"net_value"`
}
Click to show internal directories.
Click to hide internal directories.