-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_offering.go
47 lines (42 loc) · 1.7 KB
/
get_offering.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package transactapi
import (
"net/http"
)
type GetOfferingRequest struct {
ClientID string `json:"clientID"`
DeveloperApiKey string `json:"developerAPIKey"`
OfferingID string `json:"offeringId"`
}
type GetOfferingResponse struct {
StatusCode string `json:"statusCode"`
StatusDesc string `json:"statusDesc"`
OfferingDetails []offeringDetail `json:"offeringDetails"`
}
type offeringDetail struct {
IssuerID string `json:"issuerId"`
OfferingID string `json:"offeringId"`
IssueName string `json:"issueName"`
IssueType string `json:"issueType"`
TargetAmount string `json:"targetAmount"`
MinAmount string `json:"minAmount"`
MaxAmount string `json:"maxAmount"`
UnitPrice string `json:"unitPrice"`
TotalShares string `json:"totalShares"`
RemainingShares string `json:"remainingShares"`
StartDate string `json:"startDate"`
EndDate string `json:"endDate"`
OfferingStatus string `json:"offeringStatus"`
OfferingText string `json:"offeringText"`
StampingText string `json:"stampingText"`
EscrowAccountNumber string `json:"escrowAccountNumber"`
Field1 string `json:"field1"`
Field2 string `json:"field2"`
Field3 string `json:"field3"`
}
// This method is used to get all the details of an offering. The Offering ID is required to get
// the information.
//
// Reference: https://transactapi.readme.io/reference/getoffering
func (c *Client) GetOffering(req *GetOfferingRequest) (*GetOfferingResponse, error) {
return request[GetOfferingRequest, GetOfferingResponse](c, http.MethodPost, EndpointGetOffering, req)
}