mercadopago-sdk 0.3.6 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- 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/.gitignore +2 -1
- 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 +54 -143
- 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.html +123 -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/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.rb +24 -349
- 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/mercadopago.gemspec +15 -15
- data/tests/test_card.rb +79 -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_user.rb +17 -0
- data/tests/tests.rb +12 -56
- metadata +154 -37
- 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 -1
- data/mercadopago-sdk-0.3.2.gem +0 -0
- data/mercadopago-sdk-0.3.3.gem +0 -0
@@ -0,0 +1,160 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Mercadopago::CardToken - 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" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link"><a href="MPBase.html">Mercadopago::MPBase</a>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-i-create">#create</a>
|
76
|
+
<li ><a href="#method-i-get">#get</a>
|
77
|
+
</ul>
|
78
|
+
</div>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
</nav>
|
82
|
+
|
83
|
+
<main role="main" aria-labelledby="class-Mercadopago::CardToken">
|
84
|
+
<h1 id="class-Mercadopago::CardToken" class="class">
|
85
|
+
class Mercadopago::CardToken
|
86
|
+
</h1>
|
87
|
+
|
88
|
+
<section class="description">
|
89
|
+
|
90
|
+
<p>This class will allow you to send your customers card data for Mercado Pago server and receive a token to complete the payments transactions.</p>
|
91
|
+
|
92
|
+
</section>
|
93
|
+
|
94
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
101
|
+
<header>
|
102
|
+
<h3>Public Instance Methods</h3>
|
103
|
+
</header>
|
104
|
+
|
105
|
+
<div id="method-i-create" class="method-detail ">
|
106
|
+
<div class="method-heading">
|
107
|
+
<span class="method-name">create</span><span
|
108
|
+
class="method-args">(card_token_data, request_options: nil)</span>
|
109
|
+
<span class="method-click-advice">click to toggle source</span>
|
110
|
+
</div>
|
111
|
+
|
112
|
+
<div class="method-description">
|
113
|
+
|
114
|
+
|
115
|
+
<div class="method-source-code" id="create-source">
|
116
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/card_token.rb, line 13</span>
|
117
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create</span>(<span class="ruby-identifier">card_token_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
118
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-string">'Param card_token_data must be a Hash'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">card_token_data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
119
|
+
|
120
|
+
<span class="ruby-identifier">_post</span>(<span class="ruby-value">uri:</span> <span class="ruby-string">'/v1/card_tokens'</span>, <span class="ruby-value">data:</span> <span class="ruby-identifier">card_token_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
121
|
+
<span class="ruby-keyword">end</span></pre>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="method-i-get" class="method-detail ">
|
129
|
+
<div class="method-heading">
|
130
|
+
<span class="method-name">get</span><span
|
131
|
+
class="method-args">(card_token_id, request_options: nil)</span>
|
132
|
+
<span class="method-click-advice">click to toggle source</span>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
<div class="method-description">
|
136
|
+
|
137
|
+
|
138
|
+
<div class="method-source-code" id="get-source">
|
139
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/card_token.rb, line 9</span>
|
140
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get</span>(<span class="ruby-identifier">card_token_id</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
141
|
+
<span class="ruby-identifier">_get</span>(<span class="ruby-value">uri:</span> <span class="ruby-node">"/v1/card_tokens/#{card_token_id}"</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
142
|
+
<span class="ruby-keyword">end</span></pre>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
</section>
|
150
|
+
|
151
|
+
</section>
|
152
|
+
</main>
|
153
|
+
|
154
|
+
|
155
|
+
<footer id="validator-badges" role="contentinfo">
|
156
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
157
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
158
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
159
|
+
</footer>
|
160
|
+
|
@@ -0,0 +1,266 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Mercadopago::Config - 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" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">Object
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-i-api_base_url">#api_base_url</a>
|
76
|
+
<li ><a href="#method-i-mime_form">#mime_form</a>
|
77
|
+
<li ><a href="#method-i-mime_json">#mime_json</a>
|
78
|
+
<li ><a href="#method-i-product_id">#product_id</a>
|
79
|
+
<li ><a href="#method-i-tracking_id">#tracking_id</a>
|
80
|
+
<li ><a href="#method-i-user_agent">#user_agent</a>
|
81
|
+
<li ><a href="#method-i-version">#version</a>
|
82
|
+
</ul>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</div>
|
86
|
+
</nav>
|
87
|
+
|
88
|
+
<main role="main" aria-labelledby="class-Mercadopago::Config">
|
89
|
+
<h1 id="class-Mercadopago::Config" class="class">
|
90
|
+
class Mercadopago::Config
|
91
|
+
</h1>
|
92
|
+
|
93
|
+
<section class="description">
|
94
|
+
|
95
|
+
</section>
|
96
|
+
|
97
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
104
|
+
<header>
|
105
|
+
<h3>Public Instance Methods</h3>
|
106
|
+
</header>
|
107
|
+
|
108
|
+
<div id="method-i-api_base_url" class="method-detail ">
|
109
|
+
<div class="method-heading">
|
110
|
+
<span class="method-name">api_base_url</span><span
|
111
|
+
class="method-args">()</span>
|
112
|
+
<span class="method-click-advice">click to toggle source</span>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div class="method-description">
|
116
|
+
|
117
|
+
|
118
|
+
<div class="method-source-code" id="api_base_url-source">
|
119
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 30</span>
|
120
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">api_base_url</span>
|
121
|
+
<span class="ruby-identifier">@@API_BASE_URL</span>
|
122
|
+
<span class="ruby-keyword">end</span></pre>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
|
127
|
+
</div>
|
128
|
+
|
129
|
+
<div id="method-i-mime_form" class="method-detail ">
|
130
|
+
<div class="method-heading">
|
131
|
+
<span class="method-name">mime_form</span><span
|
132
|
+
class="method-args">()</span>
|
133
|
+
<span class="method-click-advice">click to toggle source</span>
|
134
|
+
</div>
|
135
|
+
|
136
|
+
<div class="method-description">
|
137
|
+
|
138
|
+
|
139
|
+
<div class="method-source-code" id="mime_form-source">
|
140
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 38</span>
|
141
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">mime_form</span>
|
142
|
+
<span class="ruby-identifier">@@MIME_FORM</span>
|
143
|
+
<span class="ruby-keyword">end</span></pre>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div id="method-i-mime_json" class="method-detail ">
|
151
|
+
<div class="method-heading">
|
152
|
+
<span class="method-name">mime_json</span><span
|
153
|
+
class="method-args">()</span>
|
154
|
+
<span class="method-click-advice">click to toggle source</span>
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<div class="method-description">
|
158
|
+
|
159
|
+
|
160
|
+
<div class="method-source-code" id="mime_json-source">
|
161
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 34</span>
|
162
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">mime_json</span>
|
163
|
+
<span class="ruby-identifier">@@MIME_JSON</span>
|
164
|
+
<span class="ruby-keyword">end</span></pre>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="method-i-product_id" class="method-detail ">
|
172
|
+
<div class="method-heading">
|
173
|
+
<span class="method-name">product_id</span><span
|
174
|
+
class="method-args">()</span>
|
175
|
+
<span class="method-click-advice">click to toggle source</span>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div class="method-description">
|
179
|
+
|
180
|
+
|
181
|
+
<div class="method-source-code" id="product_id-source">
|
182
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 22</span>
|
183
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">product_id</span>
|
184
|
+
<span class="ruby-identifier">@@PRODUCT_ID</span>
|
185
|
+
<span class="ruby-keyword">end</span></pre>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
|
190
|
+
</div>
|
191
|
+
|
192
|
+
<div id="method-i-tracking_id" class="method-detail ">
|
193
|
+
<div class="method-heading">
|
194
|
+
<span class="method-name">tracking_id</span><span
|
195
|
+
class="method-args">()</span>
|
196
|
+
<span class="method-click-advice">click to toggle source</span>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
<div class="method-description">
|
200
|
+
|
201
|
+
|
202
|
+
<div class="method-source-code" id="tracking_id-source">
|
203
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 26</span>
|
204
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">tracking_id</span>
|
205
|
+
<span class="ruby-identifier">@@TRACKING_ID</span>
|
206
|
+
<span class="ruby-keyword">end</span></pre>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
|
211
|
+
</div>
|
212
|
+
|
213
|
+
<div id="method-i-user_agent" class="method-detail ">
|
214
|
+
<div class="method-heading">
|
215
|
+
<span class="method-name">user_agent</span><span
|
216
|
+
class="method-args">()</span>
|
217
|
+
<span class="method-click-advice">click to toggle source</span>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="method-description">
|
221
|
+
|
222
|
+
|
223
|
+
<div class="method-source-code" id="user_agent-source">
|
224
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 18</span>
|
225
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">user_agent</span>
|
226
|
+
<span class="ruby-identifier">@@USER_AGENT</span>
|
227
|
+
<span class="ruby-keyword">end</span></pre>
|
228
|
+
</div>
|
229
|
+
</div>
|
230
|
+
|
231
|
+
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div id="method-i-version" class="method-detail ">
|
235
|
+
<div class="method-heading">
|
236
|
+
<span class="method-name">version</span><span
|
237
|
+
class="method-args">()</span>
|
238
|
+
<span class="method-click-advice">click to toggle source</span>
|
239
|
+
</div>
|
240
|
+
|
241
|
+
<div class="method-description">
|
242
|
+
|
243
|
+
|
244
|
+
<div class="method-source-code" id="version-source">
|
245
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/config/config.rb, line 14</span>
|
246
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">version</span>
|
247
|
+
<span class="ruby-identifier">@@VERSION</span>
|
248
|
+
<span class="ruby-keyword">end</span></pre>
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
|
253
|
+
</div>
|
254
|
+
|
255
|
+
</section>
|
256
|
+
|
257
|
+
</section>
|
258
|
+
</main>
|
259
|
+
|
260
|
+
|
261
|
+
<footer id="validator-badges" role="contentinfo">
|
262
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
263
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
264
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
265
|
+
</footer>
|
266
|
+
|
@@ -0,0 +1,228 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Mercadopago::Customer - 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" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link"><a href="MPBase.html">Mercadopago::MPBase</a>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-i-create">#create</a>
|
76
|
+
<li ><a href="#method-i-delete">#delete</a>
|
77
|
+
<li ><a href="#method-i-get">#get</a>
|
78
|
+
<li ><a href="#method-i-search">#search</a>
|
79
|
+
<li ><a href="#method-i-update">#update</a>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
</div>
|
84
|
+
</nav>
|
85
|
+
|
86
|
+
<main role="main" aria-labelledby="class-Mercadopago::Customer">
|
87
|
+
<h1 id="class-Mercadopago::Customer" class="class">
|
88
|
+
class Mercadopago::Customer
|
89
|
+
</h1>
|
90
|
+
|
91
|
+
<section class="description">
|
92
|
+
|
93
|
+
<p>This will allow your customer to complete their purchases much faster and easily when used in conjunction with the Cards class. [Click here for more infos](<a href="https://mercadopago.com.br/developers/en/guides/online-payments/web-tokenize-checkout/customers-and-cards">mercadopago.com.br/developers/en/guides/online-payments/web-tokenize-checkout/customers-and-cards</a>)</p>
|
94
|
+
|
95
|
+
</section>
|
96
|
+
|
97
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
104
|
+
<header>
|
105
|
+
<h3>Public Instance Methods</h3>
|
106
|
+
</header>
|
107
|
+
|
108
|
+
<div id="method-i-create" class="method-detail ">
|
109
|
+
<div class="method-heading">
|
110
|
+
<span class="method-name">create</span><span
|
111
|
+
class="method-args">(customer_data, request_options: nil)</span>
|
112
|
+
<span class="method-click-advice">click to toggle source</span>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div class="method-description">
|
116
|
+
|
117
|
+
|
118
|
+
<div class="method-source-code" id="create-source">
|
119
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/customer.rb, line 20</span>
|
120
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">create</span>(<span class="ruby-identifier">customer_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
121
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-string">'Param customer_data must be a Hash'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">customer_data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
122
|
+
|
123
|
+
<span class="ruby-identifier">_post</span>(<span class="ruby-value">uri:</span> <span class="ruby-string">'/v1/customers'</span>, <span class="ruby-value">data:</span> <span class="ruby-identifier">customer_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
124
|
+
<span class="ruby-keyword">end</span></pre>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="method-i-delete" class="method-detail ">
|
132
|
+
<div class="method-heading">
|
133
|
+
<span class="method-name">delete</span><span
|
134
|
+
class="method-args">(customer_id, request_options: nil)</span>
|
135
|
+
<span class="method-click-advice">click to toggle source</span>
|
136
|
+
</div>
|
137
|
+
|
138
|
+
<div class="method-description">
|
139
|
+
|
140
|
+
|
141
|
+
<div class="method-source-code" id="delete-source">
|
142
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/customer.rb, line 32</span>
|
143
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">delete</span>(<span class="ruby-identifier">customer_id</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
144
|
+
<span class="ruby-identifier">_delete</span>(<span class="ruby-value">uri:</span> <span class="ruby-node">"/v1/customers/#{customer_id}"</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
145
|
+
<span class="ruby-keyword">end</span></pre>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
</div>
|
151
|
+
|
152
|
+
<div id="method-i-get" class="method-detail ">
|
153
|
+
<div class="method-heading">
|
154
|
+
<span class="method-name">get</span><span
|
155
|
+
class="method-args">(customer_id, request_options: nil)</span>
|
156
|
+
<span class="method-click-advice">click to toggle source</span>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div class="method-description">
|
160
|
+
|
161
|
+
|
162
|
+
<div class="method-source-code" id="get-source">
|
163
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/customer.rb, line 16</span>
|
164
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get</span>(<span class="ruby-identifier">customer_id</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
165
|
+
<span class="ruby-identifier">_get</span>(<span class="ruby-value">uri:</span> <span class="ruby-node">"/v1/customers/#{customer_id}"</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
166
|
+
<span class="ruby-keyword">end</span></pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
|
171
|
+
</div>
|
172
|
+
|
173
|
+
<div id="method-i-search" class="method-detail ">
|
174
|
+
<div class="method-heading">
|
175
|
+
<span class="method-name">search</span><span
|
176
|
+
class="method-args">(filters: nil, request_options: nil)</span>
|
177
|
+
<span class="method-click-advice">click to toggle source</span>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
|
182
|
+
|
183
|
+
<div class="method-source-code" id="search-source">
|
184
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/customer.rb, line 12</span>
|
185
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">search</span>(<span class="ruby-value">filters:</span> <span class="ruby-keyword">nil</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
186
|
+
<span class="ruby-identifier">_get</span>(<span class="ruby-value">uri:</span> <span class="ruby-string">'/v1/customers/search'</span>, <span class="ruby-value">filters:</span> <span class="ruby-identifier">filters</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
187
|
+
<span class="ruby-keyword">end</span></pre>
|
188
|
+
</div>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div id="method-i-update" class="method-detail ">
|
195
|
+
<div class="method-heading">
|
196
|
+
<span class="method-name">update</span><span
|
197
|
+
class="method-args">(customer_id, customer_data, request_options: nil)</span>
|
198
|
+
<span class="method-click-advice">click to toggle source</span>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
<div class="method-description">
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method-source-code" id="update-source">
|
205
|
+
<pre><span class="ruby-comment"># File lib/mercadopago/resources/customer.rb, line 26</span>
|
206
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">update</span>(<span class="ruby-identifier">customer_id</span>, <span class="ruby-identifier">customer_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-keyword">nil</span>)
|
207
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-string">'Param customer_data must be a Hash'</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">customer_data</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
|
208
|
+
|
209
|
+
<span class="ruby-identifier">_put</span>(<span class="ruby-value">uri:</span> <span class="ruby-node">"/v1/customers/#{customer_id}"</span>, <span class="ruby-value">data:</span> <span class="ruby-identifier">customer_data</span>, <span class="ruby-value">request_options:</span> <span class="ruby-identifier">request_options</span>)
|
210
|
+
<span class="ruby-keyword">end</span></pre>
|
211
|
+
</div>
|
212
|
+
</div>
|
213
|
+
|
214
|
+
|
215
|
+
</div>
|
216
|
+
|
217
|
+
</section>
|
218
|
+
|
219
|
+
</section>
|
220
|
+
</main>
|
221
|
+
|
222
|
+
|
223
|
+
<footer id="validator-badges" role="contentinfo">
|
224
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
225
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
|
226
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
227
|
+
</footer>
|
228
|
+
|