// CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal
CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal
// CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal
func (c *Client) CounterOfferCredentialByID(
	credentialExchangeID string,
	credentialDefinitionID string,
	credentialPreview CredentialPreview,
	issuerDID string,
	schemaID string,
	schemaIssuerDID string,
	schemaName string,
	schemaVersion string,
	comment string,
) (CredentialExchangeRecord, error) {
	var countOffer = credentialBoundOfferRequest{
		CounterProposal: credentialCountProposal{
			CredentialDefinitionID: credentialDefinitionID,
			CredentialPreview:      credentialPreview,
			IssuerDID:              issuerDID,
			SchemaID:               schemaID,
			SchemaIssuerDID:        schemaIssuerDID,
			SchemaName:             schemaName,
			SchemaVersion:          schemaVersion,
			Comment:                comment,
		},
	}
	var credentialExchange CredentialExchangeRecord
	err := c.post(fmt.Sprintf("/issue-credential/records/%s/send-offer", credentialExchangeID), nil, countOffer, &credentialExchange)
	if err != nil {
		return CredentialExchangeRecord{}, err
	}
	return credentialExchange, nil
}
func ( c * Client ) CounterOfferCredentialByID ( credentialExchangeID string , credentialDefinitionID string , credentialPreview CredentialPreview , issuerDID string , schemaID string , schemaIssuerDID string , schemaName string , schemaVersion string , comment string , ) ( CredentialExchangeRecord , error ) { var countOffer = credentialBoundOfferRequest { CounterProposal : credentialCountProposal { CredentialDefinitionID : credentialDefinitionID , CredentialPreview : credentialPreview , IssuerDID : issuerDID , SchemaID : schemaID , SchemaIssuerDID : schemaIssuerDID , SchemaName : schemaName , SchemaVersion : schemaVersion , Comment : comment , } , } var credentialExchange CredentialExchangeRecord err := c . post ( fmt . Sprintf ( " " , credentialExchangeID ) , nil , countOffer , & credentialExchange ) if err != nil { return CredentialExchangeRecord { } , err } return credentialExchange , nil }
CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal
CounterOfferCredentialByID sends an count offer to the holder based on a previously received proposal