def list_agreements(name, agreement_option, custom_headers:nil)
      first_page = list_agreements_as_lazy(name, agreement_option, custom_headers:custom_headers)
      first_page.get_all_items
    end
def list_agreements(name, agreement_option, custom_headers:nil)
      first_page = list_agreements_as_lazy(name, agreement_option, custom_headers:custom_headers)
      first_page.get_all_items
    end
Gets all legal agreements that user needs to accept before purchasing a
 domain.

 Gets all legal agreements that user needs to accept before purchasing a
 domain.

 @param name [String] Name of the top-level domain.
 @param agreement_option [TopLevelDomainAgreementOption] Domain agreement
 options.
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.

 @return [Array<TldLegalAgreement>] operation results.