| Total Lines | 21 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | package campay  | 
            ||
| 2 | |||
| 3 | // Transaction contains details of an initiated transaction  | 
            ||
| 4 | type Transaction struct { | 
            ||
| 5 | Reference string `json:"reference"`  | 
            ||
| 6 | Status string `json:"status"`  | 
            ||
| 7 | Amount float64 `json:"amount"`  | 
            ||
| 8 | Currency string `json:"currency"`  | 
            ||
| 9 | Operator string `json:"operator"`  | 
            ||
| 10 | Code string `json:"code"`  | 
            ||
| 11 | OperatorReference string `json:"operator_reference"`  | 
            ||
| 12 | }  | 
            ||
| 13 | |||
| 14 | // IsPending checks if a transaction is pending  | 
            ||
| 15 | func (transaction *Transaction) IsPending() bool { | 
            ||
| 16 | return transaction.Status == "PENDING"  | 
            ||
| 17 | }  | 
            ||
| 18 | |||
| 19 | // IsSuccessfull checks if a transaction is successfull  | 
            ||
| 20 | func (transaction *Transaction) IsSuccessfull() bool { | 
            ||
| 21 | return transaction.Status == "SUCCESSFUL"  | 
            ||
| 22 | }  | 
            ||
| 23 |