Class: GoogleWallet::Resources::EventTicket::Class
- Defined in:
- lib/google_wallet/resources/event_ticket/class.rb
Instance Attribute Summary collapse
-
#callback_url ⇒ Object
readonly
Returns the value of attribute callback_url.
-
#class_identifier ⇒ Object
readonly
Returns the value of attribute class_identifier.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#end_date_time ⇒ Object
readonly
Returns the value of attribute end_date_time.
-
#event_id ⇒ Object
readonly
Returns the value of attribute event_id.
-
#event_name ⇒ Object
readonly
Returns the value of attribute event_name.
-
#hero_image_url ⇒ Object
readonly
Returns the value of attribute hero_image_url.
-
#hex_background_color ⇒ Object
readonly
Returns the value of attribute hex_background_color.
-
#homepage_url ⇒ Object
readonly
Returns the value of attribute homepage_url.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issuer_name ⇒ Object
readonly
Returns the value of attribute issuer_name.
-
#logo_url ⇒ Object
readonly
Returns the value of attribute logo_url.
-
#start_date_time ⇒ Object
readonly
Returns the value of attribute start_date_time.
-
#venue_address ⇒ Object
readonly
Returns the value of attribute venue_address.
-
#venue_name ⇒ Object
readonly
Returns the value of attribute venue_name.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(attributes: {}, options: {}) ⇒ Class
constructor
A new instance of Class.
- #payload_key ⇒ Object
- #push ⇒ Object
- #sign(push_resource: true) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(attributes: {}, options: {}) ⇒ Class
Returns a new instance of Class.
30 31 32 33 34 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 30 def initialize(attributes: {}, options: {}) super validate_fields( %w[class_identifier event_name issuer_name]) @id = "#{GoogleWallet.configuration.issuer_id}.#{@class_identifier}" end |
Instance Attribute Details
#callback_url ⇒ Object (readonly)
Returns the value of attribute callback_url.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def callback_url @callback_url end |
#class_identifier ⇒ Object (readonly)
Returns the value of attribute class_identifier.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def class_identifier @class_identifier end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def country_code @country_code end |
#end_date_time ⇒ Object (readonly)
Returns the value of attribute end_date_time.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def end_date_time @end_date_time end |
#event_id ⇒ Object (readonly)
Returns the value of attribute event_id.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def event_id @event_id end |
#event_name ⇒ Object (readonly)
Returns the value of attribute event_name.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def event_name @event_name end |
#hero_image_url ⇒ Object (readonly)
Returns the value of attribute hero_image_url.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def hero_image_url @hero_image_url end |
#hex_background_color ⇒ Object (readonly)
Returns the value of attribute hex_background_color.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def hex_background_color @hex_background_color end |
#homepage_url ⇒ Object (readonly)
Returns the value of attribute homepage_url.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def homepage_url @homepage_url end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def id @id end |
#issuer_name ⇒ Object (readonly)
Returns the value of attribute issuer_name.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def issuer_name @issuer_name end |
#logo_url ⇒ Object (readonly)
Returns the value of attribute logo_url.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def logo_url @logo_url end |
#start_date_time ⇒ Object (readonly)
Returns the value of attribute start_date_time.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def start_date_time @start_date_time end |
#venue_address ⇒ Object (readonly)
Returns the value of attribute venue_address.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def venue_address @venue_address end |
#venue_name ⇒ Object (readonly)
Returns the value of attribute venue_name.
7 8 9 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 7 def venue_name @venue_name end |
Instance Method Details
#payload_key ⇒ Object
47 48 49 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 47 def payload_key "#{payload_key_logic}Classes" end |
#push ⇒ Object
36 37 38 39 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 36 def push access_token = GoogleWallet::Authentication.new.access_token GoogleWallet::Operations::EventTicket::PushClass.new(resource: self, access_token: access_token).call end |
#sign(push_resource: true) ⇒ Object
41 42 43 44 45 |
# File 'lib/google_wallet/resources/event_ticket/class.rb', line 41 def sign(push_resource: true) raise "Class cannot be signed without Object, use GoogleWallet::Operations::SignObjects.new(...) to create/modify simultaneously classes and objects by following jwt link" end |