// GetReceiptDetails return detailed informations about a receipt. This is used
// used to check the acknowledged status of an Emergency notification.
191864
func (p *Pushover) GetReceiptDetails(receipt string) (*ReceiptDetails, error) {
	url := fmt.Sprintf("%s/receipts/%s.json?token=%s", APIEndpoint, receipt, p.token)

	if receipt == "" {
		return nil, ErrEmptyReceipt
	}

	// Send request
	resp, err := http.Get(url)
	if err != nil {
		return nil, err
	}

	// Decode the JSON response
	var details *ReceiptDetails
	if err = json.NewDecoder(resp.Body).Decode(&details); err != nil {
		return nil, err
	}

	return details, nil
}
448732
func (u *UpdateCheckRunOptions) GetDetailsURL() string {
	if u == nil || u.DetailsURL == nil {
		return ""
	}
	return *u.DetailsURL
}
587990
func NewReceipt(root []byte, failed bool, cumulativeGasUsed uint64) *Receipt {
	r := &Receipt{PostState: common.CopyBytes(root), CumulativeGasUsed: cumulativeGasUsed}
	if failed {
		r.Status = ReceiptStatusFailed
	} else {
		r.Status = ReceiptStatusSuccessful
	}
	return r
}
878665
func (s *Service) ResourceDetails(publicId string) (*ResourceDetails, error) {
	return s.doGetResourceDetails(publicId)
}
889176
func (c *Client) GetIMDBMovieDetails(id string) (*Movie, error) {
	params := []interface{}{c.Token, id}
	res := struct {
		Status string `xmlrpc:"status"`
		Data   Movie  `xmlrpc:"data"`
	}{}
	if err := c.Call("GetIMDBMovieDetails", params, &res); err != nil {
		return nil, err
	}
	if res.Status != StatusSuccess {
		return nil, fmt.Errorf("GetIMDBMovieDetails error: %s", res.Status)
	}
	return &res.Data, nil
}
376371
func NewReceiptFromJSON(data string) (*Receipt, error) {
	r := &Receipt{
		receipt: new(types.Receipt),
	}
	if err := json.Unmarshal([]byte(data), r.receipt); err != nil {
		return nil, err
	}
	return r, nil
}
1153133
func (c Client) Details(id string, params *stripe.IssuingCardParams) (*stripe.IssuingCardDetails, error) {
	path := stripe.FormatURLPath("/v1/issuing/cards/%s/details", id)
	cardDetails := &stripe.IssuingCardDetails{}
	err := c.B.Call(http.MethodGet, path, c.Key, params, cardDetails)
	return cardDetails, err
}
1261187
func (c *Client) GetConsumeDetails(urlStr string) (params.ConsumeOfferDetails, error) {

	url, err := crossmodel.ParseOfferURL(urlStr)
	if err != nil {
		return params.ConsumeOfferDetails{}, errors.Trace(err)
	}
	if url.Source != "" {
		return params.ConsumeOfferDetails{}, errors.NotSupportedf("query for application offers on another controller")
	}

	found := params.ConsumeOfferDetailsResults{}

	err = c.facade.FacadeCall("GetConsumeDetails", params.OfferURLs{[]string{urlStr}}, &found)
	if err != nil {
		return params.ConsumeOfferDetails{}, errors.Trace(err)
	}

	result := found.Results
	if len(result) != 1 {
		return params.ConsumeOfferDetails{}, errors.Errorf("expected to find one result for url %q but found %d", url, len(result))
	}

	theOne := result[0]
	if theOne.Error != nil {
		return params.ConsumeOfferDetails{}, errors.Trace(theOne.Error)
	}
	return params.ConsumeOfferDetails{
		Offer:          theOne.Offer,
		Macaroon:       theOne.Macaroon,
		ControllerInfo: theOne.ControllerInfo,
	}, nil
}
763197
func (s *GroupsService) GetGroupDetail(groupID string) (*GroupInfo, *Response, error) {
	u := fmt.Sprintf("groups/%s/detail", groupID)
	return s.getGroupInfoResponse(u)
}
565242
func (ud *UltraDns) GetAccountDetails() ([]AccInfo, error) {
	var Res struct {
		RInfo    ResultInfo `json:"resultInfo"`
		Accounts []AccInfo  `json:"accounts"`
	}

	_, body, err := ud.Client.Get(UltraHost+"/v1/accounts").
		Set("Authorization", ud.tokenHeader).End()
	if err != nil {
		return Res.Accounts, errors.New("Authentication Failed")
	}

	errr := json.Unmarshal([]byte(body), &Res)
	if errr != nil {
		return Res.Accounts, errors.New("Unmarshal Error")
	}

	return Res.Accounts, nil
}
1291323
func (b *Block) resolveReceipts(ctx context.Context) ([]*types.Receipt, error) {
	if b.receipts == nil {
		hash := b.hash
		if hash == (common.Hash{}) {
			header, err := b.resolveHeader(ctx)
			if err != nil {
				return nil, err
			}
			hash = header.Hash()
		}

		receipts, err := b.backend.GetReceipts(ctx, hash)
		if err != nil {
			return nil, err
		}
		b.receipts = []*types.Receipt(receipts)
	}
	return b.receipts, nil
}
1097539
func (_m *ClientInterface) GetServiceDetailsByTenantID(tenantID string) ([]service.ServiceDetails, error) {
	ret := _m.Called(tenantID)

	var r0 []service.ServiceDetails
	if rf, ok := ret.Get(0).(func(string) []service.ServiceDetails); ok {
		r0 = rf(tenantID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]service.ServiceDetails)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(tenantID)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
305079
func (dh *Client) ImageDetails(id string) (imageDetails *docker.ImageDetails, e error) {
	imageDetails = &docker.ImageDetails{}
	return imageDetails, dh.getJSON(dh.Address+"/images/"+id+"/json", imageDetails)
}
370519
func (this *FcmClient) GetInfo(withDetails bool, instanceIdToken string) (*InstanceIdInfoResponse, error) {

	var request_url string = generateGetInfoUrl(instance_id_info_no_details_srv_url, instanceIdToken)

	if withDetails == true {
		request_url = generateGetInfoUrl(instance_id_info_with_details_srv_url, instanceIdToken)
	}

	request, err := http.NewRequest("GET", request_url, nil)
	request.Header.Set("Authorization", this.apiKeyHeader())
	request.Header.Set("Content-Type", "application/json")

	if err != nil {
		return nil, err
	}

	client := &http.Client{}
	response, err := client.Do(request)
	if err != nil {
		return nil, err
	}

	defer response.Body.Close()

	body, err := ioutil.ReadAll(response.Body)
	if err != nil {
		return nil, err
	}

	infoResponse, err := parseGetInfo(body)
	if err != nil {
		return nil, err
	}

	return infoResponse, nil
}
1293805
func (f *Facade) GetServiceDetailsByTenantID(ctx datastore.Context, tenantID string) ([]service.ServiceDetails, error) {
	defer ctx.Metrics().Stop(ctx.Metrics().Start("Facade.GetServiceDetailsByTenantID"))
	svcs, err := f.serviceStore.Query(ctx, service.Query{})
	if err != nil {
		return nil, err
	}
	return f.filterDetailsByTenantID(ctx, tenantID, svcs)
}
616723
func (api *OffersAPI) GetConsumeDetails(args params.OfferURLs) (params.ConsumeOfferDetailsResults, error) {
	var consumeResults params.ConsumeOfferDetailsResults
	results := make([]params.ConsumeOfferDetailsResult, len(args.OfferURLs))

	offers, err := api.ApplicationOffers(args)
	if err != nil {
		return consumeResults, common.ServerError(err)
	}

	addrs, caCert, err := api.getControllerInfo()
	if err != nil {
		return consumeResults, common.ServerError(err)
	}

	controllerInfo := &params.ExternalControllerInfo{
		ControllerTag: api.ControllerModel.ControllerTag().String(),
		Addrs:         addrs,
		CACert:        caCert,
	}

	for i, result := range offers.Results {
		results[i].Error = result.Error
		if result.Error != nil {
			continue
		}
		offer := result.Result
		offerDetails := &offer.ApplicationOfferDetails
		results[i].Offer = offerDetails
		results[i].ControllerInfo = controllerInfo
		offerMacaroon, err := api.authContext.CreateConsumeOfferMacaroon(offerDetails, api.Authorizer.GetAuthTag().Id())
		if err != nil {
			results[i].Error = common.ServerError(err)
			continue
		}
		results[i].Macaroon = offerMacaroon
	}
	consumeResults.Results = results
	return consumeResults, nil
}
22743
func (memif *Memif) GetDetails() (details *MemifDetails, err error) {
	cDetails := C.govpp_memif_details_t{}
	var buf *C.char

	// Get memif details from C-libmemif.
	errCode := C.govpp_memif_get_details(memif.cHandle, &cDetails, &buf)
	err = getMemifError(int(errCode))
	if err != nil {
		return nil, err
	}
	defer C.free(unsafe.Pointer(buf))

	// Convert details from C to Go.
	details = &MemifDetails{}
	// - metadata:
	details.IfName = C.GoString(cDetails.if_name)
	details.InstanceName = C.GoString(cDetails.inst_name)
	details.ConnID = uint32(cDetails.id)
	details.SocketFilename = C.GoString(cDetails.socket_filename)
	if cDetails.secret != nil {
		details.Secret = C.GoString(cDetails.secret)
	}
	details.IsMaster = cDetails.role == C.uint8_t(0)
	switch cDetails.mode {
	case C.MEMIF_INTERFACE_MODE_ETHERNET:
		details.Mode = IfModeEthernet
	case C.MEMIF_INTERFACE_MODE_IP:
		details.Mode = IfModeIP
	case C.MEMIF_INTERFACE_MODE_PUNT_INJECT:
		details.Mode = IfModePuntInject
	default:
		details.Mode = IfModeEthernet
	}
	// - connection details:
	details.RemoteIfName = C.GoString(cDetails.remote_if_name)
	details.RemoteInstanceName = C.GoString(cDetails.remote_inst_name)
	details.HasLink = cDetails.link_up_down == C.uint8_t(1)
	// - RX queues:
	var i uint8
	for i = 0; i < uint8(cDetails.rx_queues_num); i++ {
		cRxQueue := C.govpp_get_rx_queue_details(&cDetails, C.int(i))
		queueDetails := MemifQueueDetails{
			QueueID:    uint8(cRxQueue.qid),
			RingSize:   uint32(cRxQueue.ring_size),
			BufferSize: uint16(cRxQueue.buffer_size),
		}
		details.RxQueues = append(details.RxQueues, queueDetails)
	}
	// - TX queues:
	for i = 0; i < uint8(cDetails.tx_queues_num); i++ {
		cTxQueue := C.govpp_get_tx_queue_details(&cDetails, C.int(i))
		queueDetails := MemifQueueDetails{
			QueueID:    uint8(cTxQueue.qid),
			RingSize:   uint32(cTxQueue.ring_size),
			BufferSize: uint16(cTxQueue.buffer_size),
		}
		details.TxQueues = append(details.TxQueues, queueDetails)
	}

	return details, nil
}