Class: CandyCheck::PlayStore::Acknowledger

Inherits:
Object
  • Object
show all
Defined in:
lib/candy_check/play_store/acknowledger.rb

Instance Method Summary collapse

Constructor Details

#initialize(authorization:) ⇒ Acknowledger

Returns a new instance of Acknowledger.



4
5
6
# File 'lib/candy_check/play_store/acknowledger.rb', line 4

def initialize(authorization:)
  @authorization = authorization
end

Instance Method Details

#acknowledge_product_purchase(package_name:, product_id:, token:) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/candy_check/play_store/acknowledger.rb', line 8

def acknowledge_product_purchase(package_name:, product_id:, token:)
  acknowledger = CandyCheck::PlayStore::ProductAcknowledgements::Acknowledgement.new(
    package_name: package_name,
    product_id: product_id,
    token: token,
    authorization: @authorization,
  )
  acknowledger.call!
end