Class: Zanox::ProgramApplication
- Defined in:
- lib/zanox/resources/program_application.rb
Instance Attribute Summary collapse
-
#adspace ⇒ Object
readonly
Returns the value of attribute adspace.
-
#allow_tpv ⇒ Object
readonly
Returns the value of attribute allow_tpv.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#program ⇒ Object
readonly
Returns the value of attribute program.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ ProgramApplication
constructor
-
pid (Integer) ProgramApplication ID - program (Hash) Infos about the program (activation status, id and name) - adspace (Hash) Infos about the adspace (id and name) - status (String) The status of the program (open, confirmed, rejected, deferred, waiting, blocked, terminated, canceled, called, declined, deleted) - allow_tpv (Boolean).
-
Methods included from Hashable
Constructor Details
#initialize(data) ⇒ ProgramApplication
-
pid (Integer) ProgramApplication ID
-
program (Hash) Infos about the program (activation status, id and name)
-
adspace (Hash) Infos about the adspace (id and name)
-
status (String) The status of the program (open, confirmed, rejected, deferred, waiting, blocked, terminated, canceled, called, declined, deleted)
-
allow_tpv (Boolean)
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/zanox/resources/program_application.rb', line 36 def initialize(data) @pid = data['@id'].to_i @program = { active: data['program']['@active'] == 'true', id: data['program']['@id'].to_i, name: data['program']['$'] } @adspace = { id: data['adspace']['@id'], name: data['adspace']['$'] } @status = data['status'] @allow_tpv = data['allowTpv'] end |
Instance Attribute Details
#adspace ⇒ Object (readonly)
Returns the value of attribute adspace.
27 28 29 |
# File 'lib/zanox/resources/program_application.rb', line 27 def adspace @adspace end |
#allow_tpv ⇒ Object (readonly)
Returns the value of attribute allow_tpv.
27 28 29 |
# File 'lib/zanox/resources/program_application.rb', line 27 def allow_tpv @allow_tpv end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
27 28 29 |
# File 'lib/zanox/resources/program_application.rb', line 27 def pid @pid end |
#program ⇒ Object (readonly)
Returns the value of attribute program.
27 28 29 |
# File 'lib/zanox/resources/program_application.rb', line 27 def program @program end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
27 28 29 |
# File 'lib/zanox/resources/program_application.rb', line 27 def status @status end |