github.com/mundipagg/boleto-api@v0.0.0-20230620145841-3f9ec742599f/models/buyer.go (about)

     1  package models
     2  
     3  // Buyer informações de entrada do comprador
     4  type Buyer struct {
     5  	Name     string   `json:"name,omitempty"`
     6  	Email    string   `json:"email,omitempty"`
     7  	Document Document `json:"document,omitempty"`
     8  	Address  Address  `json:"address,omitempty"`
     9  }
    10  
    11  //HasAddress verify if Adress is not empty
    12  func (b Buyer) HasAddress() bool {
    13  	return b.Address != Address{}
    14  }