payzu-pix 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +231 -0
- data/Rakefile +10 -0
- data/docs/AccountApi.md +141 -0
- data/docs/ApiErrorDetailsInner.md +20 -0
- data/docs/BankStatement.md +42 -0
- data/docs/BankStatementListResponse.md +20 -0
- data/docs/BankStatementListResponsePagination.md +22 -0
- data/docs/CallbackDetail.md +34 -0
- data/docs/CallbackListResponse.md +20 -0
- data/docs/CallbackListResponsePagination.md +22 -0
- data/docs/CallbackSecretResponse.md +20 -0
- data/docs/CallbacksApi.md +587 -0
- data/docs/Defense.md +30 -0
- data/docs/DefenseFilesInner.md +24 -0
- data/docs/DefenseHistoryEntry.md +28 -0
- data/docs/DefenseHistoryEntryFilesInner.md +22 -0
- data/docs/DepositPending.md +62 -0
- data/docs/DepositPendingListResponse.md +24 -0
- data/docs/DictConsultResponse.md +30 -0
- data/docs/DownloadUserReport200Response.md +20 -0
- data/docs/EnqueuedCallback.md +18 -0
- data/docs/EnqueuedCallbackEnqueued.md +22 -0
- data/docs/EnqueuedCallbackItem.md +22 -0
- data/docs/ErrorResponse.md +32 -0
- data/docs/GetUser200Response.md +46 -0
- data/docs/GetUser200ResponseDailyWithdrawLimit.md +24 -0
- data/docs/GetUser200ResponseServiceFee.md +28 -0
- data/docs/GetUserBalance200Response.md +20 -0
- data/docs/GetUserTransactionById200Response.md +94 -0
- data/docs/GetUserTransactionById200ResponseAllOfCallbackLogInner.md +26 -0
- data/docs/GetUserTransactionById200ResponseAllOfInfractionInner.md +24 -0
- data/docs/GetUserTransactions200Response.md +22 -0
- data/docs/InfractionDetail.md +40 -0
- data/docs/InfractionDetailTransaction.md +30 -0
- data/docs/InfractionListResponse.md +20 -0
- data/docs/InfractionListResponsePagination.md +24 -0
- data/docs/InfractionsApi.md +413 -0
- data/docs/InternalTransferApi.md +153 -0
- data/docs/KeysAndDICTApi.md +217 -0
- data/docs/ListUserReports200Response.md +22 -0
- data/docs/PixKeyInfo.md +36 -0
- data/docs/PixOperationsApi.md +299 -0
- data/docs/PostInternalTransferRequest.md +30 -0
- data/docs/PostPixQrcodeReadRequest.md +18 -0
- data/docs/PostPixRequest.md +32 -0
- data/docs/PostUserReportRequest.md +24 -0
- data/docs/PostWithdrawQrcodeRequest.md +28 -0
- data/docs/PostWithdrawRequest.md +30 -0
- data/docs/ProofResponse.md +18 -0
- data/docs/QRCodeReadResponse.md +38 -0
- data/docs/Refund.md +34 -0
- data/docs/RefundRequest.md +22 -0
- data/docs/RefundsApi.md +79 -0
- data/docs/ReportJob.md +30 -0
- data/docs/ReportJobAccepted.md +30 -0
- data/docs/ReportJobDetail.md +30 -0
- data/docs/ReportsApi.md +881 -0
- data/docs/ResendUserCallbackSingle200Response.md +18 -0
- data/docs/ResendUserCallbacks200Response.md +20 -0
- data/docs/ResendUserCallbacksRequest.md +28 -0
- data/docs/ResendWebhookCallbacksRequest.md +30 -0
- data/docs/RotateCallbackSecretResponse.md +18 -0
- data/docs/RotateSecretResponse.md +18 -0
- data/docs/SentWebhookDetail.md +40 -0
- data/docs/SentWebhookDetailResponse.md +18 -0
- data/docs/SentWebhooksQuantity.md +18 -0
- data/docs/Summary.md +26 -0
- data/docs/SummaryBlock.md +24 -0
- data/docs/SummaryBlockGroupedInner.md +20 -0
- data/docs/SummaryBlockStatuses.md +26 -0
- data/docs/SummaryStatus.md +22 -0
- data/docs/Transaction.md +90 -0
- data/docs/TransactionWithRefunds.md +92 -0
- data/docs/Webhook.md +30 -0
- data/docs/WebhookCreateRequest.md +24 -0
- data/docs/WebhookEventType.md +15 -0
- data/docs/WebhookListResponse.md +18 -0
- data/docs/WebhookUpdateRequest.md +22 -0
- data/docs/WebhookWithSecret.md +32 -0
- data/docs/WebhooksApi.md +574 -0
- data/docs/WithdrawalsApi.md +299 -0
- data/git_push.sh +57 -0
- data/lib/payzu-pix/api/account_api.rb +136 -0
- data/lib/payzu-pix/api/callbacks_api.rb +577 -0
- data/lib/payzu-pix/api/infractions_api.rb +452 -0
- data/lib/payzu-pix/api/internal_transfer_api.rb +164 -0
- data/lib/payzu-pix/api/keys_and_dict_api.rb +234 -0
- data/lib/payzu-pix/api/pix_operations_api.rb +300 -0
- data/lib/payzu-pix/api/refunds_api.rb +96 -0
- data/lib/payzu-pix/api/reports_api.rb +968 -0
- data/lib/payzu-pix/api/webhooks_api.rb +542 -0
- data/lib/payzu-pix/api/withdrawals_api.rb +305 -0
- data/lib/payzu-pix/api_client.rb +441 -0
- data/lib/payzu-pix/api_error.rb +58 -0
- data/lib/payzu-pix/api_model_base.rb +88 -0
- data/lib/payzu-pix/configuration.rb +392 -0
- data/lib/payzu-pix/models/api_error_details_inner.rb +192 -0
- data/lib/payzu-pix/models/bank_statement.rb +296 -0
- data/lib/payzu-pix/models/bank_statement_list_response.rb +159 -0
- data/lib/payzu-pix/models/bank_statement_list_response_pagination.rb +169 -0
- data/lib/payzu-pix/models/callback_detail.rb +228 -0
- data/lib/payzu-pix/models/callback_list_response.rb +159 -0
- data/lib/payzu-pix/models/callback_list_response_pagination.rb +169 -0
- data/lib/payzu-pix/models/callback_secret_response.rb +158 -0
- data/lib/payzu-pix/models/defense.rb +234 -0
- data/lib/payzu-pix/models/defense_files_inner.rb +179 -0
- data/lib/payzu-pix/models/defense_history_entry.rb +225 -0
- data/lib/payzu-pix/models/defense_history_entry_files_inner.rb +168 -0
- data/lib/payzu-pix/models/deposit_pending.rb +407 -0
- data/lib/payzu-pix/models/deposit_pending_list_response.rb +180 -0
- data/lib/payzu-pix/models/dict_consult_response.rb +231 -0
- data/lib/payzu-pix/models/download_user_report200_response.rb +158 -0
- data/lib/payzu-pix/models/enqueued_callback.rb +147 -0
- data/lib/payzu-pix/models/enqueued_callback_enqueued.rb +170 -0
- data/lib/payzu-pix/models/enqueued_callback_item.rb +190 -0
- data/lib/payzu-pix/models/error_response.rb +336 -0
- data/lib/payzu-pix/models/get_user200_response.rb +334 -0
- data/lib/payzu-pix/models/get_user200_response_daily_withdraw_limit.rb +180 -0
- data/lib/payzu-pix/models/get_user200_response_service_fee.rb +199 -0
- data/lib/payzu-pix/models/get_user_balance200_response.rb +158 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response.rb +595 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_callback_log_inner.rb +188 -0
- data/lib/payzu-pix/models/get_user_transaction_by_id200_response_all_of_infraction_inner.rb +202 -0
- data/lib/payzu-pix/models/get_user_transactions200_response.rb +170 -0
- data/lib/payzu-pix/models/infraction_detail.rb +293 -0
- data/lib/payzu-pix/models/infraction_detail_transaction.rb +213 -0
- data/lib/payzu-pix/models/infraction_list_response.rb +159 -0
- data/lib/payzu-pix/models/infraction_list_response_pagination.rb +179 -0
- data/lib/payzu-pix/models/list_user_reports200_response.rb +170 -0
- data/lib/payzu-pix/models/pix_key_info.rb +263 -0
- data/lib/payzu-pix/models/post_internal_transfer_request.rb +377 -0
- data/lib/payzu-pix/models/post_pix_qrcode_read_request.rb +174 -0
- data/lib/payzu-pix/models/post_pix_request.rb +382 -0
- data/lib/payzu-pix/models/post_user_report_request.rb +238 -0
- data/lib/payzu-pix/models/post_withdraw_qrcode_request.rb +302 -0
- data/lib/payzu-pix/models/post_withdraw_request.rb +350 -0
- data/lib/payzu-pix/models/proof_response.rb +148 -0
- data/lib/payzu-pix/models/qr_code_read_response.rb +283 -0
- data/lib/payzu-pix/models/refund.rb +257 -0
- data/lib/payzu-pix/models/refund_request.rb +215 -0
- data/lib/payzu-pix/models/report_job.rb +234 -0
- data/lib/payzu-pix/models/report_job_accepted.rb +237 -0
- data/lib/payzu-pix/models/report_job_detail.rb +237 -0
- data/lib/payzu-pix/models/resend_user_callback_single200_response.rb +148 -0
- data/lib/payzu-pix/models/resend_user_callbacks200_response.rb +158 -0
- data/lib/payzu-pix/models/resend_user_callbacks_request.rb +262 -0
- data/lib/payzu-pix/models/resend_webhook_callbacks_request.rb +274 -0
- data/lib/payzu-pix/models/rotate_callback_secret_response.rb +148 -0
- data/lib/payzu-pix/models/rotate_secret_response.rb +148 -0
- data/lib/payzu-pix/models/sent_webhook_detail.rb +261 -0
- data/lib/payzu-pix/models/sent_webhook_detail_response.rb +164 -0
- data/lib/payzu-pix/models/sent_webhooks_quantity.rb +148 -0
- data/lib/payzu-pix/models/summary.rb +188 -0
- data/lib/payzu-pix/models/summary_block.rb +179 -0
- data/lib/payzu-pix/models/summary_block_grouped_inner.rb +158 -0
- data/lib/payzu-pix/models/summary_block_statuses.rb +189 -0
- data/lib/payzu-pix/models/summary_status.rb +168 -0
- data/lib/payzu-pix/models/transaction.rb +588 -0
- data/lib/payzu-pix/models/transaction_with_refunds.rb +583 -0
- data/lib/payzu-pix/models/webhook.rb +210 -0
- data/lib/payzu-pix/models/webhook_create_request.rb +201 -0
- data/lib/payzu-pix/models/webhook_event_type.rb +47 -0
- data/lib/payzu-pix/models/webhook_list_response.rb +150 -0
- data/lib/payzu-pix/models/webhook_update_request.rb +171 -0
- data/lib/payzu-pix/models/webhook_with_secret.rb +220 -0
- data/lib/payzu-pix/version.rb +15 -0
- data/lib/payzu-pix.rb +119 -0
- data/payzu-pix.gemspec +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +283 -0
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PayZu Pix API
|
|
3
|
+
|
|
4
|
+
#REST API for Pix operations on the PayZu platform, deposits, withdrawals, internal transfers, infractions, reports, and callback inspection. All amounts are in BRL (reais) unless explicitly noted. Authentication uses a Bearer token issued during onboarding. ## SDKs oficiais - Node.js: `npm install payzu-pix` - Python: `pip install payzu-pix` - PHP: `composer require payzu/pix` - Ruby: `gem install payzu-pix` - Java: `br.com.payzu:payzu-pix` (Maven Central) - Go: `go get github.com/PayZuAI/payzu-sdks/go/v2` Repo: https://github.com/PayZuAI/payzu-sdks
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PayZuPix
|
|
16
|
+
class InfractionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# List Infractions
|
|
23
|
+
# List all infractions for the authenticated user with pagination and filters.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [Integer] :page Page number. (default to 1)
|
|
26
|
+
# @option opts [Integer] :limit Items per page. (default to 10)
|
|
27
|
+
# @option opts [String] :status Comma-separated InfractionStatus (WAITING_PSP,CLOSED,OPEN,CANCELLED,ACKNOWLEDGED,DEFENDED,ANSWERED,WAITING_ADJUSTMENTS)
|
|
28
|
+
# @option opts [String] :type Comma-separated InfractionType (REFUND_REQUEST,FRAUD,REFUND_CANCELLED)
|
|
29
|
+
# @option opts [String] :end_to_end_id End-to-end ID of the Pix.
|
|
30
|
+
# @option opts [String] :transaction_id Transaction ID.
|
|
31
|
+
# @option opts [Float] :amount_min Minimum amount.
|
|
32
|
+
# @option opts [Float] :amount_max Maximum amount.
|
|
33
|
+
# @option opts [String] :analysis_result Comma-separated AnalysisResult: AGREED, DISAGREED.
|
|
34
|
+
# @option opts [String] :reported_by Comma-separated ReportedType (DEBITED_PARTICIPANT,CREDITED_PARTICIPANT)
|
|
35
|
+
# @option opts [String] :participant_document CPF or CNPJ of the participant.
|
|
36
|
+
# @option opts [String] :participant_name Name of the participant.
|
|
37
|
+
# @option opts [String] :sort_by Sort field. (default to 'createdAt')
|
|
38
|
+
# @option opts [String] :sort_direction Sort direction. (default to 'desc')
|
|
39
|
+
# @option opts [Time] :reported_at_from Filter: reportedAt from.
|
|
40
|
+
# @option opts [Time] :reported_at_to Filter: reportedAt up to.
|
|
41
|
+
# @option opts [Time] :created_at_from Filter: createdAt from.
|
|
42
|
+
# @option opts [Time] :created_at_to Filter: createdAt up to.
|
|
43
|
+
# @option opts [Time] :expires_at_from Filter: expiresAt from.
|
|
44
|
+
# @option opts [Time] :expires_at_to Filter: expiresAt up to.
|
|
45
|
+
# @option opts [Time] :updated_at_from Filter: updatedAt from.
|
|
46
|
+
# @option opts [Time] :updated_at_to Filter: updatedAt up to.
|
|
47
|
+
# @option opts [String] :id Filter by infraction ID.
|
|
48
|
+
# @option opts [String] :protocol Filter by protocol.
|
|
49
|
+
# @return [InfractionListResponse]
|
|
50
|
+
def get_infractions(opts = {})
|
|
51
|
+
data, _status_code, _headers = get_infractions_with_http_info(opts)
|
|
52
|
+
data
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List Infractions
|
|
56
|
+
# List all infractions for the authenticated user with pagination and filters.
|
|
57
|
+
# @param [Hash] opts the optional parameters
|
|
58
|
+
# @option opts [Integer] :page Page number. (default to 1)
|
|
59
|
+
# @option opts [Integer] :limit Items per page. (default to 10)
|
|
60
|
+
# @option opts [String] :status Comma-separated InfractionStatus (WAITING_PSP,CLOSED,OPEN,CANCELLED,ACKNOWLEDGED,DEFENDED,ANSWERED,WAITING_ADJUSTMENTS)
|
|
61
|
+
# @option opts [String] :type Comma-separated InfractionType (REFUND_REQUEST,FRAUD,REFUND_CANCELLED)
|
|
62
|
+
# @option opts [String] :end_to_end_id End-to-end ID of the Pix.
|
|
63
|
+
# @option opts [String] :transaction_id Transaction ID.
|
|
64
|
+
# @option opts [Float] :amount_min Minimum amount.
|
|
65
|
+
# @option opts [Float] :amount_max Maximum amount.
|
|
66
|
+
# @option opts [String] :analysis_result Comma-separated AnalysisResult: AGREED, DISAGREED.
|
|
67
|
+
# @option opts [String] :reported_by Comma-separated ReportedType (DEBITED_PARTICIPANT,CREDITED_PARTICIPANT)
|
|
68
|
+
# @option opts [String] :participant_document CPF or CNPJ of the participant.
|
|
69
|
+
# @option opts [String] :participant_name Name of the participant.
|
|
70
|
+
# @option opts [String] :sort_by Sort field. (default to 'createdAt')
|
|
71
|
+
# @option opts [String] :sort_direction Sort direction. (default to 'desc')
|
|
72
|
+
# @option opts [Time] :reported_at_from Filter: reportedAt from.
|
|
73
|
+
# @option opts [Time] :reported_at_to Filter: reportedAt up to.
|
|
74
|
+
# @option opts [Time] :created_at_from Filter: createdAt from.
|
|
75
|
+
# @option opts [Time] :created_at_to Filter: createdAt up to.
|
|
76
|
+
# @option opts [Time] :expires_at_from Filter: expiresAt from.
|
|
77
|
+
# @option opts [Time] :expires_at_to Filter: expiresAt up to.
|
|
78
|
+
# @option opts [Time] :updated_at_from Filter: updatedAt from.
|
|
79
|
+
# @option opts [Time] :updated_at_to Filter: updatedAt up to.
|
|
80
|
+
# @option opts [String] :id Filter by infraction ID.
|
|
81
|
+
# @option opts [String] :protocol Filter by protocol.
|
|
82
|
+
# @return [Array<(InfractionListResponse, Integer, Hash)>] InfractionListResponse data, response status code and response headers
|
|
83
|
+
def get_infractions_with_http_info(opts = {})
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug 'Calling API: InfractionsApi.get_infractions ...'
|
|
86
|
+
end
|
|
87
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
88
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling InfractionsApi.get_infractions, must be greater than or equal to 1.'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
92
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InfractionsApi.get_infractions, must be smaller than or equal to 100.'
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
96
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling InfractionsApi.get_infractions, must be greater than or equal to 1.'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
allowable_values = ["createdAt", "updatedAt"]
|
|
100
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
101
|
+
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
102
|
+
end
|
|
103
|
+
allowable_values = ["asc", "desc"]
|
|
104
|
+
if @api_client.config.client_side_validation && opts[:'sort_direction'] && !allowable_values.include?(opts[:'sort_direction'])
|
|
105
|
+
fail ArgumentError, "invalid value for \"sort_direction\", must be one of #{allowable_values}"
|
|
106
|
+
end
|
|
107
|
+
# resource path
|
|
108
|
+
local_var_path = '/user/infractions'
|
|
109
|
+
|
|
110
|
+
# query parameters
|
|
111
|
+
query_params = opts[:query_params] || {}
|
|
112
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
113
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
114
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
115
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
116
|
+
query_params[:'endToEndId'] = opts[:'end_to_end_id'] if !opts[:'end_to_end_id'].nil?
|
|
117
|
+
query_params[:'transactionId'] = opts[:'transaction_id'] if !opts[:'transaction_id'].nil?
|
|
118
|
+
query_params[:'amountMin'] = opts[:'amount_min'] if !opts[:'amount_min'].nil?
|
|
119
|
+
query_params[:'amountMax'] = opts[:'amount_max'] if !opts[:'amount_max'].nil?
|
|
120
|
+
query_params[:'analysisResult'] = opts[:'analysis_result'] if !opts[:'analysis_result'].nil?
|
|
121
|
+
query_params[:'reportedBy'] = opts[:'reported_by'] if !opts[:'reported_by'].nil?
|
|
122
|
+
query_params[:'participantDocument'] = opts[:'participant_document'] if !opts[:'participant_document'].nil?
|
|
123
|
+
query_params[:'participantName'] = opts[:'participant_name'] if !opts[:'participant_name'].nil?
|
|
124
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
125
|
+
query_params[:'sortDirection'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
|
|
126
|
+
query_params[:'reportedAtFrom'] = opts[:'reported_at_from'] if !opts[:'reported_at_from'].nil?
|
|
127
|
+
query_params[:'reportedAtTo'] = opts[:'reported_at_to'] if !opts[:'reported_at_to'].nil?
|
|
128
|
+
query_params[:'createdAtFrom'] = opts[:'created_at_from'] if !opts[:'created_at_from'].nil?
|
|
129
|
+
query_params[:'createdAtTo'] = opts[:'created_at_to'] if !opts[:'created_at_to'].nil?
|
|
130
|
+
query_params[:'expiresAtFrom'] = opts[:'expires_at_from'] if !opts[:'expires_at_from'].nil?
|
|
131
|
+
query_params[:'expiresAtTo'] = opts[:'expires_at_to'] if !opts[:'expires_at_to'].nil?
|
|
132
|
+
query_params[:'updatedAtFrom'] = opts[:'updated_at_from'] if !opts[:'updated_at_from'].nil?
|
|
133
|
+
query_params[:'updatedAtTo'] = opts[:'updated_at_to'] if !opts[:'updated_at_to'].nil?
|
|
134
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
135
|
+
query_params[:'protocol'] = opts[:'protocol'] if !opts[:'protocol'].nil?
|
|
136
|
+
|
|
137
|
+
# header parameters
|
|
138
|
+
header_params = opts[:header_params] || {}
|
|
139
|
+
# HTTP header 'Accept' (if needed)
|
|
140
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = opts[:form_params] || {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = opts[:debug_body]
|
|
147
|
+
|
|
148
|
+
# return_type
|
|
149
|
+
return_type = opts[:debug_return_type] || 'InfractionListResponse'
|
|
150
|
+
|
|
151
|
+
# auth_names
|
|
152
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
153
|
+
|
|
154
|
+
new_options = opts.merge(
|
|
155
|
+
:operation => :"InfractionsApi.get_infractions",
|
|
156
|
+
:header_params => header_params,
|
|
157
|
+
:query_params => query_params,
|
|
158
|
+
:form_params => form_params,
|
|
159
|
+
:body => post_body,
|
|
160
|
+
:auth_names => auth_names,
|
|
161
|
+
:return_type => return_type
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
165
|
+
if @api_client.config.debugging
|
|
166
|
+
@api_client.config.logger.debug "API called: InfractionsApi#get_infractions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
167
|
+
end
|
|
168
|
+
return data, status_code, headers
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Get Infraction
|
|
172
|
+
# Get a specific infraction by ID.
|
|
173
|
+
# @param id [String] Infraction ID
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [InfractionDetail]
|
|
176
|
+
def get_infractions_by_id(id, opts = {})
|
|
177
|
+
data, _status_code, _headers = get_infractions_by_id_with_http_info(id, opts)
|
|
178
|
+
data
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Get Infraction
|
|
182
|
+
# Get a specific infraction by ID.
|
|
183
|
+
# @param id [String] Infraction ID
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @return [Array<(InfractionDetail, Integer, Hash)>] InfractionDetail data, response status code and response headers
|
|
186
|
+
def get_infractions_by_id_with_http_info(id, opts = {})
|
|
187
|
+
if @api_client.config.debugging
|
|
188
|
+
@api_client.config.logger.debug 'Calling API: InfractionsApi.get_infractions_by_id ...'
|
|
189
|
+
end
|
|
190
|
+
# verify the required parameter 'id' is set
|
|
191
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
192
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InfractionsApi.get_infractions_by_id"
|
|
193
|
+
end
|
|
194
|
+
# resource path
|
|
195
|
+
local_var_path = '/user/infractions/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
196
|
+
|
|
197
|
+
# query parameters
|
|
198
|
+
query_params = opts[:query_params] || {}
|
|
199
|
+
|
|
200
|
+
# header parameters
|
|
201
|
+
header_params = opts[:header_params] || {}
|
|
202
|
+
# HTTP header 'Accept' (if needed)
|
|
203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
204
|
+
|
|
205
|
+
# form parameters
|
|
206
|
+
form_params = opts[:form_params] || {}
|
|
207
|
+
|
|
208
|
+
# http body (model)
|
|
209
|
+
post_body = opts[:debug_body]
|
|
210
|
+
|
|
211
|
+
# return_type
|
|
212
|
+
return_type = opts[:debug_return_type] || 'InfractionDetail'
|
|
213
|
+
|
|
214
|
+
# auth_names
|
|
215
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
216
|
+
|
|
217
|
+
new_options = opts.merge(
|
|
218
|
+
:operation => :"InfractionsApi.get_infractions_by_id",
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names,
|
|
224
|
+
:return_type => return_type
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug "API called: InfractionsApi#get_infractions_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
230
|
+
end
|
|
231
|
+
return data, status_code, headers
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Get Defense
|
|
235
|
+
# Get a specific defense for an infraction.
|
|
236
|
+
# @param infraction_id [String] Infraction ID
|
|
237
|
+
# @param defense_id [String] Defense ID
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @return [Defense]
|
|
240
|
+
def get_infractions_defense_by_id(infraction_id, defense_id, opts = {})
|
|
241
|
+
data, _status_code, _headers = get_infractions_defense_by_id_with_http_info(infraction_id, defense_id, opts)
|
|
242
|
+
data
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Get Defense
|
|
246
|
+
# Get a specific defense for an infraction.
|
|
247
|
+
# @param infraction_id [String] Infraction ID
|
|
248
|
+
# @param defense_id [String] Defense ID
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [Array<(Defense, Integer, Hash)>] Defense data, response status code and response headers
|
|
251
|
+
def get_infractions_defense_by_id_with_http_info(infraction_id, defense_id, opts = {})
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug 'Calling API: InfractionsApi.get_infractions_defense_by_id ...'
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'infraction_id' is set
|
|
256
|
+
if @api_client.config.client_side_validation && infraction_id.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'infraction_id' when calling InfractionsApi.get_infractions_defense_by_id"
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'defense_id' is set
|
|
260
|
+
if @api_client.config.client_side_validation && defense_id.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'defense_id' when calling InfractionsApi.get_infractions_defense_by_id"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/user/infractions/{infractionId}/defenses/{defenseId}'.sub('{infractionId}', CGI.escape(infraction_id.to_s)).sub('{defenseId}', CGI.escape(defense_id.to_s))
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
273
|
+
|
|
274
|
+
# form parameters
|
|
275
|
+
form_params = opts[:form_params] || {}
|
|
276
|
+
|
|
277
|
+
# http body (model)
|
|
278
|
+
post_body = opts[:debug_body]
|
|
279
|
+
|
|
280
|
+
# return_type
|
|
281
|
+
return_type = opts[:debug_return_type] || 'Defense'
|
|
282
|
+
|
|
283
|
+
# auth_names
|
|
284
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
285
|
+
|
|
286
|
+
new_options = opts.merge(
|
|
287
|
+
:operation => :"InfractionsApi.get_infractions_defense_by_id",
|
|
288
|
+
:header_params => header_params,
|
|
289
|
+
:query_params => query_params,
|
|
290
|
+
:form_params => form_params,
|
|
291
|
+
:body => post_body,
|
|
292
|
+
:auth_names => auth_names,
|
|
293
|
+
:return_type => return_type
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
297
|
+
if @api_client.config.debugging
|
|
298
|
+
@api_client.config.logger.debug "API called: InfractionsApi#get_infractions_defense_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
299
|
+
end
|
|
300
|
+
return data, status_code, headers
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# List Defenses
|
|
304
|
+
# List all defenses for a specific infraction.
|
|
305
|
+
# @param id [String] Infraction ID
|
|
306
|
+
# @param [Hash] opts the optional parameters
|
|
307
|
+
# @return [Array<Defense>]
|
|
308
|
+
def get_infractions_defenses(id, opts = {})
|
|
309
|
+
data, _status_code, _headers = get_infractions_defenses_with_http_info(id, opts)
|
|
310
|
+
data
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# List Defenses
|
|
314
|
+
# List all defenses for a specific infraction.
|
|
315
|
+
# @param id [String] Infraction ID
|
|
316
|
+
# @param [Hash] opts the optional parameters
|
|
317
|
+
# @return [Array<(Array<Defense>, Integer, Hash)>] Array<Defense> data, response status code and response headers
|
|
318
|
+
def get_infractions_defenses_with_http_info(id, opts = {})
|
|
319
|
+
if @api_client.config.debugging
|
|
320
|
+
@api_client.config.logger.debug 'Calling API: InfractionsApi.get_infractions_defenses ...'
|
|
321
|
+
end
|
|
322
|
+
# verify the required parameter 'id' is set
|
|
323
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
324
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InfractionsApi.get_infractions_defenses"
|
|
325
|
+
end
|
|
326
|
+
# resource path
|
|
327
|
+
local_var_path = '/user/infractions/{id}/defenses'.sub('{id}', CGI.escape(id.to_s))
|
|
328
|
+
|
|
329
|
+
# query parameters
|
|
330
|
+
query_params = opts[:query_params] || {}
|
|
331
|
+
|
|
332
|
+
# header parameters
|
|
333
|
+
header_params = opts[:header_params] || {}
|
|
334
|
+
# HTTP header 'Accept' (if needed)
|
|
335
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
336
|
+
|
|
337
|
+
# form parameters
|
|
338
|
+
form_params = opts[:form_params] || {}
|
|
339
|
+
|
|
340
|
+
# http body (model)
|
|
341
|
+
post_body = opts[:debug_body]
|
|
342
|
+
|
|
343
|
+
# return_type
|
|
344
|
+
return_type = opts[:debug_return_type] || 'Array<Defense>'
|
|
345
|
+
|
|
346
|
+
# auth_names
|
|
347
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
348
|
+
|
|
349
|
+
new_options = opts.merge(
|
|
350
|
+
:operation => :"InfractionsApi.get_infractions_defenses",
|
|
351
|
+
:header_params => header_params,
|
|
352
|
+
:query_params => query_params,
|
|
353
|
+
:form_params => form_params,
|
|
354
|
+
:body => post_body,
|
|
355
|
+
:auth_names => auth_names,
|
|
356
|
+
:return_type => return_type
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug "API called: InfractionsApi#get_infractions_defenses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
362
|
+
end
|
|
363
|
+
return data, status_code, headers
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Create Defense
|
|
367
|
+
# Create a defense for a specific infraction.
|
|
368
|
+
# @param id [String] Infraction ID
|
|
369
|
+
# @param defense [String] Defense text (max: 1000 characters)
|
|
370
|
+
# @param [Hash] opts the optional parameters
|
|
371
|
+
# @option opts [Array<File>] :files Evidence files: up to 5 files, 10 MB each and 10 MB in total. Files .exe, .msi, .bat, .sh and .cmd are rejected.
|
|
372
|
+
# @return [Defense]
|
|
373
|
+
def post_infractions_defense(id, defense, opts = {})
|
|
374
|
+
data, _status_code, _headers = post_infractions_defense_with_http_info(id, defense, opts)
|
|
375
|
+
data
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Create Defense
|
|
379
|
+
# Create a defense for a specific infraction.
|
|
380
|
+
# @param id [String] Infraction ID
|
|
381
|
+
# @param defense [String] Defense text (max: 1000 characters)
|
|
382
|
+
# @param [Hash] opts the optional parameters
|
|
383
|
+
# @option opts [Array<File>] :files Evidence files: up to 5 files, 10 MB each and 10 MB in total. Files .exe, .msi, .bat, .sh and .cmd are rejected.
|
|
384
|
+
# @return [Array<(Defense, Integer, Hash)>] Defense data, response status code and response headers
|
|
385
|
+
def post_infractions_defense_with_http_info(id, defense, opts = {})
|
|
386
|
+
if @api_client.config.debugging
|
|
387
|
+
@api_client.config.logger.debug 'Calling API: InfractionsApi.post_infractions_defense ...'
|
|
388
|
+
end
|
|
389
|
+
# verify the required parameter 'id' is set
|
|
390
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
391
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InfractionsApi.post_infractions_defense"
|
|
392
|
+
end
|
|
393
|
+
# verify the required parameter 'defense' is set
|
|
394
|
+
if @api_client.config.client_side_validation && defense.nil?
|
|
395
|
+
fail ArgumentError, "Missing the required parameter 'defense' when calling InfractionsApi.post_infractions_defense"
|
|
396
|
+
end
|
|
397
|
+
if @api_client.config.client_side_validation && defense.to_s.length > 1000
|
|
398
|
+
fail ArgumentError, 'invalid value for "defense" when calling InfractionsApi.post_infractions_defense, the character length must be smaller than or equal to 1000.'
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
if @api_client.config.client_side_validation && defense.to_s.length < 1
|
|
402
|
+
fail ArgumentError, 'invalid value for "defense" when calling InfractionsApi.post_infractions_defense, the character length must be greater than or equal to 1.'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# resource path
|
|
406
|
+
local_var_path = '/user/infractions/{id}/defenses'.sub('{id}', CGI.escape(id.to_s))
|
|
407
|
+
|
|
408
|
+
# query parameters
|
|
409
|
+
query_params = opts[:query_params] || {}
|
|
410
|
+
|
|
411
|
+
# header parameters
|
|
412
|
+
header_params = opts[:header_params] || {}
|
|
413
|
+
# HTTP header 'Accept' (if needed)
|
|
414
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
415
|
+
# HTTP header 'Content-Type'
|
|
416
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data'])
|
|
417
|
+
if !content_type.nil?
|
|
418
|
+
header_params['Content-Type'] = content_type
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
# form parameters
|
|
422
|
+
form_params = opts[:form_params] || {}
|
|
423
|
+
form_params['defense'] = defense
|
|
424
|
+
form_params['files'] = @api_client.build_collection_param(opts[:'files'], :csv) if !opts[:'files'].nil?
|
|
425
|
+
|
|
426
|
+
# http body (model)
|
|
427
|
+
post_body = opts[:debug_body]
|
|
428
|
+
|
|
429
|
+
# return_type
|
|
430
|
+
return_type = opts[:debug_return_type] || 'Defense'
|
|
431
|
+
|
|
432
|
+
# auth_names
|
|
433
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
434
|
+
|
|
435
|
+
new_options = opts.merge(
|
|
436
|
+
:operation => :"InfractionsApi.post_infractions_defense",
|
|
437
|
+
:header_params => header_params,
|
|
438
|
+
:query_params => query_params,
|
|
439
|
+
:form_params => form_params,
|
|
440
|
+
:body => post_body,
|
|
441
|
+
:auth_names => auth_names,
|
|
442
|
+
:return_type => return_type
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
446
|
+
if @api_client.config.debugging
|
|
447
|
+
@api_client.config.logger.debug "API called: InfractionsApi#post_infractions_defense\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
448
|
+
end
|
|
449
|
+
return data, status_code, headers
|
|
450
|
+
end
|
|
451
|
+
end
|
|
452
|
+
end
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#PayZu Pix API
|
|
3
|
+
|
|
4
|
+
#REST API for Pix operations on the PayZu platform, deposits, withdrawals, internal transfers, infractions, reports, and callback inspection. All amounts are in BRL (reais) unless explicitly noted. Authentication uses a Bearer token issued during onboarding. ## SDKs oficiais - Node.js: `npm install payzu-pix` - Python: `pip install payzu-pix` - PHP: `composer require payzu/pix` - Ruby: `gem install payzu-pix` - Java: `br.com.payzu:payzu-pix` (Maven Central) - Go: `go get github.com/PayZuAI/payzu-sdks/go/v2` Repo: https://github.com/PayZuAI/payzu-sdks
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.8.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module PayZuPix
|
|
16
|
+
class InternalTransferApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Get internal transfer
|
|
23
|
+
# Returns the details of an internal transfer. Provide at least one of `id` or `clientReference` (`virtualAccount` is also accepted). If more than one is provided, all are applied as filters (AND). Token permission: `WITHDRAW`.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :id Transaction ID
|
|
26
|
+
# @option opts [String] :client_reference External reference
|
|
27
|
+
# @option opts [String] :virtual_account Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key.
|
|
28
|
+
# @return [Transaction]
|
|
29
|
+
def get_internal_transfer(opts = {})
|
|
30
|
+
data, _status_code, _headers = get_internal_transfer_with_http_info(opts)
|
|
31
|
+
data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Get internal transfer
|
|
35
|
+
# Returns the details of an internal transfer. Provide at least one of `id` or `clientReference` (`virtualAccount` is also accepted). If more than one is provided, all are applied as filters (AND). Token permission: `WITHDRAW`.
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :id Transaction ID
|
|
38
|
+
# @option opts [String] :client_reference External reference
|
|
39
|
+
# @option opts [String] :virtual_account Virtual sub-account (up to 50 characters) used at creation. Accepted as an alternative lookup key.
|
|
40
|
+
# @return [Array<(Transaction, Integer, Hash)>] Transaction data, response status code and response headers
|
|
41
|
+
def get_internal_transfer_with_http_info(opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: InternalTransferApi.get_internal_transfer ...'
|
|
44
|
+
end
|
|
45
|
+
if @api_client.config.client_side_validation && !opts[:'client_reference'].nil? && opts[:'client_reference'].to_s.length > 64
|
|
46
|
+
fail ArgumentError, 'invalid value for "opts[:"client_reference"]" when calling InternalTransferApi.get_internal_transfer, the character length must be smaller than or equal to 64.'
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if @api_client.config.client_side_validation && !opts[:'virtual_account'].nil? && opts[:'virtual_account'].to_s.length > 50
|
|
50
|
+
fail ArgumentError, 'invalid value for "opts[:"virtual_account"]" when calling InternalTransferApi.get_internal_transfer, the character length must be smaller than or equal to 50.'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# resource path
|
|
54
|
+
local_var_path = '/internal-transfer'
|
|
55
|
+
|
|
56
|
+
# query parameters
|
|
57
|
+
query_params = opts[:query_params] || {}
|
|
58
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
59
|
+
query_params[:'clientReference'] = opts[:'client_reference'] if !opts[:'client_reference'].nil?
|
|
60
|
+
query_params[:'virtualAccount'] = opts[:'virtual_account'] if !opts[:'virtual_account'].nil?
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body]
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'Transaction'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"InternalTransferApi.get_internal_transfer",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: InternalTransferApi#get_internal_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Create internal transfer
|
|
97
|
+
# Send funds to another PayZu account using its 6-digit accountNumber. Settles instantly within PayZu. Token permission: `WITHDRAW`.
|
|
98
|
+
# @param post_internal_transfer_request [PostInternalTransferRequest]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [Transaction]
|
|
101
|
+
def post_internal_transfer(post_internal_transfer_request, opts = {})
|
|
102
|
+
data, _status_code, _headers = post_internal_transfer_with_http_info(post_internal_transfer_request, opts)
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Create internal transfer
|
|
107
|
+
# Send funds to another PayZu account using its 6-digit accountNumber. Settles instantly within PayZu. Token permission: `WITHDRAW`.
|
|
108
|
+
# @param post_internal_transfer_request [PostInternalTransferRequest]
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Array<(Transaction, Integer, Hash)>] Transaction data, response status code and response headers
|
|
111
|
+
def post_internal_transfer_with_http_info(post_internal_transfer_request, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: InternalTransferApi.post_internal_transfer ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'post_internal_transfer_request' is set
|
|
116
|
+
if @api_client.config.client_side_validation && post_internal_transfer_request.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'post_internal_transfer_request' when calling InternalTransferApi.post_internal_transfer"
|
|
118
|
+
end
|
|
119
|
+
# resource path
|
|
120
|
+
local_var_path = '/internal-transfer'
|
|
121
|
+
|
|
122
|
+
# query parameters
|
|
123
|
+
query_params = opts[:query_params] || {}
|
|
124
|
+
|
|
125
|
+
# header parameters
|
|
126
|
+
header_params = opts[:header_params] || {}
|
|
127
|
+
# HTTP header 'Accept' (if needed)
|
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
129
|
+
# HTTP header 'Content-Type'
|
|
130
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
131
|
+
if !content_type.nil?
|
|
132
|
+
header_params['Content-Type'] = content_type
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# form parameters
|
|
136
|
+
form_params = opts[:form_params] || {}
|
|
137
|
+
|
|
138
|
+
# http body (model)
|
|
139
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_internal_transfer_request)
|
|
140
|
+
|
|
141
|
+
# return_type
|
|
142
|
+
return_type = opts[:debug_return_type] || 'Transaction'
|
|
143
|
+
|
|
144
|
+
# auth_names
|
|
145
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
146
|
+
|
|
147
|
+
new_options = opts.merge(
|
|
148
|
+
:operation => :"InternalTransferApi.post_internal_transfer",
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:form_params => form_params,
|
|
152
|
+
:body => post_body,
|
|
153
|
+
:auth_names => auth_names,
|
|
154
|
+
:return_type => return_type
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
158
|
+
if @api_client.config.debugging
|
|
159
|
+
@api_client.config.logger.debug "API called: InternalTransferApi#post_internal_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
160
|
+
end
|
|
161
|
+
return data, status_code, headers
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
end
|