Class: TicketSharing::Agreement
- Defined in:
- lib/ticket_sharing/agreement.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
- #authentication_token ⇒ Object
- #relative_url ⇒ Object
- #send_to(url) ⇒ Object
- #update_partner(url) ⇒ Object
Methods inherited from Base
#as_json, field_list, #field_list, fields, first_ancestor, #initialize, #to_json
Constructor Details
This class inherits a constructor from TicketSharing::Base
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
11 12 13 |
# File 'lib/ticket_sharing/agreement.rb', line 11 def response @response end |
Class Method Details
.parse(json) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ticket_sharing/agreement.rb', line 13 def self.parse(json) attributes = JsonSupport.decode(json) agreement = new(attributes) if agreement.current_actor agreement.current_actor = TicketSharing::Actor.new(agreement.current_actor) end agreement end |
Instance Method Details
#authentication_token ⇒ Object
40 41 42 |
# File 'lib/ticket_sharing/agreement.rb', line 40 def authentication_token "#{uuid}:#{access_key}" end |
#relative_url ⇒ Object
36 37 38 |
# File 'lib/ticket_sharing/agreement.rb', line 36 def relative_url '/agreements/' + uuid.to_s end |