Module: Itunes
- Defined in:
- lib/itunes.rb,
lib/itunes/receipt.rb
Defined Under Namespace
Classes: Receipt
Constant Summary collapse
- ENDPOINT =
{ :production => 'https://buy.itunes.apple.com/verifyReceipt', :sandbox => 'https://sandbox.itunes.apple.com/verifyReceipt' }
Class Method Summary collapse
- .endpoint ⇒ Object
- .itunes_env ⇒ Object
- .sandbox! ⇒ Object
- .sandbox=(boolean) ⇒ Object
- .sandbox? ⇒ Boolean
- .shared_secret ⇒ Object
- .shared_secret=(shared_secret) ⇒ Object
Class Method Details
.endpoint ⇒ Object
12 13 14 |
# File 'lib/itunes.rb', line 12 def self.endpoint ENDPOINT[itunes_env] end |
.itunes_env ⇒ Object
16 17 18 |
# File 'lib/itunes.rb', line 16 def self.itunes_env sandbox? ? :sandbox : :production end |
.sandbox! ⇒ Object
23 24 25 |
# File 'lib/itunes.rb', line 23 def self.sandbox! self.sandbox = true end |
.sandbox=(boolean) ⇒ Object
26 27 28 |
# File 'lib/itunes.rb', line 26 def self.sandbox=(boolean) @@sandbox = boolean end |
.sandbox? ⇒ Boolean
20 21 22 |
# File 'lib/itunes.rb', line 20 def self.sandbox? @@sandbox end |
.shared_secret ⇒ Object
31 32 33 |
# File 'lib/itunes.rb', line 31 def self.shared_secret @@shared_secret end |
.shared_secret=(shared_secret) ⇒ Object
34 35 36 |
# File 'lib/itunes.rb', line 34 def self.shared_secret=(shared_secret) @@shared_secret = shared_secret end |