Sha256: 7158f16c09343c93410be9b10317eb9e37ac7a6efd1fc62c27b046119da91418
Contents?: true
Size: 457 Bytes
Versions: 3
Compression:
Stored size: 457 Bytes
Contents
module GarnetClient class Result attr_accessor :raw, :msg RESULT_SUCCESS_FLAG = '0' # TX 状态 LV_TX_STATE = { '1' => '成功', '0' => '失败', '2' => 'Pending' } def initialize(result) self.raw = result.to_s self.msg = result end def success? @msg[0]['status']['code'] == RESULT_SUCCESS_FLAG end def service_msg @msg[0]['status']['message'] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
garnet_client-0.1.5 | lib/garnet_client/result.rb |
garnet_client-0.1.4 | lib/garnet_client/result.rb |
garnet_client-0.1.3 | lib/garnet_client/result.rb |