Add the carbon api (#351)

This commit is contained in:
Asim Aslam
2022-01-07 11:55:41 +00:00
committed by GitHub
parent a093abaf5e
commit f505d4b857
15 changed files with 650 additions and 2 deletions

21
carbon/domain/domain.go Normal file
View File

@@ -0,0 +1,21 @@
package domain
type Project struct {
Name string `json:"name"`
Percentage float64 `json:"splitPercentage"`
Tonnes float64 `json:"splitAmountTonnes"`
}
type OffsetRequest struct {
Number int32 `json:"number"`
Units string `json:"units"`
}
type OffsetResponse struct {
Number int32 `json:"number"`
Units string `json:"units"`
Tonnes float64 `json:"numberInTonnes"`
Amount float64 `json:"amount"`
Currency string `json:"currency"`
Projects []Project `json:"projectDetails"`
}