Class: CandyCheck::PlayStore::ProductAcknowledgements::Response
- Inherits:
-
Object
- Object
- CandyCheck::PlayStore::ProductAcknowledgements::Response
- Defined in:
- lib/candy_check/play_store/product_acknowledgements/response.rb
Instance Attribute Summary collapse
-
#error_data ⇒ Object
readonly
Returns the value of attribute error_data.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #acknowledged? ⇒ Boolean
- #error ⇒ Object
-
#initialize(result:, error_data:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(result:, error_data:) ⇒ Response
Returns a new instance of Response.
5 6 7 8 |
# File 'lib/candy_check/play_store/product_acknowledgements/response.rb', line 5 def initialize(result:, error_data:) @result = result @error_data = error_data end |
Instance Attribute Details
#error_data ⇒ Object (readonly)
Returns the value of attribute error_data.
20 21 22 |
# File 'lib/candy_check/play_store/product_acknowledgements/response.rb', line 20 def error_data @error_data end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
20 21 22 |
# File 'lib/candy_check/play_store/product_acknowledgements/response.rb', line 20 def result @result end |
Instance Method Details
#acknowledged? ⇒ Boolean
10 11 12 |
# File 'lib/candy_check/play_store/product_acknowledgements/response.rb', line 10 def acknowledged? !!result end |
#error ⇒ Object
14 15 16 17 18 |
# File 'lib/candy_check/play_store/product_acknowledgements/response.rb', line 14 def error return unless error_data { status_code: error_data.status_code, body: error_data.body } end |