Class: Spaceship::ConnectAPI::SandboxTester

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb

Instance Attribute Summary collapse

Attributes included from Model

#id, #reverse_attr_map

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes

Instance Attribute Details

#app_store_territoryObject

Returns the value of attribute app_store_territory.



15
16
17
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 15

def app_store_territory
  @app_store_territory
end

#apple_pay_compatibleObject

Returns the value of attribute apple_pay_compatible.



16
17
18
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 16

def apple_pay_compatible
  @apple_pay_compatible
end

#birth_dateObject

1980-03-01



14
15
16
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 14

def birth_date
  @birth_date
end

#confirm_passwordObject

Returns the value of attribute confirm_password.



11
12
13
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 11

def confirm_password
  @confirm_password
end

#emailObject

Returns the value of attribute email.



9
10
11
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 9

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name.



7
8
9
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 7

def first_name
  @first_name
end

#last_nameObject

Returns the value of attribute last_name.



8
9
10
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 8

def last_name
  @last_name
end

#passwordObject

Returns the value of attribute password.



10
11
12
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 10

def password
  @password
end

#secret_answerObject

Returns the value of attribute secret_answer.



13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 13

def secret_answer
  @secret_answer
end

#secret_questionObject

Returns the value of attribute secret_question.



12
13
14
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 12

def secret_question
  @secret_question
end

Class Method Details

.all(client: nil, filter: {}, includes: nil, limit: 2000, sort: nil) ⇒ Object

API



39
40
41
42
43
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 39

def self.all(client: nil, filter: {}, includes: nil, limit: 2000, sort: nil)
  client ||= Spaceship::ConnectAPI
  resps = client.get_sandbox_testers(filter: filter, includes: includes).all_pages
  return resps.flat_map(&:to_models)
end

.create(client: nil, first_name: nil, last_name: nil, email: nil, password: nil, confirm_password: nil, secret_question: nil, secret_answer: nil, birth_date: nil, app_store_territory: nil) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 45

def self.create(client: nil, first_name: nil, last_name: nil, email: nil, password: nil, confirm_password: nil, secret_question: nil, secret_answer: nil, birth_date: nil, app_store_territory: nil)
  client ||= Spaceship::ConnectAPI
  attributes = {
    firstName: first_name,
    lastName: last_name,
    email: email,
    password: password,
    confirmPassword: confirm_password,
    secretQuestion: secret_question,
    secretAnswer: secret_answer,
    birthDate: birth_date,
    appStoreTerritory: app_store_territory
  }
  return client.post_sandbox_tester(attributes: attributes).first
end

.typeObject



31
32
33
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 31

def self.type
  return "sandboxTesters"
end

Instance Method Details

#delete!(client: nil) ⇒ Object



61
62
63
64
# File 'spaceship/lib/spaceship/connect_api/models/sandbox_tester.rb', line 61

def delete!(client: nil)
  client ||= Spaceship::ConnectAPI
  client.delete_sandbox_tester(sandbox_tester_id: id)
end