Class: Alula::RpcResponse
- Inherits:
-
Object
- Object
- Alula::RpcResponse
- Defined in:
- lib/alula/rpc_response.rb
Direct Known Subclasses
CameraGetChimeInfoProc::Response, CameraGetFirmwareVersionProc::Response, CameraGetInfoProc::Response, CameraGetRecordingConfigProc::Response, CameraGetSdStatusProc::Response, CameraGetServerConfigProc::Response, CameraGetStatsProc::Response, CameraGetWifiProc::Response, CameraSetRecordingConfigProc::Response, CameraSetServerConfigProc::Response, DealerDeviceStatsProc::Response, DealerRestoreProc::Response, DealerSuspendProc::Response, DeviceAssignProc::Response, DeviceCellularHistoryProc::Response, DeviceProgramsRenewProc::Response, DeviceRatePlanGetProc::Response, DeviceRegisterProc::Response, DeviceSignalAddProc::Response, DeviceSignalDeliveredProc::Response, DeviceSignalUpdateProc::Response, DeviceUnassignProc::Response, DeviceUnregisterProc::Response, FeaturePlanCloneProc::Response, UploadTouchpadBrandingProc::Response, UserGetLockedProc::Response, UserPasswordResetProc::Response, UserPlansVideoPriceGetProc::Response, UserTransferAccept::Response, UserTransferAuthorize::Response, UserTransferCancel::Response, UserTransferDeny::Response, UserTransferReject::Response, UserTransferRequest::Response, UserUnlockProc::Response, VideoUnregisterProc::Response
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#http_status ⇒ Object
Returns the value of attribute http_status.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(response) ⇒ RpcResponse
constructor
A new instance of RpcResponse.
- #ok? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ RpcResponse
Returns a new instance of RpcResponse.
7 8 9 10 11 |
# File 'lib/alula/rpc_response.rb', line 7 def initialize(response) @request_id = response.data['id'] @result = response.data['result'] @http_status = response.data['http_status'] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/alula/rpc_response.rb', line 5 def data @data end |
#http_status ⇒ Object
Returns the value of attribute http_status.
5 6 7 |
# File 'lib/alula/rpc_response.rb', line 5 def http_status @http_status end |
#request_id ⇒ Object
Returns the value of attribute request_id.
5 6 7 |
# File 'lib/alula/rpc_response.rb', line 5 def request_id @request_id end |
#result ⇒ Object
Returns the value of attribute result.
5 6 7 |
# File 'lib/alula/rpc_response.rb', line 5 def result @result end |
Instance Method Details
#ok? ⇒ Boolean
13 14 15 |
# File 'lib/alula/rpc_response.rb', line 13 def ok? @result['success'] == true || (@result['errors'].nil? && @result['error'].nil?) end |