Class: Spaceship::Tunes::SandboxTester
- Defined in:
- lib/spaceship/tunes/tester.rb
App 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
App 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.
211 212 213 |
# File 'lib/spaceship/tunes/tester.rb', line 211 def country @country end |
#email ⇒ String
Returns The email of this tester.
196 197 198 |
# File 'lib/spaceship/tunes/tester.rb', line 196 def email @email end |
#first_name ⇒ String
Returns The first name of this tester.
201 202 203 |
# File 'lib/spaceship/tunes/tester.rb', line 201 def first_name @first_name end |
#last_name ⇒ String
Returns The last name of this tester.
206 207 208 |
# File 'lib/spaceship/tunes/tester.rb', line 206 def last_name @last_name end |
Class Method Details
.all ⇒ Object
228 229 230 |
# File 'lib/spaceship/tunes/tester.rb', line 228 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
232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/spaceship/tunes/tester.rb', line 232 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
244 245 246 |
# File 'lib/spaceship/tunes/tester.rb', line 244 def self.delete!(emails) client.delete_sandbox_testers!(self, emails) end |
.delete_all! ⇒ Object
248 249 250 |
# File 'lib/spaceship/tunes/tester.rb', line 248 def self.delete_all! delete!(self.all.map(&:email)) end |
.url ⇒ Object
220 221 222 223 224 225 226 |
# File 'lib/spaceship/tunes/tester.rb', line 220 def self.url { index: "ra/users/iap", create: "ra/users/iap/add", delete: "ra/users/iap/delete" } end |