add documentation for account_records_query.go
@@ -2,11 +2,18 @@ package hedera
import "github.com/hashgraph/hedera-sdk-go/proto"
+// AccountRecordsQuery gets all of the records for an account for any transfers into it and out of
+// it, that were above the threshold, during the last 25 hours.
type AccountRecordsQuery struct {
QueryBuilder
pb *proto.CryptoGetAccountRecordsQuery
}
+// NewAccountRecordsQuery creates an AccountRecordsQuery builder which can be used to construct and execute
+// an AccountRecordsQuery.
+//
+// It is recommended that you use this for creating new instances of an AccountRecordQuery
+// instead of manually creating an instance of the struct.
func NewAccountRecordsQuery() *AccountRecordsQuery {
pb := &proto.CryptoGetAccountRecordsQuery{Header: &proto.QueryHeader{}}
@@ -16,11 +23,13 @@ func NewAccountRecordsQuery() *AccountRecordsQuery {
return &AccountRecordsQuery{inner, pb}
}
+// SetAccountID sets the account ID for which the records should be retrieved.
func (builder *AccountRecordsQuery) SetAccountID(id AccountID) *AccountRecordsQuery {
builder.pb.AccountID = id.toProto()
return builder
}
+// Execute executes the AccountRecordsQuery using the provided client
func (builder *AccountRecordsQuery) Execute(client *Client) ([]TransactionRecord, error) {
var records = []TransactionRecord{}
