Class: Unit::AuthorizationRequest::DeclineRequest
- Inherits:
-
Object
- Object
- Unit::AuthorizationRequest::DeclineRequest
- Defined in:
- lib/unit/models/authorization_request/decline_request.rb
Instance Attribute Summary collapse
-
#authorization_request_id ⇒ Object
readonly
Returns the value of attribute authorization_request_id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(authorization_request_id, reason) ⇒ DeclineRequest
constructor
A new instance of DeclineRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(authorization_request_id, reason) ⇒ DeclineRequest
Returns a new instance of DeclineRequest.
12 13 14 15 |
# File 'lib/unit/models/authorization_request/decline_request.rb', line 12 def initialize(, reason) @authorization_request_id = @reason = reason end |
Instance Attribute Details
#authorization_request_id ⇒ Object (readonly)
Returns the value of attribute authorization_request_id.
8 9 10 |
# File 'lib/unit/models/authorization_request/decline_request.rb', line 8 def @authorization_request_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
8 9 10 |
# File 'lib/unit/models/authorization_request/decline_request.rb', line 8 def reason @reason end |
Instance Method Details
#to_json_api ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/unit/models/authorization_request/decline_request.rb', line 17 def to_json_api payload = { data: { type: "declineAuthorizationRequest", attributes: { reason: reason } } } payload[:data][:attributes].compact! payload.to_json end |