Class: Unit::AuthorizationRequest::ApproveRequest
- Inherits:
-
Object
- Object
- Unit::AuthorizationRequest::ApproveRequest
- Defined in:
- lib/unit/models/authorization_request/approve_request.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#authorization_request_id ⇒ Object
readonly
Returns the value of attribute authorization_request_id.
-
#funding_account ⇒ Object
readonly
Returns the value of attribute funding_account.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(authorization_request_id, amount = nil, funding_account = nil, tags = nil) ⇒ ApproveRequest
constructor
A new instance of ApproveRequest.
- #to_json_api ⇒ Object
Constructor Details
#initialize(authorization_request_id, amount = nil, funding_account = nil, tags = nil) ⇒ ApproveRequest
Returns a new instance of ApproveRequest.
14 15 16 17 18 19 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 14 def initialize(, amount = nil, funding_account = nil, = nil) @authorization_request_id = @amount = amount @funding_account = funding_account @tags = end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
8 9 10 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 8 def amount @amount end |
#authorization_request_id ⇒ Object (readonly)
Returns the value of attribute authorization_request_id.
8 9 10 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 8 def @authorization_request_id end |
#funding_account ⇒ Object (readonly)
Returns the value of attribute funding_account.
8 9 10 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 8 def funding_account @funding_account end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
8 9 10 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 8 def @tags end |
Instance Method Details
#to_json_api ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/unit/models/authorization_request/approve_request.rb', line 21 def to_json_api payload = { data: { type: "approveAuthorizationRequest", attributes: { amount: amount, fundingAccount: funding_account, tags: } } } payload[:data][:attributes].compact! payload.to_json end |