code: public function address($type = Address::BOTH)
      {
          $address = new Address();
  
          if ($type & Address::BILLING == Address::BILLING) {
              $this->setBillingAddress($address);
          }
  
          if ($type & Address::SHIPPING == Address::SHIPPING) {
              $this->setShippingAddress($address);
          }
  
          return $address;
      }
docs: @param int $type
  
  @return Address