mercadopago-sdk 1.2.0 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +10 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
- data/.github/workflows/ruby.yml +35 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +104 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CODING_GUIDELINES.md +70 -0
- data/CONTRIBUTING.md +57 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +51 -12
- data/LICENSE.txt +21 -0
- data/README.md +45 -117
- data/Rakefile +3 -1
- data/docs/CODE_OF_CONDUCT_md.html +154 -0
- data/docs/CODING_GUIDELINES_md.html +188 -0
- data/docs/CONTRIBUTING_md.html +165 -0
- data/docs/LICENSE_txt.html +96 -0
- data/docs/Mercadopago/AdvancedPayment.html +279 -0
- data/docs/Mercadopago/Card.html +204 -0
- data/docs/Mercadopago/CardToken.html +160 -0
- data/docs/Mercadopago/Config.html +266 -0
- data/docs/Mercadopago/Customer.html +228 -0
- data/docs/Mercadopago/DisbursementRefund.html +183 -0
- data/docs/Mercadopago/HttpClient.html +249 -0
- data/docs/Mercadopago/IdentificationType.html +136 -0
- data/docs/Mercadopago/MPBase.html +316 -0
- data/docs/Mercadopago/MerchantOrder.html +209 -0
- data/docs/Mercadopago/Payment.html +208 -0
- data/docs/Mercadopago/PaymentMethods.html +136 -0
- data/docs/Mercadopago/Preference.html +184 -0
- data/docs/Mercadopago/Refund.html +160 -0
- data/docs/Mercadopago/RequestOptions.html +433 -0
- data/docs/Mercadopago/SDK.html +528 -0
- data/docs/Mercadopago/User.html +136 -0
- data/docs/Mercadopago.html +123 -0
- data/docs/README_md.html +181 -0
- data/docs/created.rid +25 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +619 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +109 -0
- data/docs/js/darkfish.js +84 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/table_of_contents.html +562 -0
- data/lib/mercadopago/config/config.rb +42 -0
- data/lib/mercadopago/config/request_options.rb +85 -0
- data/lib/mercadopago/core/mp_base.rb +77 -0
- data/lib/mercadopago/http/http_client.rb +74 -0
- data/lib/mercadopago/resources/advanced_payment.rb +48 -0
- data/lib/mercadopago/resources/card.rb +31 -0
- data/lib/mercadopago/resources/card_token.rb +19 -0
- data/lib/mercadopago/resources/customer.rb +36 -0
- data/lib/mercadopago/resources/disbursement_refund.rb +24 -0
- data/lib/mercadopago/resources/identification_type.rb +13 -0
- data/lib/mercadopago/resources/merchant_order.rb +32 -0
- data/lib/mercadopago/resources/payment.rb +35 -0
- data/lib/mercadopago/resources/payment_methods.rb +13 -0
- data/lib/mercadopago/resources/preference.rb +26 -0
- data/lib/mercadopago/resources/refund.rb +24 -0
- data/lib/mercadopago/resources/user.rb +13 -0
- data/lib/mercadopago/sdk.rb +85 -0
- data/lib/mercadopago.rb +24 -389
- data/mercadopago.gemspec +15 -15
- data/tests/test_card.rb +78 -0
- data/tests/test_card_token.rb +39 -0
- data/tests/test_customer.rb +54 -0
- data/tests/test_identification_type.rb +16 -0
- data/tests/test_merchant_order.rb +94 -0
- data/tests/test_payment.rb +102 -0
- data/tests/test_payment_methods.rb +14 -0
- data/tests/test_preference.rb +49 -0
- data/tests/test_refund.rb +88 -0
- data/tests/test_refund_with_custom_headers.rb +97 -0
- data/tests/test_user.rb +17 -0
- data/tests/tests.rb +13 -56
- metadata +155 -36
- data/.travis.yml +0 -14
- data/examples/checkout-buttons/basic_preference/button.rb +0 -28
- data/examples/instant-payment-notifications/receive-ipn.rb +0 -25
- data/examples/payment-search/search-approved-payments.rb +0 -23
- data/examples/payment-search/search-creditcard-payments.rb +0 -23
- data/examples/payment-search/search-funded-payments-by-name.rb +0 -23
- data/examples/payment-search/search-payments-from-email-and-date.rb +0 -23
- data/examples/payment-search/search-payments.rb +0 -23
- data/examples/preapproval-payments/button.rb +0 -42
- data/lib/ssl_options_patch.rb +0 -15
- data/lib/version.rb +0 -2
- data/travis_Gemfile +0 -4
@@ -0,0 +1,562 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>Table of Contents - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
var index_rel_prefix = "./";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="./js/navigation.js" defer></script>
|
15
|
+
<script src="./js/search.js" defer></script>
|
16
|
+
<script src="./js/search_index.js" defer></script>
|
17
|
+
<script src="./js/searcher.js" defer></script>
|
18
|
+
<script src="./js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" class="table-of-contents">
|
25
|
+
<main role="main">
|
26
|
+
<h1 class="class">Table of Contents - RDoc Documentation</h1>
|
27
|
+
|
28
|
+
<h2 id="pages">Pages</h2>
|
29
|
+
<ul>
|
30
|
+
<li class="file">
|
31
|
+
<a href="CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
32
|
+
|
33
|
+
<ul>
|
34
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Contributor+Covenant+Code+of+Conduct">Contributor Covenant Code of Conduct</a>
|
35
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Our+Pledge">Our Pledge</a>
|
36
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Our+Standards">Our Standards</a>
|
37
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Our+Responsibilities">Our Responsibilities</a>
|
38
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Scope">Scope</a>
|
39
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Enforcement">Enforcement</a>
|
40
|
+
<li><a href="CODE_OF_CONDUCT_md.html#label-Attribution">Attribution</a>
|
41
|
+
</ul>
|
42
|
+
</li>
|
43
|
+
<li class="file">
|
44
|
+
<a href="CODING_GUIDELINES_md.html">CODING_GUIDELINES</a>
|
45
|
+
|
46
|
+
<ul>
|
47
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Coding+Guidelines">Coding Guidelines</a>
|
48
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Language+Guidelines">Language Guidelines</a>
|
49
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Code+Guidelines">Code Guidelines</a>
|
50
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Comment+Guidelines">Comment Guidelines</a>
|
51
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Branching+Guidelines">Branching Guidelines</a>
|
52
|
+
<li><a href="CODING_GUIDELINES_md.html#label-Git+Guidelines">Git Guidelines</a>
|
53
|
+
</ul>
|
54
|
+
</li>
|
55
|
+
<li class="file">
|
56
|
+
<a href="CONTRIBUTING_md.html">CONTRIBUTING</a>
|
57
|
+
|
58
|
+
<ul>
|
59
|
+
<li><a href="CONTRIBUTING_md.html#label-Contributing+to+the+Mercado+Pago+Ruby+SDK">Contributing to the Mercado Pago Ruby SDK</a>
|
60
|
+
<li><a href="CONTRIBUTING_md.html#label-How+to+contribute">How to contribute</a>
|
61
|
+
<li><a href="CONTRIBUTING_md.html#label-Coding+Guidance">Coding Guidance</a>
|
62
|
+
<li><a href="CONTRIBUTING_md.html#label-Request+For+Change+-2F+Feature+Request">Request For Change / Feature Request</a>
|
63
|
+
<li><a href="CONTRIBUTING_md.html#label-Bug+Reports">Bug Reports</a>
|
64
|
+
<li><a href="CONTRIBUTING_md.html#label-Pull+Request">Pull Request</a>
|
65
|
+
</ul>
|
66
|
+
</li>
|
67
|
+
<li class="file">
|
68
|
+
<a href="LICENSE_txt.html">LICENSE</a>
|
69
|
+
</li>
|
70
|
+
<li class="file">
|
71
|
+
<a href="README_md.html">README</a>
|
72
|
+
|
73
|
+
<ul>
|
74
|
+
<li><a href="README_md.html#label-Mercado+Pago+SDK+for+Ruby">Mercado Pago SDK for Ruby</a>
|
75
|
+
<li><a href="README_md.html#label-F0-9F-92-A1+Requirements">💡 Requirements</a>
|
76
|
+
<li><a href="README_md.html#label-F0-9F-93-B2+Installation">📲 Installation</a>
|
77
|
+
<li><a href="README_md.html#label-F0-9F-8C-9F+Getting+Started">🌟 Getting Started</a>
|
78
|
+
<li><a href="README_md.html#label-Simple+usage">Simple usage</a>
|
79
|
+
<li><a href="README_md.html#label-Per-request+configuration">Per-request configuration</a>
|
80
|
+
<li><a href="README_md.html#label-F0-9F-93-9A+Documentation">📚 Documentation</a>
|
81
|
+
<li><a href="README_md.html#label-F0-9F-A4-9D+Contributing">🤝 Contributing</a>
|
82
|
+
<li><a href="README_md.html#label-E2-9D-A4-EF-B8-8F+Support">❤️ Support</a>
|
83
|
+
<li><a href="README_md.html#label-F0-9F-8F-BB+License">🏻 License</a>
|
84
|
+
</ul>
|
85
|
+
</li>
|
86
|
+
</ul>
|
87
|
+
|
88
|
+
<h2 id="classes">Classes and Modules</h2>
|
89
|
+
<ul>
|
90
|
+
<li class="module">
|
91
|
+
<a href="Mercadopago.html">Mercadopago</a>
|
92
|
+
</li>
|
93
|
+
<li class="class">
|
94
|
+
<a href="Mercadopago/AdvancedPayment.html">Mercadopago::AdvancedPayment</a>
|
95
|
+
</li>
|
96
|
+
<li class="class">
|
97
|
+
<a href="Mercadopago/Card.html">Mercadopago::Card</a>
|
98
|
+
</li>
|
99
|
+
<li class="class">
|
100
|
+
<a href="Mercadopago/CardToken.html">Mercadopago::CardToken</a>
|
101
|
+
</li>
|
102
|
+
<li class="class">
|
103
|
+
<a href="Mercadopago/Config.html">Mercadopago::Config</a>
|
104
|
+
</li>
|
105
|
+
<li class="class">
|
106
|
+
<a href="Mercadopago/Customer.html">Mercadopago::Customer</a>
|
107
|
+
</li>
|
108
|
+
<li class="class">
|
109
|
+
<a href="Mercadopago/DisbursementRefund.html">Mercadopago::DisbursementRefund</a>
|
110
|
+
</li>
|
111
|
+
<li class="class">
|
112
|
+
<a href="Mercadopago/HttpClient.html">Mercadopago::HttpClient</a>
|
113
|
+
</li>
|
114
|
+
<li class="class">
|
115
|
+
<a href="Mercadopago/IdentificationType.html">Mercadopago::IdentificationType</a>
|
116
|
+
</li>
|
117
|
+
<li class="class">
|
118
|
+
<a href="Mercadopago/MPBase.html">Mercadopago::MPBase</a>
|
119
|
+
</li>
|
120
|
+
<li class="class">
|
121
|
+
<a href="Mercadopago/MerchantOrder.html">Mercadopago::MerchantOrder</a>
|
122
|
+
</li>
|
123
|
+
<li class="class">
|
124
|
+
<a href="Mercadopago/Payment.html">Mercadopago::Payment</a>
|
125
|
+
</li>
|
126
|
+
<li class="class">
|
127
|
+
<a href="Mercadopago/PaymentMethods.html">Mercadopago::PaymentMethods</a>
|
128
|
+
</li>
|
129
|
+
<li class="class">
|
130
|
+
<a href="Mercadopago/Preference.html">Mercadopago::Preference</a>
|
131
|
+
</li>
|
132
|
+
<li class="class">
|
133
|
+
<a href="Mercadopago/Refund.html">Mercadopago::Refund</a>
|
134
|
+
</li>
|
135
|
+
<li class="class">
|
136
|
+
<a href="Mercadopago/RequestOptions.html">Mercadopago::RequestOptions</a>
|
137
|
+
</li>
|
138
|
+
<li class="class">
|
139
|
+
<a href="Mercadopago/SDK.html">Mercadopago::SDK</a>
|
140
|
+
</li>
|
141
|
+
<li class="class">
|
142
|
+
<a href="Mercadopago/User.html">Mercadopago::User</a>
|
143
|
+
</li>
|
144
|
+
</ul>
|
145
|
+
|
146
|
+
<h2 id="methods">Methods</h2>
|
147
|
+
<ul>
|
148
|
+
|
149
|
+
<li class="method">
|
150
|
+
<a href="Mercadopago/RequestOptions.html#method-c-new">::new</a>
|
151
|
+
—
|
152
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
153
|
+
|
154
|
+
<li class="method">
|
155
|
+
<a href="Mercadopago/MPBase.html#method-c-new">::new</a>
|
156
|
+
—
|
157
|
+
<span class="container">Mercadopago::MPBase</span>
|
158
|
+
|
159
|
+
<li class="method">
|
160
|
+
<a href="Mercadopago/SDK.html#method-c-new">::new</a>
|
161
|
+
—
|
162
|
+
<span class="container">Mercadopago::SDK</span>
|
163
|
+
|
164
|
+
<li class="method">
|
165
|
+
<a href="Mercadopago/MPBase.html#method-i-_check_headers">#_check_headers</a>
|
166
|
+
—
|
167
|
+
<span class="container">Mercadopago::MPBase</span>
|
168
|
+
|
169
|
+
<li class="method">
|
170
|
+
<a href="Mercadopago/MPBase.html#method-i-_check_request_options">#_check_request_options</a>
|
171
|
+
—
|
172
|
+
<span class="container">Mercadopago::MPBase</span>
|
173
|
+
|
174
|
+
<li class="method">
|
175
|
+
<a href="Mercadopago/MPBase.html#method-i-_delete">#_delete</a>
|
176
|
+
—
|
177
|
+
<span class="container">Mercadopago::MPBase</span>
|
178
|
+
|
179
|
+
<li class="method">
|
180
|
+
<a href="Mercadopago/MPBase.html#method-i-_get">#_get</a>
|
181
|
+
—
|
182
|
+
<span class="container">Mercadopago::MPBase</span>
|
183
|
+
|
184
|
+
<li class="method">
|
185
|
+
<a href="Mercadopago/MPBase.html#method-i-_post">#_post</a>
|
186
|
+
—
|
187
|
+
<span class="container">Mercadopago::MPBase</span>
|
188
|
+
|
189
|
+
<li class="method">
|
190
|
+
<a href="Mercadopago/MPBase.html#method-i-_put">#_put</a>
|
191
|
+
—
|
192
|
+
<span class="container">Mercadopago::MPBase</span>
|
193
|
+
|
194
|
+
<li class="method">
|
195
|
+
<a href="Mercadopago/RequestOptions.html#method-i-access_token-3D">#access_token=</a>
|
196
|
+
—
|
197
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
198
|
+
|
199
|
+
<li class="method">
|
200
|
+
<a href="Mercadopago/SDK.html#method-i-access_token-3D">#access_token=</a>
|
201
|
+
—
|
202
|
+
<span class="container">Mercadopago::SDK</span>
|
203
|
+
|
204
|
+
<li class="method">
|
205
|
+
<a href="Mercadopago/SDK.html#method-i-advanced_payment">#advanced_payment</a>
|
206
|
+
—
|
207
|
+
<span class="container">Mercadopago::SDK</span>
|
208
|
+
|
209
|
+
<li class="method">
|
210
|
+
<a href="Mercadopago/Config.html#method-i-api_base_url">#api_base_url</a>
|
211
|
+
—
|
212
|
+
<span class="container">Mercadopago::Config</span>
|
213
|
+
|
214
|
+
<li class="method">
|
215
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-cancel">#cancel</a>
|
216
|
+
—
|
217
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
218
|
+
|
219
|
+
<li class="method">
|
220
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-capture">#capture</a>
|
221
|
+
—
|
222
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
223
|
+
|
224
|
+
<li class="method">
|
225
|
+
<a href="Mercadopago/SDK.html#method-i-card">#card</a>
|
226
|
+
—
|
227
|
+
<span class="container">Mercadopago::SDK</span>
|
228
|
+
|
229
|
+
<li class="method">
|
230
|
+
<a href="Mercadopago/SDK.html#method-i-card_token">#card_token</a>
|
231
|
+
—
|
232
|
+
<span class="container">Mercadopago::SDK</span>
|
233
|
+
|
234
|
+
<li class="method">
|
235
|
+
<a href="Mercadopago/RequestOptions.html#method-i-connection_timeout-3D">#connection_timeout=</a>
|
236
|
+
—
|
237
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
238
|
+
|
239
|
+
<li class="method">
|
240
|
+
<a href="Mercadopago/RequestOptions.html#method-i-corporation_id-3D">#corporation_id=</a>
|
241
|
+
—
|
242
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
243
|
+
|
244
|
+
<li class="method">
|
245
|
+
<a href="Mercadopago/Card.html#method-i-create">#create</a>
|
246
|
+
—
|
247
|
+
<span class="container">Mercadopago::Card</span>
|
248
|
+
|
249
|
+
<li class="method">
|
250
|
+
<a href="Mercadopago/Customer.html#method-i-create">#create</a>
|
251
|
+
—
|
252
|
+
<span class="container">Mercadopago::Customer</span>
|
253
|
+
|
254
|
+
<li class="method">
|
255
|
+
<a href="Mercadopago/CardToken.html#method-i-create">#create</a>
|
256
|
+
—
|
257
|
+
<span class="container">Mercadopago::CardToken</span>
|
258
|
+
|
259
|
+
<li class="method">
|
260
|
+
<a href="Mercadopago/Refund.html#method-i-create">#create</a>
|
261
|
+
—
|
262
|
+
<span class="container">Mercadopago::Refund</span>
|
263
|
+
|
264
|
+
<li class="method">
|
265
|
+
<a href="Mercadopago/Preference.html#method-i-create">#create</a>
|
266
|
+
—
|
267
|
+
<span class="container">Mercadopago::Preference</span>
|
268
|
+
|
269
|
+
<li class="method">
|
270
|
+
<a href="Mercadopago/Payment.html#method-i-create">#create</a>
|
271
|
+
—
|
272
|
+
<span class="container">Mercadopago::Payment</span>
|
273
|
+
|
274
|
+
<li class="method">
|
275
|
+
<a href="Mercadopago/MerchantOrder.html#method-i-create">#create</a>
|
276
|
+
—
|
277
|
+
<span class="container">Mercadopago::MerchantOrder</span>
|
278
|
+
|
279
|
+
<li class="method">
|
280
|
+
<a href="Mercadopago/DisbursementRefund.html#method-i-create">#create</a>
|
281
|
+
—
|
282
|
+
<span class="container">Mercadopago::DisbursementRefund</span>
|
283
|
+
|
284
|
+
<li class="method">
|
285
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-create">#create</a>
|
286
|
+
—
|
287
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
288
|
+
|
289
|
+
<li class="method">
|
290
|
+
<a href="Mercadopago/DisbursementRefund.html#method-i-create_all">#create_all</a>
|
291
|
+
—
|
292
|
+
<span class="container">Mercadopago::DisbursementRefund</span>
|
293
|
+
|
294
|
+
<li class="method">
|
295
|
+
<a href="Mercadopago/RequestOptions.html#method-i-custom_headers-3D">#custom_headers=</a>
|
296
|
+
—
|
297
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
298
|
+
|
299
|
+
<li class="method">
|
300
|
+
<a href="Mercadopago/SDK.html#method-i-customer">#customer</a>
|
301
|
+
—
|
302
|
+
<span class="container">Mercadopago::SDK</span>
|
303
|
+
|
304
|
+
<li class="method">
|
305
|
+
<a href="Mercadopago/Card.html#method-i-delete">#delete</a>
|
306
|
+
—
|
307
|
+
<span class="container">Mercadopago::Card</span>
|
308
|
+
|
309
|
+
<li class="method">
|
310
|
+
<a href="Mercadopago/HttpClient.html#method-i-delete">#delete</a>
|
311
|
+
—
|
312
|
+
<span class="container">Mercadopago::HttpClient</span>
|
313
|
+
|
314
|
+
<li class="method">
|
315
|
+
<a href="Mercadopago/Customer.html#method-i-delete">#delete</a>
|
316
|
+
—
|
317
|
+
<span class="container">Mercadopago::Customer</span>
|
318
|
+
|
319
|
+
<li class="method">
|
320
|
+
<a href="Mercadopago/SDK.html#method-i-disbursement_refund">#disbursement_refund</a>
|
321
|
+
—
|
322
|
+
<span class="container">Mercadopago::SDK</span>
|
323
|
+
|
324
|
+
<li class="method">
|
325
|
+
<a href="Mercadopago/MerchantOrder.html#method-i-get">#get</a>
|
326
|
+
—
|
327
|
+
<span class="container">Mercadopago::MerchantOrder</span>
|
328
|
+
|
329
|
+
<li class="method">
|
330
|
+
<a href="Mercadopago/HttpClient.html#method-i-get">#get</a>
|
331
|
+
—
|
332
|
+
<span class="container">Mercadopago::HttpClient</span>
|
333
|
+
|
334
|
+
<li class="method">
|
335
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-get">#get</a>
|
336
|
+
—
|
337
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
338
|
+
|
339
|
+
<li class="method">
|
340
|
+
<a href="Mercadopago/Card.html#method-i-get">#get</a>
|
341
|
+
—
|
342
|
+
<span class="container">Mercadopago::Card</span>
|
343
|
+
|
344
|
+
<li class="method">
|
345
|
+
<a href="Mercadopago/CardToken.html#method-i-get">#get</a>
|
346
|
+
—
|
347
|
+
<span class="container">Mercadopago::CardToken</span>
|
348
|
+
|
349
|
+
<li class="method">
|
350
|
+
<a href="Mercadopago/Customer.html#method-i-get">#get</a>
|
351
|
+
—
|
352
|
+
<span class="container">Mercadopago::Customer</span>
|
353
|
+
|
354
|
+
<li class="method">
|
355
|
+
<a href="Mercadopago/IdentificationType.html#method-i-get">#get</a>
|
356
|
+
—
|
357
|
+
<span class="container">Mercadopago::IdentificationType</span>
|
358
|
+
|
359
|
+
<li class="method">
|
360
|
+
<a href="Mercadopago/Payment.html#method-i-get">#get</a>
|
361
|
+
—
|
362
|
+
<span class="container">Mercadopago::Payment</span>
|
363
|
+
|
364
|
+
<li class="method">
|
365
|
+
<a href="Mercadopago/PaymentMethods.html#method-i-get">#get</a>
|
366
|
+
—
|
367
|
+
<span class="container">Mercadopago::PaymentMethods</span>
|
368
|
+
|
369
|
+
<li class="method">
|
370
|
+
<a href="Mercadopago/Preference.html#method-i-get">#get</a>
|
371
|
+
—
|
372
|
+
<span class="container">Mercadopago::Preference</span>
|
373
|
+
|
374
|
+
<li class="method">
|
375
|
+
<a href="Mercadopago/User.html#method-i-get">#get</a>
|
376
|
+
—
|
377
|
+
<span class="container">Mercadopago::User</span>
|
378
|
+
|
379
|
+
<li class="method">
|
380
|
+
<a href="Mercadopago/RequestOptions.html#method-i-get_headers">#get_headers</a>
|
381
|
+
—
|
382
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
383
|
+
|
384
|
+
<li class="method">
|
385
|
+
<a href="Mercadopago/SDK.html#method-i-http_client-3D">#http_client=</a>
|
386
|
+
—
|
387
|
+
<span class="container">Mercadopago::SDK</span>
|
388
|
+
|
389
|
+
<li class="method">
|
390
|
+
<a href="Mercadopago/SDK.html#method-i-identification_type">#identification_type</a>
|
391
|
+
—
|
392
|
+
<span class="container">Mercadopago::SDK</span>
|
393
|
+
|
394
|
+
<li class="method">
|
395
|
+
<a href="Mercadopago/RequestOptions.html#method-i-integrator_id-3D">#integrator_id=</a>
|
396
|
+
—
|
397
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
398
|
+
|
399
|
+
<li class="method">
|
400
|
+
<a href="Mercadopago/Card.html#method-i-list">#list</a>
|
401
|
+
—
|
402
|
+
<span class="container">Mercadopago::Card</span>
|
403
|
+
|
404
|
+
<li class="method">
|
405
|
+
<a href="Mercadopago/DisbursementRefund.html#method-i-list">#list</a>
|
406
|
+
—
|
407
|
+
<span class="container">Mercadopago::DisbursementRefund</span>
|
408
|
+
|
409
|
+
<li class="method">
|
410
|
+
<a href="Mercadopago/Refund.html#method-i-list">#list</a>
|
411
|
+
—
|
412
|
+
<span class="container">Mercadopago::Refund</span>
|
413
|
+
|
414
|
+
<li class="method">
|
415
|
+
<a href="Mercadopago/RequestOptions.html#method-i-max_retries-3D">#max_retries=</a>
|
416
|
+
—
|
417
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
418
|
+
|
419
|
+
<li class="method">
|
420
|
+
<a href="Mercadopago/SDK.html#method-i-merchant_order">#merchant_order</a>
|
421
|
+
—
|
422
|
+
<span class="container">Mercadopago::SDK</span>
|
423
|
+
|
424
|
+
<li class="method">
|
425
|
+
<a href="Mercadopago/Config.html#method-i-mime_form">#mime_form</a>
|
426
|
+
—
|
427
|
+
<span class="container">Mercadopago::Config</span>
|
428
|
+
|
429
|
+
<li class="method">
|
430
|
+
<a href="Mercadopago/Config.html#method-i-mime_json">#mime_json</a>
|
431
|
+
—
|
432
|
+
<span class="container">Mercadopago::Config</span>
|
433
|
+
|
434
|
+
<li class="method">
|
435
|
+
<a href="Mercadopago/SDK.html#method-i-payment">#payment</a>
|
436
|
+
—
|
437
|
+
<span class="container">Mercadopago::SDK</span>
|
438
|
+
|
439
|
+
<li class="method">
|
440
|
+
<a href="Mercadopago/SDK.html#method-i-payment_methods">#payment_methods</a>
|
441
|
+
—
|
442
|
+
<span class="container">Mercadopago::SDK</span>
|
443
|
+
|
444
|
+
<li class="method">
|
445
|
+
<a href="Mercadopago/RequestOptions.html#method-i-platform_id-3D">#platform_id=</a>
|
446
|
+
—
|
447
|
+
<span class="container">Mercadopago::RequestOptions</span>
|
448
|
+
|
449
|
+
<li class="method">
|
450
|
+
<a href="Mercadopago/HttpClient.html#method-i-post">#post</a>
|
451
|
+
—
|
452
|
+
<span class="container">Mercadopago::HttpClient</span>
|
453
|
+
|
454
|
+
<li class="method">
|
455
|
+
<a href="Mercadopago/SDK.html#method-i-preference">#preference</a>
|
456
|
+
—
|
457
|
+
<span class="container">Mercadopago::SDK</span>
|
458
|
+
|
459
|
+
<li class="method">
|
460
|
+
<a href="Mercadopago/Config.html#method-i-product_id">#product_id</a>
|
461
|
+
—
|
462
|
+
<span class="container">Mercadopago::Config</span>
|
463
|
+
|
464
|
+
<li class="method">
|
465
|
+
<a href="Mercadopago/HttpClient.html#method-i-put">#put</a>
|
466
|
+
—
|
467
|
+
<span class="container">Mercadopago::HttpClient</span>
|
468
|
+
|
469
|
+
<li class="method">
|
470
|
+
<a href="Mercadopago/SDK.html#method-i-refund">#refund</a>
|
471
|
+
—
|
472
|
+
<span class="container">Mercadopago::SDK</span>
|
473
|
+
|
474
|
+
<li class="method">
|
475
|
+
<a href="Mercadopago/SDK.html#method-i-request_options">#request_options</a>
|
476
|
+
—
|
477
|
+
<span class="container">Mercadopago::SDK</span>
|
478
|
+
|
479
|
+
<li class="method">
|
480
|
+
<a href="Mercadopago/SDK.html#method-i-request_options-3D">#request_options=</a>
|
481
|
+
—
|
482
|
+
<span class="container">Mercadopago::SDK</span>
|
483
|
+
|
484
|
+
<li class="method">
|
485
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-search">#search</a>
|
486
|
+
—
|
487
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
488
|
+
|
489
|
+
<li class="method">
|
490
|
+
<a href="Mercadopago/Payment.html#method-i-search">#search</a>
|
491
|
+
—
|
492
|
+
<span class="container">Mercadopago::Payment</span>
|
493
|
+
|
494
|
+
<li class="method">
|
495
|
+
<a href="Mercadopago/Customer.html#method-i-search">#search</a>
|
496
|
+
—
|
497
|
+
<span class="container">Mercadopago::Customer</span>
|
498
|
+
|
499
|
+
<li class="method">
|
500
|
+
<a href="Mercadopago/MerchantOrder.html#method-i-search">#search</a>
|
501
|
+
—
|
502
|
+
<span class="container">Mercadopago::MerchantOrder</span>
|
503
|
+
|
504
|
+
<li class="method">
|
505
|
+
<a href="Mercadopago/Config.html#method-i-tracking_id">#tracking_id</a>
|
506
|
+
—
|
507
|
+
<span class="container">Mercadopago::Config</span>
|
508
|
+
|
509
|
+
<li class="method">
|
510
|
+
<a href="Mercadopago/Payment.html#method-i-update">#update</a>
|
511
|
+
—
|
512
|
+
<span class="container">Mercadopago::Payment</span>
|
513
|
+
|
514
|
+
<li class="method">
|
515
|
+
<a href="Mercadopago/Customer.html#method-i-update">#update</a>
|
516
|
+
—
|
517
|
+
<span class="container">Mercadopago::Customer</span>
|
518
|
+
|
519
|
+
<li class="method">
|
520
|
+
<a href="Mercadopago/MerchantOrder.html#method-i-update">#update</a>
|
521
|
+
—
|
522
|
+
<span class="container">Mercadopago::MerchantOrder</span>
|
523
|
+
|
524
|
+
<li class="method">
|
525
|
+
<a href="Mercadopago/Preference.html#method-i-update">#update</a>
|
526
|
+
—
|
527
|
+
<span class="container">Mercadopago::Preference</span>
|
528
|
+
|
529
|
+
<li class="method">
|
530
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-update">#update</a>
|
531
|
+
—
|
532
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
533
|
+
|
534
|
+
<li class="method">
|
535
|
+
<a href="Mercadopago/AdvancedPayment.html#method-i-update_release_date">#update_release_date</a>
|
536
|
+
—
|
537
|
+
<span class="container">Mercadopago::AdvancedPayment</span>
|
538
|
+
|
539
|
+
<li class="method">
|
540
|
+
<a href="Mercadopago/SDK.html#method-i-user">#user</a>
|
541
|
+
—
|
542
|
+
<span class="container">Mercadopago::SDK</span>
|
543
|
+
|
544
|
+
<li class="method">
|
545
|
+
<a href="Mercadopago/Config.html#method-i-user_agent">#user_agent</a>
|
546
|
+
—
|
547
|
+
<span class="container">Mercadopago::Config</span>
|
548
|
+
|
549
|
+
<li class="method">
|
550
|
+
<a href="Mercadopago/Config.html#method-i-version">#version</a>
|
551
|
+
—
|
552
|
+
<span class="container">Mercadopago::Config</span>
|
553
|
+
</ul>
|
554
|
+
</main>
|
555
|
+
|
556
|
+
|
557
|
+
<footer id="validator-badges" role="contentinfo">
|
558
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
559
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
560
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
561
|
+
</footer>
|
562
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Mercadopago
|
5
|
+
class Config
|
6
|
+
@@VERSION = '2.0.3'
|
7
|
+
@@USER_AGENT = "MercadoPago Ruby SDK v#{@@VERSION}"
|
8
|
+
@@PRODUCT_ID = 'bc32a7vtrpp001u8nhjg'
|
9
|
+
@@TRACKING_ID = "plataform: ?,type:SDK#{@@VERSION},so;"
|
10
|
+
@@API_BASE_URL = 'https://api.mercadopago.com'
|
11
|
+
@@MIME_JSON = 'application/json'
|
12
|
+
@@MIME_FORM = 'application/x-www-form-urlencoded'
|
13
|
+
|
14
|
+
def version
|
15
|
+
@@VERSION
|
16
|
+
end
|
17
|
+
|
18
|
+
def user_agent
|
19
|
+
@@USER_AGENT
|
20
|
+
end
|
21
|
+
|
22
|
+
def product_id
|
23
|
+
@@PRODUCT_ID
|
24
|
+
end
|
25
|
+
|
26
|
+
def tracking_id
|
27
|
+
@@TRACKING_ID
|
28
|
+
end
|
29
|
+
|
30
|
+
def api_base_url
|
31
|
+
@@API_BASE_URL
|
32
|
+
end
|
33
|
+
|
34
|
+
def mime_json
|
35
|
+
@@MIME_JSON
|
36
|
+
end
|
37
|
+
|
38
|
+
def mime_form
|
39
|
+
@@MIME_FORM
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# typed: true
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module Mercadopago
|
5
|
+
class RequestOptions
|
6
|
+
attr_reader :access_token, :connection_timeout, :custom_headers, :corporation_id, :integrator_id,
|
7
|
+
:platform_id, :max_retries
|
8
|
+
|
9
|
+
def initialize(access_token: nil,
|
10
|
+
connection_timeout: 60.0,
|
11
|
+
custom_headers: nil,
|
12
|
+
corporation_id: nil,
|
13
|
+
integrator_id: nil,
|
14
|
+
platform_id: nil,
|
15
|
+
max_retries: 3)
|
16
|
+
self.access_token = access_token
|
17
|
+
self.connection_timeout = connection_timeout
|
18
|
+
self.custom_headers = custom_headers
|
19
|
+
self.corporation_id = corporation_id
|
20
|
+
self.integrator_id = integrator_id
|
21
|
+
self.platform_id = platform_id
|
22
|
+
self.max_retries = max_retries
|
23
|
+
|
24
|
+
@config = Config.new
|
25
|
+
end
|
26
|
+
|
27
|
+
def get_headers
|
28
|
+
headers = { 'Authorization': "Bearer #{@access_token}",
|
29
|
+
'x-product-id' => @config.product_id,
|
30
|
+
'x-tracking-id' => @config.tracking_id,
|
31
|
+
'User-Agent' => @config.user_agent,
|
32
|
+
'Accept': @config.mime_json }
|
33
|
+
|
34
|
+
headers['x-corporation-id'] = @corporation_id unless @corporation_id.nil?
|
35
|
+
headers['x-integrator-id'] = @integrator_id unless @integrator_id.nil?
|
36
|
+
headers['x-platform-id'] = @platform_id unless @platform_id.nil?
|
37
|
+
|
38
|
+
headers.merge!(@custom_headers) unless @custom_headers.nil?
|
39
|
+
|
40
|
+
headers
|
41
|
+
end
|
42
|
+
|
43
|
+
def access_token=(value)
|
44
|
+
raise TypeError, 'Param access_token must be a String' unless access_token.nil? || value.is_a?(String)
|
45
|
+
|
46
|
+
@access_token = value
|
47
|
+
end
|
48
|
+
|
49
|
+
def custom_headers=(value)
|
50
|
+
raise TypeError, 'Param custom_headers must be a Hash' unless value.nil? || value.is_a?(Hash)
|
51
|
+
|
52
|
+
@custom_headers = value
|
53
|
+
end
|
54
|
+
|
55
|
+
def connection_timeout=(value)
|
56
|
+
raise TypeError, 'Param connection_timeout must be a Float' unless value.is_a?(Float)
|
57
|
+
|
58
|
+
@connection_timeout = value
|
59
|
+
end
|
60
|
+
|
61
|
+
def corporation_id=(value)
|
62
|
+
raise TypeError, 'Param corporation_id must be a String' unless value.nil? || value.is_a?(String)
|
63
|
+
|
64
|
+
@corporation_id = value
|
65
|
+
end
|
66
|
+
|
67
|
+
def integrator_id=(value)
|
68
|
+
raise TypeError, 'Param integrator_id must be a String' unless value.nil? || value.is_a?(String)
|
69
|
+
|
70
|
+
@integrator_id = value
|
71
|
+
end
|
72
|
+
|
73
|
+
def platform_id=(value)
|
74
|
+
raise TypeError, 'Param platform_id must be a String' unless value.nil? || value.is_a?(String)
|
75
|
+
|
76
|
+
@platform_id = value
|
77
|
+
end
|
78
|
+
|
79
|
+
def max_retries=(value)
|
80
|
+
raise TypeError, 'Param max_retries must be a Integer' unless value.is_a?(Integer)
|
81
|
+
|
82
|
+
@max_retries = value
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|