Class: ThreeScale::AuthorizeResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/3scale/authorize_response.rb

Defined Under Namespace

Classes: UsageReport

Instance Attribute Summary collapse

Attributes inherited from Response

#error_code, #error_message

Instance Method Summary collapse

Methods inherited from Response

#error!, #success!, #success?

Constructor Details

#initializeAuthorizeResponse

Returns a new instance of AuthorizeResponse.



5
6
7
8
# File 'lib/3scale/authorize_response.rb', line 5

def initialize
  super
  @usage_reports = []
end

Instance Attribute Details

#app_keyObject

Returns the value of attribute app_key.



11
12
13
# File 'lib/3scale/authorize_response.rb', line 11

def app_key
  @app_key
end

#planObject

Returns the value of attribute plan.



10
11
12
# File 'lib/3scale/authorize_response.rb', line 10

def plan
  @plan
end

#redirect_urlObject

Returns the value of attribute redirect_url.



12
13
14
# File 'lib/3scale/authorize_response.rb', line 12

def redirect_url
  @redirect_url
end

#service_idObject

Returns the value of attribute service_id.



13
14
15
# File 'lib/3scale/authorize_response.rb', line 13

def service_id
  @service_id
end

#usage_reportsObject (readonly)

Returns the value of attribute usage_reports.



40
41
42
# File 'lib/3scale/authorize_response.rb', line 40

def usage_reports
  @usage_reports
end

Instance Method Details

#add_usage_report(options) ⇒ Object



42
43
44
# File 'lib/3scale/authorize_response.rb', line 42

def add_usage_report(options)
  @usage_reports << UsageReport.new(options)
end