pagarme 2.0.2 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -2
- data/README.md +285 -4
- data/Rakefile +16 -19
- data/lib/pagarme.rb +17 -32
- data/lib/pagarme/core_ext.rb +9 -0
- data/lib/pagarme/errors.rb +39 -25
- data/lib/pagarme/model.rb +40 -45
- data/lib/pagarme/nested_model.rb +56 -0
- data/lib/pagarme/object.rb +133 -92
- data/lib/pagarme/request.rb +96 -46
- data/lib/pagarme/resources/address.rb +4 -0
- data/lib/pagarme/resources/antifraud_analysis.rb +4 -0
- data/lib/pagarme/resources/balance.rb +24 -0
- data/lib/pagarme/resources/balance_operation.rb +37 -0
- data/lib/pagarme/resources/bank_account.rb +4 -0
- data/lib/pagarme/resources/bulk_anticipation.rb +65 -0
- data/lib/pagarme/resources/card.rb +4 -0
- data/lib/pagarme/resources/company.rb +28 -0
- data/lib/pagarme/{customer.rb → resources/customer.rb} +0 -0
- data/lib/pagarme/resources/payable.rb +11 -0
- data/lib/pagarme/resources/phone.rb +4 -0
- data/lib/pagarme/{plan.rb → resources/plan.rb} +0 -2
- data/lib/pagarme/resources/postal_code.rb +15 -0
- data/lib/pagarme/resources/postback.rb +15 -0
- data/lib/pagarme/resources/recipient.rb +32 -0
- data/lib/pagarme/resources/split_rule.rb +4 -0
- data/lib/pagarme/resources/subscription.rb +43 -0
- data/lib/pagarme/resources/transaction.rb +41 -0
- data/lib/pagarme/{transfer.rb → resources/transfer.rb} +0 -3
- data/lib/pagarme/{phone.rb → resources/user.rb} +1 -1
- data/lib/pagarme/transaction_common.rb +39 -42
- data/lib/pagarme/version.rb +3 -0
- data/pagarme.gemspec +16 -13
- data/test/assertions.rb +195 -0
- data/test/fixtures.rb +222 -0
- data/test/pagarme/error_test.rb +13 -0
- data/test/pagarme/object_test.rb +19 -0
- data/test/pagarme/pagarme_test.rb +10 -0
- data/test/pagarme/resources/balance_test.rb +46 -0
- data/test/pagarme/resources/bank_account_test.rb +35 -0
- data/test/pagarme/resources/bulk_anticipation_test.rb +72 -0
- data/test/pagarme/resources/card_test.rb +22 -0
- data/test/pagarme/resources/payable_test.rb +30 -0
- data/test/pagarme/resources/plan_test.rb +57 -0
- data/test/pagarme/resources/postback_test.rb +18 -0
- data/test/pagarme/resources/recipient_test.rb +41 -0
- data/test/pagarme/resources/subscription_test.rb +100 -0
- data/test/pagarme/resources/transaction_test.rb +221 -0
- data/test/pagarme/resources/transfer_test.rb +23 -0
- data/test/pagarme/resources/zipcode_test.rb +15 -0
- data/test/test_helper.rb +52 -175
- metadata +102 -30
- data/lib/pagarme/address.rb +0 -4
- data/lib/pagarme/bank_account.rb +0 -9
- data/lib/pagarme/card.rb +0 -7
- data/lib/pagarme/subscription.rb +0 -43
- data/lib/pagarme/transaction.rb +0 -33
- data/lib/pagarme/util.rb +0 -78
- data/pagarme.rb +0 -12
- data/test/pagarme/bank_account.rb +0 -46
- data/test/pagarme/card.rb +0 -26
- data/test/pagarme/object.rb +0 -29
- data/test/pagarme/pagarme.rb +0 -10
- data/test/pagarme/plan.rb +0 -70
- data/test/pagarme/subscription.rb +0 -123
- data/test/pagarme/transaction.rb +0 -215
- data/test/pagarme/transfer.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 422b2f052212e6a80ab083f50e469ff2c42f7965
|
4
|
+
data.tar.gz: 0991a571bbf8c149abb4c7612d9f6f10174e8189
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b28c35d0ade1879e5ecd4665c16b0ba33625091630a81a8f014acb3f2122612d795420a3a265a58f64f353f5396e12905bd048234484699c81d7c339097f9fc1
|
7
|
+
data.tar.gz: be91ee795aeb90394646f378dbd82c8183c0d52e48c22f4197ff38c73b461efe56b58dcf71016857a726e969ed3015bd6a0b8c1de6be61c4c37d636fe714b44b
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,295 @@
|
|
1
|
-
|
1
|
+
# pagarme-ruby
|
2
|
+
[![Build Status](https://travis-ci.org/pagarme/pagarme-ruby.png)](https://travis-ci.org/pagarme/pagarme-ruby)
|
2
3
|
|
3
4
|
Pagar.me Ruby library
|
4
5
|
|
5
6
|
## Documentation
|
6
7
|
|
7
|
-
* [
|
8
|
+
* [Documentation](https://pagar.me/docs)
|
9
|
+
* [Full API Guide](https://docs.pagar.me/api)
|
8
10
|
|
9
|
-
##
|
11
|
+
## Getting Started
|
10
12
|
|
11
|
-
|
13
|
+
### Install
|
14
|
+
|
15
|
+
```shell
|
16
|
+
gem install pagarme
|
17
|
+
```
|
18
|
+
or add the following line to Gemfile:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
gem 'pagarme'
|
22
|
+
```
|
23
|
+
and run `bundle install` from your shell.
|
24
|
+
|
25
|
+
### Configure your API key
|
26
|
+
|
27
|
+
You can set your API key in Ruby:
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
PagarMe.api_key = 'YOUR_API_KEY_HERE'
|
31
|
+
```
|
32
|
+
|
33
|
+
or set the environment variable _PAGARME\_API\_KEY_ (**recommended**)
|
34
|
+
|
35
|
+
### Using Pagar.me Checkout
|
36
|
+
|
37
|
+
See our [demo checkout](https://pagar.me/checkout).
|
38
|
+
|
39
|
+
More about how to use it [here](https://docs.pagar.me/checkout).
|
40
|
+
|
41
|
+
### Transactions
|
42
|
+
|
43
|
+
#### Creating a Credit Card Transaction
|
44
|
+
|
45
|
+
To create a credit card transaction, you need a [card\_hash](https://docs.pagar.me/capturing-card-data).
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
PagarMe::Transaction.new(
|
49
|
+
amount: 1000, # in cents
|
50
|
+
card_hash: card_hash # how to get a card hash: docs.pagar.me/capturing-card-data
|
51
|
+
).charge
|
52
|
+
```
|
53
|
+
|
54
|
+
More about [Creating a Credit Card Transaction](https://docs.pagar.me/transactions/#realizando-uma-transacao-de-cartao-de-credito).
|
55
|
+
|
56
|
+
#### Creating a Boleto Transaction
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
transaction = PagarMe::Transaction.new(
|
60
|
+
amount: 1000, # in cents
|
61
|
+
payment_method: 'boleto'
|
62
|
+
)
|
63
|
+
transaction.charge
|
64
|
+
|
65
|
+
transaction.boleto_url # => boleto's URL
|
66
|
+
transaction.boleto_barcode # => boleto's barcode
|
67
|
+
```
|
68
|
+
|
69
|
+
More about [Creating a Boleto Transaction](https://docs.pagar.me/transactions/#realizando-uma-transacao-de-boleto-bancario).
|
70
|
+
|
71
|
+
#### Split Rules
|
72
|
+
|
73
|
+
With split rules, received amount could be splitted between more than one recipient.
|
74
|
+
For example, splitting equally a transaction:
|
75
|
+
|
76
|
+
```ruby
|
77
|
+
PagarMe::Transaction.new(
|
78
|
+
amount: 1000, # in cents
|
79
|
+
card_hash: card_hash, # how to get a card hash: docs.pagar.me/capturing-card-data
|
80
|
+
split\_rules: [
|
81
|
+
{ recipient_id: recipient_id_1, percentage: 50 },
|
82
|
+
{ recipient_id: recipient_id_2, percentage: 50 }
|
83
|
+
]
|
84
|
+
).charge
|
85
|
+
```
|
86
|
+
|
87
|
+
More about [Split Rules](https://docs.pagar.me/api/#regras-do-split).
|
88
|
+
|
89
|
+
### Plans & Subscriptions
|
90
|
+
|
91
|
+
You can use recurring charges, learn more [here](https://docs.pagar.me/plans-subscriptions).
|
92
|
+
|
93
|
+
It's important to understand the charges flow, learn more [here](https://docs.pagar.me/plans-subscriptions/#fluxo-de-cobranca)
|
94
|
+
|
95
|
+
#### Creating a Plan
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
PagarMe::Plan.new(
|
99
|
+
amount: 4990,
|
100
|
+
days: 30,
|
101
|
+
name: 'Gold Plan'
|
102
|
+
).create
|
103
|
+
```
|
104
|
+
|
105
|
+
More about [Creating a Plan](https://docs.pagar.me/plans-subscriptions/#criando-um-plano).
|
106
|
+
|
107
|
+
#### Creating a Subscription
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
PagarMe::Subscription.new(
|
111
|
+
plan: PagarMe::Plan.find_by_id('1234'),
|
112
|
+
card_hash: card_hash,
|
113
|
+
customer: { email: 'customer_email@pagar.me' }
|
114
|
+
).create
|
115
|
+
```
|
116
|
+
|
117
|
+
More about [Creating a Subscription](https://docs.pagar.me/plans-subscriptions/#criando-uma-assinatura).
|
118
|
+
|
119
|
+
### Recipients
|
120
|
+
|
121
|
+
#### Creating a Recipient
|
122
|
+
|
123
|
+
To create a recipient, so it can receive payments through split rules or transfers:
|
124
|
+
|
125
|
+
```ruby
|
126
|
+
PagarMe::Recipient.create(
|
127
|
+
bank_account: {
|
128
|
+
bank_code: '237',
|
129
|
+
agencia: '1935',
|
130
|
+
agencia_dv: '9',
|
131
|
+
conta: '23398',
|
132
|
+
conta_dv: '9',
|
133
|
+
legal_name: 'Fulano da Silva',
|
134
|
+
document_number: '00000000000000' # CPF or CNPJ
|
135
|
+
},
|
136
|
+
transfer_enabled: false
|
137
|
+
)
|
138
|
+
```
|
139
|
+
|
140
|
+
More about [Creating a Recipient](https://docs.pagar.me/api/#recebedores).
|
141
|
+
|
142
|
+
#### Transfer Available Amout to Bank Account Manually
|
143
|
+
|
144
|
+
This is only needed if _transfer\_enabled_ is set to false. If set to true,
|
145
|
+
_transfer\_interval_ and _transfer\_day_ will handle it automatically.
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
PagarMe::Recipient.find(recipient_id).receive amount
|
149
|
+
```
|
150
|
+
|
151
|
+
### Balance And Balance Operations
|
152
|
+
|
153
|
+
#### Checking Balance
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
balance = PagarMe::Balance.balance
|
157
|
+
balance.waiting_funds.amount # money to be received in your account
|
158
|
+
balance.available.amount # in your pagarme account
|
159
|
+
balance.transferred.amount # transferred to your bank account
|
160
|
+
```
|
161
|
+
|
162
|
+
Just that!
|
163
|
+
|
164
|
+
More about [Balance](https://docs.pagar.me/api/#saldo)
|
165
|
+
|
166
|
+
#### Checking Balance Operations
|
167
|
+
|
168
|
+
To access the history of balance operations:
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
PagarMe::BalanceOperation.balance_operations
|
172
|
+
```
|
173
|
+
|
174
|
+
Paginating:
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
PagarMe::BalanceOperation.balance_operations 2, 50 # second page, 50 per page
|
178
|
+
```
|
179
|
+
|
180
|
+
More about [Balance Operations](https://docs.pagar.me/api/#operacoes-de-saldo)
|
181
|
+
|
182
|
+
#### Checking Recipient Balance
|
183
|
+
|
184
|
+
```ruby
|
185
|
+
balance = PagarMe::Recipient.find(recipient_id).balance
|
186
|
+
balance.waiting_funds.amount # money to be received in his account
|
187
|
+
balance.available.amount # in his pagarme account
|
188
|
+
balance.transferred.amount # transferred to his bank account
|
189
|
+
```
|
190
|
+
|
191
|
+
Just that!
|
192
|
+
|
193
|
+
More about [Recipient Balance](https://docs.pagar.me/api/#saldo-de-um-recebedor)
|
194
|
+
|
195
|
+
#### Checking Recipient Balance Operations
|
196
|
+
|
197
|
+
To access the history of balance operations:
|
198
|
+
|
199
|
+
```ruby
|
200
|
+
PagarMe::Recipient.find(recipient_id).balance_operations
|
201
|
+
```
|
202
|
+
|
203
|
+
Paginating:
|
204
|
+
|
205
|
+
```ruby
|
206
|
+
PagarMe::Recipient.find(recipient_id).balance_operations 2, 50 # second page, 50 per page
|
207
|
+
```
|
208
|
+
|
209
|
+
More about [Recipient Balance Operations](https://docs.pagar.me/api/#operacoes-de-saldo-de-um-recebedor)
|
210
|
+
|
211
|
+
### Request Bulk Anticipation
|
212
|
+
|
213
|
+
#### Checking limits
|
214
|
+
|
215
|
+
```ruby
|
216
|
+
PagarMe::Recipient.default.bulk_anticipations_limits
|
217
|
+
```
|
218
|
+
|
219
|
+
More about [Checking Bulk Anticipation Limits](https://docs.pagar.me/api/#obtendo-os-limites-de-antecipacao)
|
220
|
+
|
221
|
+
#### Requesting Bulk Anticipation
|
222
|
+
|
223
|
+
```ruby
|
224
|
+
PagarMe::Recipient.default.bulk_anticipate(
|
225
|
+
timeframe: :start,
|
226
|
+
payment_date: Date.new(2016, 12, 25),
|
227
|
+
requested_amount: 10000 # in cents
|
228
|
+
)
|
229
|
+
```
|
230
|
+
|
231
|
+
More about [Requesting Bulk Anticipation](https://docs.pagar.me/api/#criando-uma-antecipacao)
|
232
|
+
|
233
|
+
#### Getting Bulk Anticipation
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
PagarMe::BulkAnticipation.all page, count
|
237
|
+
```
|
238
|
+
|
239
|
+
More about [Getting Bulk Anticipation](https://docs.pagar.me/api/#retornando-todas-as-antecipacoes)
|
240
|
+
|
241
|
+
### Payables
|
242
|
+
|
243
|
+
### Getting Payable
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
PagarMe::Payable.find 'payable_id'
|
247
|
+
```
|
248
|
+
|
249
|
+
More about [Getting Payable](https://docs.pagar.me/api/#retornando-um-recebivel)
|
250
|
+
|
251
|
+
#### Querying Payables
|
252
|
+
|
253
|
+
```ruby
|
254
|
+
PagarMe::Payable.all page, count
|
255
|
+
```
|
256
|
+
|
257
|
+
```ruby
|
258
|
+
PagarMe::Payable.find_by status: 'paid'
|
259
|
+
```
|
260
|
+
|
261
|
+
More about [Querying Payables](https://docs.pagar.me/api/#retornando-recebiveis)
|
262
|
+
|
263
|
+
#### Querying Payables by Transaction
|
264
|
+
|
265
|
+
```ruby
|
266
|
+
transaction = PagarMe::Transaction.find 'transaction_id'
|
267
|
+
transaction.payables
|
268
|
+
```
|
269
|
+
|
270
|
+
More about [Payable Transactions](https://docs.pagar.me/api/#retornando-pagamentos-da-transacao)
|
271
|
+
|
272
|
+
### Undocumented Features
|
273
|
+
|
274
|
+
This gem is stable, but in constant development.
|
275
|
+
|
276
|
+
This README is just a quick abstract of it's main features.
|
277
|
+
|
278
|
+
You can easily browse it's source code to see all [supported resources](https://github.com/pagarme/pagarme-ruby/tree/master/lib/pagarme/resources).
|
279
|
+
|
280
|
+
We will document everything while adding support to all resources listed in
|
281
|
+
[Full API Guide](https://docs.pagar.me/api).
|
282
|
+
|
283
|
+
Feel free to help us to add support to features sending pull requests.
|
284
|
+
|
285
|
+
Thanks!
|
286
|
+
|
287
|
+
### TODO
|
288
|
+
|
289
|
+
Add support to [ElasticSearch Query DSL](https://docs.pagar.me/api/#buscas-avancadas),
|
290
|
+
so you can search your data optimally.
|
291
|
+
|
292
|
+
And document all the source code.
|
12
293
|
|
13
294
|
## License
|
14
295
|
|
data/Rakefile
CHANGED
@@ -1,24 +1,21 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
2
3
|
|
3
|
-
|
4
|
+
Rake::TestTask.new :test do |t|
|
5
|
+
t.libs << 'test'
|
6
|
+
t.libs << 'lib'
|
7
|
+
t.test_files = FileList['test/pagarme/**/*_test.rb']
|
8
|
+
end
|
4
9
|
|
5
|
-
task :
|
6
|
-
ret = true
|
7
|
-
test_file = args[:test_file]
|
10
|
+
task :default => :test
|
8
11
|
|
9
|
-
|
10
|
-
|
11
|
-
ret = ret && ruby(f, '')
|
12
|
-
else
|
13
|
-
Dir["test/**/*.rb"].each do |f|
|
14
|
-
ret = ret && ruby(f, '')
|
15
|
-
end
|
16
|
-
end
|
12
|
+
task :clean_vcr do
|
13
|
+
sh 'rm -rf test/vcr_cassettes'
|
17
14
|
end
|
18
15
|
|
19
|
-
task :all do
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
16
|
+
# task :all do
|
17
|
+
# Rake::Task['test'].invoke
|
18
|
+
# require 'active_support/all'
|
19
|
+
# Rake::Task['test'].reenable
|
20
|
+
# Rake::Task['test'].invoke
|
21
|
+
# end
|
data/lib/pagarme.rb
CHANGED
@@ -1,46 +1,31 @@
|
|
1
|
+
require 'set'
|
2
|
+
require 'time'
|
1
3
|
require 'digest/sha1'
|
4
|
+
|
5
|
+
require_relative 'pagarme/version'
|
6
|
+
require_relative 'pagarme/core_ext'
|
2
7
|
require_relative 'pagarme/object'
|
3
|
-
require_relative 'pagarme/util'
|
4
8
|
require_relative 'pagarme/model'
|
9
|
+
require_relative 'pagarme/nested_model'
|
5
10
|
require_relative 'pagarme/transaction_common'
|
6
|
-
require_relative 'pagarme/customer'
|
7
|
-
require_relative 'pagarme/phone'
|
8
|
-
require_relative 'pagarme/address'
|
9
|
-
require_relative 'pagarme/subscription'
|
10
|
-
require_relative 'pagarme/transaction'
|
11
|
-
require_relative 'pagarme/transfer'
|
12
|
-
require_relative 'pagarme/card'
|
13
|
-
require_relative 'pagarme/plan'
|
14
|
-
require_relative 'pagarme/bank_account'
|
15
11
|
require_relative 'pagarme/request'
|
16
12
|
require_relative 'pagarme/errors'
|
17
13
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@@live = true
|
22
|
-
|
23
|
-
def self.api_endpoint=(api_endpoint)
|
24
|
-
@@api_endpoint = api_endpoint
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.api_endpoint
|
28
|
-
@@api_endpoint
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.api_key=(api_key)
|
32
|
-
@@api_key = api_key
|
33
|
-
end
|
14
|
+
Dir[File.expand_path('../pagarme/resources/*.rb', __FILE__)].map do |path|
|
15
|
+
require path
|
16
|
+
end
|
34
17
|
|
35
|
-
|
36
|
-
|
18
|
+
module PagarMe
|
19
|
+
class << self
|
20
|
+
attr_accessor :api_endpoint, :open_timeout, :timeout, :api_key
|
37
21
|
end
|
38
22
|
|
39
|
-
|
40
|
-
|
41
|
-
|
23
|
+
self.api_endpoint = 'https://api.pagar.me/1'
|
24
|
+
self.open_timeout = 30
|
25
|
+
self.timeout = 90
|
26
|
+
self.api_key = ENV['PAGARME_API_KEY']
|
42
27
|
|
43
28
|
def self.validate_fingerprint(id, fingerprint)
|
44
|
-
|
29
|
+
PagarMe::Postback.validate id, fingerprint
|
45
30
|
end
|
46
31
|
end
|
data/lib/pagarme/errors.rb
CHANGED
@@ -1,41 +1,55 @@
|
|
1
1
|
module PagarMe
|
2
2
|
class PagarMeError < StandardError
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
self.type = type
|
12
|
-
self.parameter_name = parameter_name
|
13
|
-
self.errors = []
|
3
|
+
end
|
4
|
+
|
5
|
+
class ConnectionError < PagarMeError
|
6
|
+
attr_reader :error
|
7
|
+
|
8
|
+
def initialize(error)
|
9
|
+
@error = error
|
10
|
+
super error.message
|
14
11
|
end
|
12
|
+
end
|
15
13
|
|
16
|
-
|
17
|
-
|
14
|
+
class RequestError < PagarMeError
|
15
|
+
end
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
object.errors << PagarMeError.new(error['message'], error['parameter_name'], error['type'], response['url'])
|
22
|
-
end
|
17
|
+
class ResponseError < PagarMeError
|
18
|
+
attr_reader :request_params, :error
|
23
19
|
|
24
|
-
|
20
|
+
def initialize(request_params, error)
|
21
|
+
@request_params, @error = request_params, error
|
22
|
+
super @error.message
|
25
23
|
end
|
24
|
+
end
|
26
25
|
|
27
|
-
|
28
|
-
|
26
|
+
class NotFound < ResponseError
|
27
|
+
attr_reader :response
|
28
|
+
def initialize(response, request_params, error)
|
29
|
+
@response = response
|
30
|
+
super request_params, error
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
32
|
-
class
|
33
|
-
|
34
|
+
class ValidationError < PagarMeError
|
35
|
+
attr_reader :response, :errors
|
34
36
|
|
35
|
-
|
37
|
+
def initialize(response)
|
38
|
+
@response = response
|
39
|
+
@errors = response['errors'].map do |error|
|
40
|
+
params = error.values_at('message', 'parameter_name', 'type', 'url')
|
41
|
+
ParamError.new *params
|
42
|
+
end
|
43
|
+
super @errors.map(&:message).join(', ')
|
44
|
+
end
|
36
45
|
end
|
37
46
|
|
38
|
-
class
|
47
|
+
class ParamError < PagarMeError
|
48
|
+
attr_reader :parameter_name, :type, :url
|
49
|
+
|
50
|
+
def initialize(message, parameter_name, type, url)
|
51
|
+
@parameter_name, @type, @url = parameter_name, type, url
|
52
|
+
super message
|
53
|
+
end
|
39
54
|
end
|
40
55
|
end
|
41
|
-
|