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,171 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PayZuPix
|
|
17
|
+
# Provide at least one field.
|
|
18
|
+
class WebhookUpdateRequest < ApiModelBase
|
|
19
|
+
# New delivery address, which applies to the following dispatches.
|
|
20
|
+
attr_accessor :url
|
|
21
|
+
|
|
22
|
+
# Turns the webhook deliveries on or pauses them.
|
|
23
|
+
attr_accessor :active
|
|
24
|
+
|
|
25
|
+
# New list of subscribed events, which replaces the previous one entirely.
|
|
26
|
+
attr_accessor :events
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'url' => :'url',
|
|
32
|
+
:'active' => :'active',
|
|
33
|
+
:'events' => :'events'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns attribute mapping this model knows about
|
|
38
|
+
def self.acceptable_attribute_map
|
|
39
|
+
attribute_map
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Returns all the JSON keys this model knows about
|
|
43
|
+
def self.acceptable_attributes
|
|
44
|
+
acceptable_attribute_map.values
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.openapi_types
|
|
49
|
+
{
|
|
50
|
+
:'url' => :'String',
|
|
51
|
+
:'active' => :'Boolean',
|
|
52
|
+
:'events' => :'Array<WebhookEventType>'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# List of attributes with nullable: true
|
|
57
|
+
def self.openapi_nullable
|
|
58
|
+
Set.new([
|
|
59
|
+
])
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
if (!attributes.is_a?(Hash))
|
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::WebhookUpdateRequest` initialize method"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
70
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::WebhookUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'url')
|
|
79
|
+
self.url = attributes[:'url']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'active')
|
|
83
|
+
self.active = attributes[:'active']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'events')
|
|
87
|
+
if (value = attributes[:'events']).is_a?(Array)
|
|
88
|
+
self.events = value
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Checks equality by comparing each attribute.
|
|
109
|
+
# @param [Object] Object to be compared
|
|
110
|
+
def ==(o)
|
|
111
|
+
return true if self.equal?(o)
|
|
112
|
+
self.class == o.class &&
|
|
113
|
+
url == o.url &&
|
|
114
|
+
active == o.active &&
|
|
115
|
+
events == o.events
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# @see the `==` method
|
|
119
|
+
# @param [Object] Object to be compared
|
|
120
|
+
def eql?(o)
|
|
121
|
+
self == o
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Calculates hash code according to all attributes.
|
|
125
|
+
# @return [Integer] Hash code
|
|
126
|
+
def hash
|
|
127
|
+
[url, active, events].hash
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Builds the object from hash
|
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
132
|
+
# @return [Object] Returns the model itself
|
|
133
|
+
def self.build_from_hash(attributes)
|
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
136
|
+
transformed_hash = {}
|
|
137
|
+
openapi_types.each_pair do |key, type|
|
|
138
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
139
|
+
transformed_hash["#{key}"] = nil
|
|
140
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
141
|
+
# check to ensure the input is an array given that the attribute
|
|
142
|
+
# is documented as an array but the input is not
|
|
143
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
144
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
145
|
+
end
|
|
146
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
147
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
new(transformed_hash)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Returns the object in the form of hash
|
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
|
155
|
+
def to_hash
|
|
156
|
+
hash = {}
|
|
157
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
158
|
+
value = self.send(attr)
|
|
159
|
+
if value.nil?
|
|
160
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
161
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
hash[param] = _to_hash(value)
|
|
165
|
+
end
|
|
166
|
+
hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
end
|
|
@@ -0,0 +1,220 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PayZuPix
|
|
17
|
+
class WebhookWithSecret < ApiModelBase
|
|
18
|
+
# Webhook identifier.
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Address that receives the notifications.
|
|
22
|
+
attr_accessor :url
|
|
23
|
+
|
|
24
|
+
# Indicates whether the webhook starts out receiving events.
|
|
25
|
+
attr_accessor :active
|
|
26
|
+
|
|
27
|
+
# Events subscribed by this webhook.
|
|
28
|
+
attr_accessor :events
|
|
29
|
+
|
|
30
|
+
# Indicates whether the webhook has a signing secret.
|
|
31
|
+
attr_accessor :has_secret
|
|
32
|
+
|
|
33
|
+
attr_accessor :created_at
|
|
34
|
+
|
|
35
|
+
# Date and time of the last change to the webhook.
|
|
36
|
+
attr_accessor :updated_at
|
|
37
|
+
|
|
38
|
+
# HMAC signing secret. Shown only on creation and on rotate-secret. Store it now.
|
|
39
|
+
attr_accessor :secret
|
|
40
|
+
|
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'id' => :'id',
|
|
45
|
+
:'url' => :'url',
|
|
46
|
+
:'active' => :'active',
|
|
47
|
+
:'events' => :'events',
|
|
48
|
+
:'has_secret' => :'hasSecret',
|
|
49
|
+
:'created_at' => :'createdAt',
|
|
50
|
+
:'updated_at' => :'updatedAt',
|
|
51
|
+
:'secret' => :'secret'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'id' => :'String',
|
|
69
|
+
:'url' => :'String',
|
|
70
|
+
:'active' => :'Boolean',
|
|
71
|
+
:'events' => :'Array<WebhookEventType>',
|
|
72
|
+
:'has_secret' => :'Boolean',
|
|
73
|
+
:'created_at' => :'Time',
|
|
74
|
+
:'updated_at' => :'Time',
|
|
75
|
+
:'secret' => :'String'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
:'secret'
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PayZuPix::WebhookWithSecret` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PayZuPix::WebhookWithSecret`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'id')
|
|
103
|
+
self.id = attributes[:'id']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'url')
|
|
107
|
+
self.url = attributes[:'url']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'active')
|
|
111
|
+
self.active = attributes[:'active']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'events')
|
|
115
|
+
if (value = attributes[:'events']).is_a?(Array)
|
|
116
|
+
self.events = value
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'has_secret')
|
|
121
|
+
self.has_secret = attributes[:'has_secret']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'created_at')
|
|
125
|
+
self.created_at = attributes[:'created_at']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'updated_at')
|
|
129
|
+
self.updated_at = attributes[:'updated_at']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'secret')
|
|
133
|
+
self.secret = attributes[:'secret']
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
138
|
+
# @return Array for valid properties with the reasons
|
|
139
|
+
def list_invalid_properties
|
|
140
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
141
|
+
invalid_properties = Array.new
|
|
142
|
+
invalid_properties
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Check to see if the all the properties in the model are valid
|
|
146
|
+
# @return true if the model is valid
|
|
147
|
+
def valid?
|
|
148
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
149
|
+
true
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Checks equality by comparing each attribute.
|
|
153
|
+
# @param [Object] Object to be compared
|
|
154
|
+
def ==(o)
|
|
155
|
+
return true if self.equal?(o)
|
|
156
|
+
self.class == o.class &&
|
|
157
|
+
id == o.id &&
|
|
158
|
+
url == o.url &&
|
|
159
|
+
active == o.active &&
|
|
160
|
+
events == o.events &&
|
|
161
|
+
has_secret == o.has_secret &&
|
|
162
|
+
created_at == o.created_at &&
|
|
163
|
+
updated_at == o.updated_at &&
|
|
164
|
+
secret == o.secret
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# @see the `==` method
|
|
168
|
+
# @param [Object] Object to be compared
|
|
169
|
+
def eql?(o)
|
|
170
|
+
self == o
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Calculates hash code according to all attributes.
|
|
174
|
+
# @return [Integer] Hash code
|
|
175
|
+
def hash
|
|
176
|
+
[id, url, active, events, has_secret, created_at, updated_at, secret].hash
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Builds the object from hash
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
# @return [Object] Returns the model itself
|
|
182
|
+
def self.build_from_hash(attributes)
|
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
|
184
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
185
|
+
transformed_hash = {}
|
|
186
|
+
openapi_types.each_pair do |key, type|
|
|
187
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
188
|
+
transformed_hash["#{key}"] = nil
|
|
189
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
190
|
+
# check to ensure the input is an array given that the attribute
|
|
191
|
+
# is documented as an array but the input is not
|
|
192
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
193
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
194
|
+
end
|
|
195
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
196
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
new(transformed_hash)
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the object in the form of hash
|
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
|
204
|
+
def to_hash
|
|
205
|
+
hash = {}
|
|
206
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
207
|
+
value = self.send(attr)
|
|
208
|
+
if value.nil?
|
|
209
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
210
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
module PayZuPix
|
|
14
|
+
VERSION = '2.0.0'
|
|
15
|
+
end
|
data/lib/payzu-pix.rb
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
# Common files
|
|
14
|
+
require 'payzu-pix/api_client'
|
|
15
|
+
require 'payzu-pix/api_error'
|
|
16
|
+
require 'payzu-pix/api_model_base'
|
|
17
|
+
require 'payzu-pix/version'
|
|
18
|
+
require 'payzu-pix/configuration'
|
|
19
|
+
|
|
20
|
+
# Models
|
|
21
|
+
require 'payzu-pix/models/api_error_details_inner'
|
|
22
|
+
require 'payzu-pix/models/bank_statement'
|
|
23
|
+
require 'payzu-pix/models/bank_statement_list_response'
|
|
24
|
+
require 'payzu-pix/models/bank_statement_list_response_pagination'
|
|
25
|
+
require 'payzu-pix/models/callback_detail'
|
|
26
|
+
require 'payzu-pix/models/callback_list_response'
|
|
27
|
+
require 'payzu-pix/models/callback_list_response_pagination'
|
|
28
|
+
require 'payzu-pix/models/callback_secret_response'
|
|
29
|
+
require 'payzu-pix/models/defense'
|
|
30
|
+
require 'payzu-pix/models/defense_files_inner'
|
|
31
|
+
require 'payzu-pix/models/defense_history_entry'
|
|
32
|
+
require 'payzu-pix/models/defense_history_entry_files_inner'
|
|
33
|
+
require 'payzu-pix/models/deposit_pending'
|
|
34
|
+
require 'payzu-pix/models/deposit_pending_list_response'
|
|
35
|
+
require 'payzu-pix/models/dict_consult_response'
|
|
36
|
+
require 'payzu-pix/models/download_user_report200_response'
|
|
37
|
+
require 'payzu-pix/models/enqueued_callback'
|
|
38
|
+
require 'payzu-pix/models/enqueued_callback_enqueued'
|
|
39
|
+
require 'payzu-pix/models/enqueued_callback_item'
|
|
40
|
+
require 'payzu-pix/models/error_response'
|
|
41
|
+
require 'payzu-pix/models/get_user200_response'
|
|
42
|
+
require 'payzu-pix/models/get_user200_response_daily_withdraw_limit'
|
|
43
|
+
require 'payzu-pix/models/get_user200_response_service_fee'
|
|
44
|
+
require 'payzu-pix/models/get_user_balance200_response'
|
|
45
|
+
require 'payzu-pix/models/get_user_transaction_by_id200_response'
|
|
46
|
+
require 'payzu-pix/models/get_user_transaction_by_id200_response_all_of_callback_log_inner'
|
|
47
|
+
require 'payzu-pix/models/get_user_transaction_by_id200_response_all_of_infraction_inner'
|
|
48
|
+
require 'payzu-pix/models/get_user_transactions200_response'
|
|
49
|
+
require 'payzu-pix/models/infraction_detail'
|
|
50
|
+
require 'payzu-pix/models/infraction_detail_transaction'
|
|
51
|
+
require 'payzu-pix/models/infraction_list_response'
|
|
52
|
+
require 'payzu-pix/models/infraction_list_response_pagination'
|
|
53
|
+
require 'payzu-pix/models/list_user_reports200_response'
|
|
54
|
+
require 'payzu-pix/models/pix_key_info'
|
|
55
|
+
require 'payzu-pix/models/post_internal_transfer_request'
|
|
56
|
+
require 'payzu-pix/models/post_pix_qrcode_read_request'
|
|
57
|
+
require 'payzu-pix/models/post_pix_request'
|
|
58
|
+
require 'payzu-pix/models/post_user_report_request'
|
|
59
|
+
require 'payzu-pix/models/post_withdraw_qrcode_request'
|
|
60
|
+
require 'payzu-pix/models/post_withdraw_request'
|
|
61
|
+
require 'payzu-pix/models/proof_response'
|
|
62
|
+
require 'payzu-pix/models/qr_code_read_response'
|
|
63
|
+
require 'payzu-pix/models/refund'
|
|
64
|
+
require 'payzu-pix/models/refund_request'
|
|
65
|
+
require 'payzu-pix/models/report_job'
|
|
66
|
+
require 'payzu-pix/models/report_job_accepted'
|
|
67
|
+
require 'payzu-pix/models/report_job_detail'
|
|
68
|
+
require 'payzu-pix/models/resend_user_callback_single200_response'
|
|
69
|
+
require 'payzu-pix/models/resend_user_callbacks200_response'
|
|
70
|
+
require 'payzu-pix/models/resend_user_callbacks_request'
|
|
71
|
+
require 'payzu-pix/models/resend_webhook_callbacks_request'
|
|
72
|
+
require 'payzu-pix/models/rotate_callback_secret_response'
|
|
73
|
+
require 'payzu-pix/models/rotate_secret_response'
|
|
74
|
+
require 'payzu-pix/models/sent_webhook_detail'
|
|
75
|
+
require 'payzu-pix/models/sent_webhook_detail_response'
|
|
76
|
+
require 'payzu-pix/models/sent_webhooks_quantity'
|
|
77
|
+
require 'payzu-pix/models/summary'
|
|
78
|
+
require 'payzu-pix/models/summary_block'
|
|
79
|
+
require 'payzu-pix/models/summary_block_grouped_inner'
|
|
80
|
+
require 'payzu-pix/models/summary_block_statuses'
|
|
81
|
+
require 'payzu-pix/models/summary_status'
|
|
82
|
+
require 'payzu-pix/models/transaction'
|
|
83
|
+
require 'payzu-pix/models/transaction_with_refunds'
|
|
84
|
+
require 'payzu-pix/models/webhook'
|
|
85
|
+
require 'payzu-pix/models/webhook_create_request'
|
|
86
|
+
require 'payzu-pix/models/webhook_event_type'
|
|
87
|
+
require 'payzu-pix/models/webhook_list_response'
|
|
88
|
+
require 'payzu-pix/models/webhook_update_request'
|
|
89
|
+
require 'payzu-pix/models/webhook_with_secret'
|
|
90
|
+
|
|
91
|
+
# APIs
|
|
92
|
+
require 'payzu-pix/api/account_api'
|
|
93
|
+
require 'payzu-pix/api/callbacks_api'
|
|
94
|
+
require 'payzu-pix/api/infractions_api'
|
|
95
|
+
require 'payzu-pix/api/internal_transfer_api'
|
|
96
|
+
require 'payzu-pix/api/keys_and_dict_api'
|
|
97
|
+
require 'payzu-pix/api/pix_operations_api'
|
|
98
|
+
require 'payzu-pix/api/refunds_api'
|
|
99
|
+
require 'payzu-pix/api/reports_api'
|
|
100
|
+
require 'payzu-pix/api/webhooks_api'
|
|
101
|
+
require 'payzu-pix/api/withdrawals_api'
|
|
102
|
+
|
|
103
|
+
module PayZuPix
|
|
104
|
+
class << self
|
|
105
|
+
# Customize default settings for the SDK using block.
|
|
106
|
+
# PayZuPix.configure do |config|
|
|
107
|
+
# config.username = "xxx"
|
|
108
|
+
# config.password = "xxx"
|
|
109
|
+
# end
|
|
110
|
+
# If no block given, return the default Configuration object.
|
|
111
|
+
def configure
|
|
112
|
+
if block_given?
|
|
113
|
+
yield(Configuration.default)
|
|
114
|
+
else
|
|
115
|
+
Configuration.default
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
data/payzu-pix.gemspec
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
|
|
3
|
+
=begin
|
|
4
|
+
#PayZu Pix API
|
|
5
|
+
|
|
6
|
+
#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
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.8.0
|
|
9
|
+
|
|
10
|
+
Generated by: https://openapi-generator.tech
|
|
11
|
+
Generator version: 7.22.0
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "payzu-pix/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "payzu-pix"
|
|
20
|
+
s.version = PayZuPix::VERSION
|
|
21
|
+
s.platform = Gem::Platform::RUBY
|
|
22
|
+
s.authors = ["PayZu"]
|
|
23
|
+
s.email = ["suporte@payzu.com.br"]
|
|
24
|
+
s.homepage = "https://docs.payzu.com.br"
|
|
25
|
+
s.summary = "SDK oficial Ruby da API PayZu Pix"
|
|
26
|
+
s.description = "SDK oficial Ruby da API PayZu Pix: depósitos, saques, transferências internas, infrações, relatórios e callbacks."
|
|
27
|
+
s.license = "MIT"
|
|
28
|
+
s.required_ruby_version = ">= 3.0"
|
|
29
|
+
s.metadata = {}
|
|
30
|
+
|
|
31
|
+
s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0'
|
|
32
|
+
s.add_runtime_dependency 'faraday-multipart'
|
|
33
|
+
s.add_runtime_dependency 'marcel'
|
|
34
|
+
|
|
35
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
36
|
+
|
|
37
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
38
|
+
s.test_files = `find spec/*`.split("\n")
|
|
39
|
+
s.executables = []
|
|
40
|
+
s.require_paths = ["lib"]
|
|
41
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
# load the gem
|
|
14
|
+
require 'payzu-pix'
|
|
15
|
+
|
|
16
|
+
# The following was generated by the `rspec --init` command. Conventionally, all
|
|
17
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
|
18
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
|
19
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
|
20
|
+
# files.
|
|
21
|
+
#
|
|
22
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
|
23
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
|
24
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
|
25
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
|
26
|
+
# a separate helper file that requires the additional dependencies and performs
|
|
27
|
+
# the additional setup, and require it from the spec files that actually need
|
|
28
|
+
# it.
|
|
29
|
+
#
|
|
30
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
|
31
|
+
# users commonly want.
|
|
32
|
+
#
|
|
33
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
|
34
|
+
RSpec.configure do |config|
|
|
35
|
+
# rspec-expectations config goes here. You can use an alternate
|
|
36
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
|
37
|
+
# assertions if you prefer.
|
|
38
|
+
config.expect_with :rspec do |expectations|
|
|
39
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
|
40
|
+
# and `failure_message` of custom matchers include text for helper methods
|
|
41
|
+
# defined using `chain`, e.g.:
|
|
42
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
|
43
|
+
# # => "be bigger than 2 and smaller than 4"
|
|
44
|
+
# ...rather than:
|
|
45
|
+
# # => "be bigger than 2"
|
|
46
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
|
50
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
|
51
|
+
config.mock_with :rspec do |mocks|
|
|
52
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
|
53
|
+
# a real object. This is generally recommended, and will default to
|
|
54
|
+
# `true` in RSpec 4.
|
|
55
|
+
mocks.verify_partial_doubles = true
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# The settings below are suggested to provide a good initial experience
|
|
59
|
+
# with RSpec, but feel free to customize to your heart's content.
|
|
60
|
+
=begin
|
|
61
|
+
# These two settings work together to allow you to limit a spec run
|
|
62
|
+
# to individual examples or groups you care about by tagging them with
|
|
63
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
|
64
|
+
# get run.
|
|
65
|
+
config.filter_run :focus
|
|
66
|
+
config.run_all_when_everything_filtered = true
|
|
67
|
+
|
|
68
|
+
# Allows RSpec to persist some state between runs in order to support
|
|
69
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
|
70
|
+
# you configure your source control system to ignore this file.
|
|
71
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
|
72
|
+
|
|
73
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
|
74
|
+
# recommended. For more details, see:
|
|
75
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
|
76
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
|
77
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
|
78
|
+
config.disable_monkey_patching!
|
|
79
|
+
|
|
80
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
|
81
|
+
# be too noisy due to issues in dependencies.
|
|
82
|
+
config.warnings = true
|
|
83
|
+
|
|
84
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
|
85
|
+
# file, and it's useful to allow more verbose output when running an
|
|
86
|
+
# individual spec file.
|
|
87
|
+
if config.files_to_run.one?
|
|
88
|
+
# Use the documentation formatter for detailed output,
|
|
89
|
+
# unless a formatter has already been configured
|
|
90
|
+
# (e.g. via a command-line flag).
|
|
91
|
+
config.default_formatter = 'doc'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Print the 10 slowest examples and example groups at the
|
|
95
|
+
# end of the spec run, to help surface which specs are running
|
|
96
|
+
# particularly slow.
|
|
97
|
+
config.profile_examples = 10
|
|
98
|
+
|
|
99
|
+
# Run specs in random order to surface order dependencies. If you find an
|
|
100
|
+
# order dependency and want to debug it, you can fix the order by providing
|
|
101
|
+
# the seed, which is printed after each run.
|
|
102
|
+
# --seed 1234
|
|
103
|
+
config.order = :random
|
|
104
|
+
|
|
105
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
|
106
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
|
107
|
+
# test failures related to randomization by passing the same `--seed` value
|
|
108
|
+
# as the one that triggered the failure.
|
|
109
|
+
Kernel.srand config.seed
|
|
110
|
+
=end
|
|
111
|
+
end
|