Class: Vpago::TrueMoney::RefundIssuer
- Inherits:
-
Base
- Object
- Base
- Vpago::TrueMoney::RefundIssuer
show all
- Defined in:
- lib/vpago/true_money/refund_issuer.rb
Constant Summary
Constants inherited
from Base
Base::CONTENT_TYPE_JSON, Base::DEFAULT_ALGORITHM, Base::DEFAULT_KEY_VERSION, Base::TOKEN_HEADERS
Instance Method Summary
collapse
Methods inherited from Base
#access_token, #access_token_url, #algorithm, #amount, #android_package_name, #check_transaction_url, #client_id, #client_secret, #currency, #default_headers, #external_ref_id, #fetch_access_token, #generate_payment_url, #initialize, #jwt_payload, #key_version, #order, #order_jwt_token, #parse_json, #payment_method, #private_key, #query_string, #redirect_type, #refund_url, #return_deeplink, #return_url_scheme, #service_type, #signature, #signature_input, #timestamp, #user_type
Instance Method Details
#call ⇒ Object
4
5
6
|
# File 'lib/vpago/true_money/refund_issuer.rb', line 4
def call
@response = Faraday.post(refund_url, payload.to_json, )
end
|
#parsed_response ⇒ Object
16
17
18
|
# File 'lib/vpago/true_money/refund_issuer.rb', line 16
def parsed_response
@parsed_response ||= parse_json(@response.body)
end
|
#payload ⇒ Object
12
13
14
|
# File 'lib/vpago/true_money/refund_issuer.rb', line 12
def payload
{ external_ref_id: external_ref_id }
end
|
#success? ⇒ Boolean
8
9
10
|
# File 'lib/vpago/true_money/refund_issuer.rb', line 8
def success?
parsed_response.dig('status', 'code') == '000001'
end
|