Class: Spaceship::Tunes::AppVersionGeneratedPromocodes
- Defined in:
- lib/spaceship/tunes/app_version_generated_promocodes.rb
Overview
Represents the information about the generation of promocodes
Instance Attribute Summary collapse
-
#codes ⇒ Object
readonly
Array of String.
- #effective_date ⇒ Object readonly
-
#expiration_date ⇒ Object
readonly
Returns the value of attribute expiration_date.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
-
#version ⇒ Object
readonly
the AppVersionPromocodes this relates to.
Attributes inherited from Base
Class Method Summary collapse
-
.factory(attrs) ⇒ Object
Create a new object based on a hash.
Instance Method Summary collapse
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, #attributes, attributes, #initialize, #inspect, mapping_module, method_missing, set_client, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#codes ⇒ Object (readonly)
Array of String
12 13 14 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 12 def codes @codes end |
#effective_date ⇒ Object (readonly)
6 7 8 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 6 def effective_date @effective_date end |
#expiration_date ⇒ Object (readonly)
Returns the value of attribute expiration_date.
7 8 9 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 7 def expiration_date @expiration_date end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
8 9 10 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 8 def username @username end |
#version ⇒ Object (readonly)
the AppVersionPromocodes this relates to
10 11 12 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 10 def version @version end |
Class Method Details
.factory(attrs) ⇒ Object
Create a new object based on a hash. This is used to create a new object based on the server response.
23 24 25 26 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 23 def factory(attrs) obj = self.new(attrs) return obj end |
Instance Method Details
#setup ⇒ Object
29 30 31 32 |
# File 'lib/spaceship/tunes/app_version_generated_promocodes.rb', line 29 def setup @version = Tunes::AppVersionPromocodes.factory(raw_data['version']) @codes = raw_data['codes'] end |