- use Must func when possible.
This commit is contained in:
15
platform/elmapi/order.go
Normal file
15
platform/elmapi/order.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package elmapi
|
||||
|
||||
type ELMOrderInfo map[string]interface{}
|
||||
|
||||
func (e *ELMAPI) GetOrder(orderId string) (ELMOrderInfo, error) {
|
||||
result, err := e.AccessELM("eleme.order.getOrder", map[string]interface{}{
|
||||
"orderId": orderId,
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
innerResult := ELMOrderInfo(result.Result.(map[string]interface{}))
|
||||
return innerResult, nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
Reference in New Issue
Block a user