Class: CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement
- Inherits:
-
Object
- Object
- CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement
- Defined in:
- lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb
Overview
Verifies a purchase token against the PlayStore API
Instance Attribute Summary collapse
-
#package_name ⇒ String
readonly
The package_name which will be queried.
-
#product_id ⇒ String
readonly
The item id which will be queried.
-
#token ⇒ String
readonly
The token for authentication.
Instance Method Summary collapse
- #call! ⇒ Object
-
#initialize(package_name:, product_id:, token:, authorization:) ⇒ Acknowledgement
constructor
Initializes a new call to the API.
Constructor Details
#initialize(package_name:, product_id:, token:, authorization:) ⇒ Acknowledgement
Initializes a new call to the API
18 19 20 21 22 23 |
# File 'lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb', line 18 def initialize(package_name:, product_id:, token:, authorization:) @package_name = package_name @product_id = product_id @token = token @authorization = end |
Instance Attribute Details
#package_name ⇒ String (readonly)
Returns the package_name which will be queried.
8 9 10 |
# File 'lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb', line 8 def package_name @package_name end |
#product_id ⇒ String (readonly)
Returns the item id which will be queried.
10 11 12 |
# File 'lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb', line 10 def product_id @product_id end |
#token ⇒ String (readonly)
Returns the token for authentication.
12 13 14 |
# File 'lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb', line 12 def token @token end |
Instance Method Details
#call! ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/candy_check/play_store/product_acknowledgements/acknowledgement.rb', line 25 def call! acknowledge! CandyCheck::PlayStore::ProductAcknowledgements::Response.new( result: @response[:result], error_data: @response[:error_data], ) end |