Class: Alula::RpcResponse
- Inherits:
-
Object
- Object
- Alula::RpcResponse
- Defined in:
- lib/alula/rpc_response.rb
Direct Known Subclasses
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.
-
#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.
5 6 7 8 |
# File 'lib/alula/rpc_response.rb', line 5 def initialize(response) @request_id = response.data['id'] @result = response.data['result'] end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
3 4 5 |
# File 'lib/alula/rpc_response.rb', line 3 def data @data end |
#request_id ⇒ Object
Returns the value of attribute request_id.
3 4 5 |
# File 'lib/alula/rpc_response.rb', line 3 def request_id @request_id end |
#result ⇒ Object
Returns the value of attribute result.
3 4 5 |
# File 'lib/alula/rpc_response.rb', line 3 def result @result end |
Instance Method Details
#ok? ⇒ Boolean
10 11 12 |
# File 'lib/alula/rpc_response.rb', line 10 def ok? @result['success'] == true || (@result['errors'].nil? && @result['error'].nil?) end |