Class: Spaceship::Tunes::SandboxTester
- Defined in:
- lib/spaceship/tunes/tester.rb
Helpers collapse
-
#country ⇒ String
The two-letter country code of this tester.
-
#email ⇒ String
The email of this tester.
-
#first_name ⇒ String
The first name of this tester.
-
#last_name ⇒ String
The last name of this tester.
Attributes inherited from Base
Helpers collapse
- .all ⇒ Object
- .create!(email: nil, password: nil, first_name: 'Test', last_name: 'Test', country: 'US') ⇒ Object
- .delete!(emails) ⇒ Object
- .delete_all! ⇒ Object
- .url ⇒ Object
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, #attributes, attributes, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#country ⇒ String
Returns The two-letter country code of this tester.
241 242 243 |
# File 'lib/spaceship/tunes/tester.rb', line 241 def country @country end |
#email ⇒ String
Returns The email of this tester.
226 227 228 |
# File 'lib/spaceship/tunes/tester.rb', line 226 def email @email end |
#first_name ⇒ String
Returns The first name of this tester.
231 232 233 |
# File 'lib/spaceship/tunes/tester.rb', line 231 def first_name @first_name end |
#last_name ⇒ String
Returns The last name of this tester.
236 237 238 |
# File 'lib/spaceship/tunes/tester.rb', line 236 def last_name @last_name end |
Class Method Details
.all ⇒ Object
258 259 260 |
# File 'lib/spaceship/tunes/tester.rb', line 258 def self.all client.sandbox_testers(self).map { |tester| self.new(tester) } end |
.create!(email: nil, password: nil, first_name: 'Test', last_name: 'Test', country: 'US') ⇒ Object
262 263 264 265 266 267 268 269 270 271 272 |
# File 'lib/spaceship/tunes/tester.rb', line 262 def self.create!(email: nil, password: nil, first_name: 'Test', last_name: 'Test', country: 'US') data = client.create_sandbox_tester!( tester_class: self, email: email, password: password, first_name: first_name, last_name: last_name, country: country ) self.new(data) end |
.delete!(emails) ⇒ Object
274 275 276 |
# File 'lib/spaceship/tunes/tester.rb', line 274 def self.delete!(emails) client.delete_sandbox_testers!(self, emails) end |
.delete_all! ⇒ Object
278 279 280 |
# File 'lib/spaceship/tunes/tester.rb', line 278 def self.delete_all! delete!(self.all.map(&:email)) end |
.url ⇒ Object
250 251 252 253 254 255 256 |
# File 'lib/spaceship/tunes/tester.rb', line 250 def self.url { index: "ra/users/iap", create: "ra/users/iap/add", delete: "ra/users/iap/delete" } end |