adyen-ruby-api-library 9.7.0 → 9.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cde4dd4dad622931d9bba93a914f9eca16918eab9fd4a314416fd1397d2db5f4
4
- data.tar.gz: 2c7e74c40eb6a9976c8340b6c13fa8f4177fb55d6d272c97af1e9d21772fa038
3
+ metadata.gz: b3769b6e17c96fb7b05ba7f030f9f0554652b329334c6cf3522941bf5e2b36e6
4
+ data.tar.gz: 912816194d60876ece27bbd9ce526dbb221b8ca18d763e95a1c83cac901e0ef3
5
5
  SHA512:
6
- metadata.gz: 75a4635f2ec599af443d8987592077fe625e7945372e91d458baf4abaa68593efcda42254fe0bff76e32ffdae6b9e4f8f47049b198bf52253b9b474d64a9761d
7
- data.tar.gz: 3b6f0c9023f6e89c1cd6a43f963a22bd97d0afa4acfec7dcb2152e22b56f01bc2bc437c11cbd0f85b1b60794655cb54b167173d4b3b74b73008502dbac29e1c1
6
+ metadata.gz: ba50c5b4f621133105f98e21ce7e7f8632fbfbaf6166ab58798949abc78bc5cc11f027f62ecfb36d4b67a3573c3c85d34577d3e4c1b34776de091eb5e8cc4275
7
+ data.tar.gz: a0dc622effea182c37455e36f271d3be30eb961e3c3bc15859f09544e84cbdddc789cff138d90cf8079b16638efa4df21713719a804eb6e69b7e06816959fba6
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @Adyen/integration-tools-testing
1
+ * @Adyen/integration-tools-testing @Adyen/developer-relations
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 9.7.0
1
+ 9.8.0
2
2
 
data/lib/adyen/client.rb CHANGED
@@ -91,6 +91,9 @@ module Adyen
91
91
  "https://terminal-api-#{@env}.adyen.com"
92
92
  end
93
93
  supports_live_url_prefix = false
94
+ when 'PosMobile'
95
+ url = "https://checkout-#{@env}.adyen.com/checkout/possdk"
96
+ supports_live_url_prefix = false
94
97
  else
95
98
  raise ArgumentError, 'Invalid service specified'
96
99
  end
@@ -284,6 +287,10 @@ module Adyen
284
287
  @terminal_cloud_api ||= Adyen::TerminalCloudAPI.new(self)
285
288
  end
286
289
 
290
+ def pos_mobile
291
+ @pos_mobile ||= Adyen::PosMobile.new(self)
292
+ end
293
+
287
294
  private
288
295
 
289
296
  def auth_header(auth_type, faraday)
@@ -0,0 +1,29 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+ class TaxEDeliveryConsentApi < Service
4
+ attr_accessor :service, :version
5
+
6
+ def initialize(client, version = DEFAULT_VERSION)
7
+ super(client, version, 'LegalEntityManagement')
8
+ end
9
+
10
+ def check_status_of_consent_for_electronic_delivery_of_tax_forms(id, headers: {})
11
+ endpoint = '/legalEntities/{id}/checkTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint, id)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, {}, headers, @version)
17
+ end
18
+
19
+ def set_consent_status_for_electronic_delivery_of_tax_forms(request, id, headers: {})
20
+ endpoint = '/legalEntities/{id}/setTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint, id)
23
+
24
+ action = { method: 'post', url: endpoint }
25
+ @client.call_adyen_api(@service, action, request, headers, @version)
26
+ end
27
+
28
+ end
29
+ end
@@ -3,6 +3,7 @@ require_relative 'legalEntityManagement/documents_api'
3
3
  require_relative 'legalEntityManagement/hosted_onboarding_api'
4
4
  require_relative 'legalEntityManagement/legal_entities_api'
5
5
  require_relative 'legalEntityManagement/pci_questionnaires_api'
6
+ require_relative 'legalEntityManagement/tax_e_delivery_consent_api'
6
7
  require_relative 'legalEntityManagement/terms_of_service_api'
7
8
  require_relative 'legalEntityManagement/transfer_instruments_api'
8
9
 
@@ -37,6 +38,10 @@ module Adyen
37
38
  @pci_questionnaires_api ||= Adyen::PCIQuestionnairesApi.new(@client, @version)
38
39
  end
39
40
 
41
+ def tax_e_delivery_consent_api
42
+ @tax_e_delivery_consent_api ||= Adyen::TaxEDeliveryConsentApi.new(@client, @version)
43
+ end
44
+
40
45
  def terms_of_service_api
41
46
  @terms_of_service_api ||= Adyen::TermsOfServiceApi.new(@client, @version)
42
47
  end
data/lib/adyen/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Adyen
2
2
  NAME = 'adyen-ruby-api-library'.freeze
3
- VERSION = '9.7.0'.freeze
3
+ VERSION = '9.8.0'.freeze
4
4
  end
data/spec/client_spec.rb CHANGED
@@ -260,4 +260,22 @@ RSpec.describe Adyen do
260
260
  .to eq('https://terminal-api-test.adyen.com/connectedTerminals')
261
261
 
262
262
  end
263
+
264
+ it 'checks the initialization of the terminal region' do
265
+ client = Adyen::Client.new(api_key: 'api_key', env: :test, terminal_region: 'eu')
266
+ expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
267
+ .to eq('https://terminal-api-test-eu.adyen.com/connectedTerminals')
268
+ end
269
+
270
+ it 'checks the initialization of the terminal region set to nil per default' do
271
+ client = Adyen::Client.new(api_key: 'api_key', env: :test)
272
+ expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
273
+ .to eq('https://terminal-api-test.adyen.com/connectedTerminals')
274
+ end
275
+
276
+ it 'checks the creation of PosMobile sessions url' do
277
+ client = Adyen::Client.new(api_key: 'api_key', env: :test)
278
+ expect(client.service_url('PosMobile', 'sessions', nil))
279
+ .to eq('https://checkout-test.adyen.com/checkout/possdk/sessions')
280
+ end
263
281
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adyen-ruby-api-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.7.0
4
+ version: 9.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-16 00:00:00.000000000 Z
11
+ date: 2024-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -101,20 +101,6 @@ files:
101
101
  - adyen-ruby-api-library.gemspec
102
102
  - bin/console
103
103
  - bin/setup
104
- - docs/checkout.html
105
- - docs/index.html
106
- - docs/install-library.html
107
- - docs/javascripts/prism.js
108
- - docs/javascripts/scale.fix.js
109
- - docs/marketpay.html
110
- - docs/params.json
111
- - docs/payment.html
112
- - docs/payout.html
113
- - docs/recurring.html
114
- - docs/stylesheets/github-light.css
115
- - docs/stylesheets/prism.css
116
- - docs/stylesheets/styles.css
117
- - docs/using-library.html
118
104
  - lib/adyen-ruby-api-library.rb
119
105
  - lib/adyen/client.rb
120
106
  - lib/adyen/errors.rb
@@ -154,6 +140,7 @@ files:
154
140
  - lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb
155
141
  - lib/adyen/services/legalEntityManagement/legal_entities_api.rb
156
142
  - lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb
143
+ - lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb
157
144
  - lib/adyen/services/legalEntityManagement/terms_of_service_api.rb
158
145
  - lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb
159
146
  - lib/adyen/services/management.rb
@@ -448,7 +435,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
448
435
  - !ruby/object:Gem::Version
449
436
  version: '0'
450
437
  requirements: []
451
- rubygems_version: 3.5.11
438
+ rubygems_version: 3.5.16
452
439
  signing_key:
453
440
  specification_version: 4
454
441
  summary: Official Adyen Ruby API Library
data/docs/checkout.html DELETED
@@ -1,128 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
6
- <title>Adyen-ruby-api-library by Adyen</title>
7
-
8
- <link rel="stylesheet" href="stylesheets/styles.css">
9
- <link rel="stylesheet" href="stylesheets/github-light.css">
10
- <meta name="viewport" content="width=device-width">
11
-
12
- <link rel="stylesheet" href="stylesheets/prism.css">
13
- <script src="javascripts/prism.js"></script>
14
- <!--[if lt IE 9]>
15
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
- <![endif]-->
17
- </head>
18
- <body>
19
- <div class="wrapper">
20
- <header>
21
- <h1>Adyen-ruby-api-library</h1>
22
- <p>Adyen API Library for ruby</p>
23
-
24
- <p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
25
- <ul>
26
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
27
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
28
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
29
- </ul>
30
- </header>
31
- <section>
32
- <h2 id="availablemethods">Available methods</h2>
33
-
34
- <ul>
35
- <li>payment_session</li>
36
-
37
- <li>payments.result</li>
38
-
39
- <li>payment_methods</li>
40
-
41
- <li>payments</li>
42
-
43
- <li>payments.details</li>
44
-
45
- <li>payment_links</li>
46
- </ul>
47
-
48
- <h2 id="authentication">Authentication</h2>
49
-
50
- <p>Checkout is authenticated via api-key:
51
- <pre><code class="ruby language-ruby">adyen.api_key = "AP5XXXXXXXXX"</code></pre></p>
52
-
53
- <h2 id="usagecheckoutsdk">Usage - Checkout SDK</h2>
54
-
55
- <p>Checkout SDK is a javascript library which loads an Adyen-hosted iframe into your website. Once loaded, it communicates directly with Adyen, abstracting away all server communication and lowering your PCI compliance load.</p>
56
-
57
- <p>The front-end is described <a href="https://docs.adyen.com/developers/checkout/integrations-overview">here</a>
58
- </p>
59
-
60
- <p>To perform the initial paymentSession call to Adyen, call its method as below:</p>
61
-
62
- <pre><code class="ruby language-ruby">response = adyen.checkout.paymentSession('{
63
- "amount": {
64
- "value": 1500,
65
- "currency": "EUR"
66
- },
67
- "countryCode": "US",
68
- "origin": "www.example.com",
69
- "returnUrl": "www.example.com",
70
- "reference": "Merchant Reference",
71
- "merchantAccount": "TestMerchant"
72
- }')</code></pre>
73
-
74
- <p>Then send the response to the client-side javascript library to initialize the SDK.</p>
75
-
76
- <h2 id="usagecheckoutapi">Usage - Checkout API</h2>
77
-
78
- <p>Raw payment method details can be sent directly to Adyen through the Checkout API. For instance, to send raw credit card data you could use a request like the below:</p>
79
-
80
- <pre><code class="ruby language-ruby">response = adyen.checkout.payments('{
81
- "card": {
82
- "number": "4111111111111111",
83
- "expiryMonth": "8",
84
- "expiryYear": "2018",
85
- "cvc": "737",
86
- "holderName": "John Smith"
87
- },
88
- "amount": {
89
- "value": 1500,
90
- "currency": "EUR"
91
- },
92
- "reference": "YOUR_REFERENCE",
93
- "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
94
- }')</code></pre>
95
-
96
- <p>You can also get a list of payment methods which are available for a given transaction to display a page with custom styling to your shoppers:</p>
97
-
98
- <pre><code class="ruby language-ruby">response = adyen.checkout.payment_methods('{
99
- "merchantAccount": "YOUR_MERCHANT_ACCOUNT"
100
- }')</code></pre>
101
-
102
- <p>A successful call to payment_methods will return a list of supported payment methods along with redirect URL's so that you can send your shoppers directly to the issuer's site without losing control of front-end styling / logic.</p>
103
-
104
- You can also create a link to Adyen's hosted payment form:
105
-
106
- <pre><code class="ruby language-ruby">response = adyen.checkout.payment_links('{
107
- "amount": {
108
- "value": 1500,
109
- "currency": "EUR"
110
- },
111
- "countryCode": "US",
112
- "merchantAccount": "YOUR_MERCHANT_ACCOUNT",
113
- "reference": "YOUR_REFERENCE"
114
- }')</code></pre>
115
-
116
- <p>A successful call to payment_links will return a url, which directs a user to Adyen's hosted payment form.</p>
117
- </section>
118
-
119
-
120
- <footer>
121
- <p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
122
- <p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
123
- </footer>
124
- </div>
125
- <script src="javascripts/scale.fix.js"></script>
126
-
127
- </body>
128
- </html>
data/docs/index.html DELETED
@@ -1,50 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
6
- <title>Adyen-ruby-api-library by Adyen</title>
7
-
8
- <link rel="stylesheet" href="stylesheets/styles.css">
9
- <link rel="stylesheet" href="stylesheets/github-light.css">
10
- <meta name="viewport" content="width=device-width">
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- </head>
15
- <body>
16
- <div class="wrapper">
17
- <header>
18
- <h1>Adyen-ruby-api-library</h1>
19
- <p>Adyen API Library for Ruby</p>
20
-
21
- <p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
22
-
23
- <ul>
24
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
25
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
26
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
27
- </ul>
28
- </header>
29
- <section>
30
- <h1><a id="adyen-apis-library-for-ruby" class="anchor" href="#adyen-apis-library-for-ruby" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Adyen APIs Library for Ruby</h1>
31
- <p>
32
- This manual describes API communication to the Adyen payment system using this API library for Ruby.
33
- You will get familiar with the following concepts and scenarios:
34
- </p>
35
- <ul>
36
- <li><a title="Install the library" href="install-library.html">Install the library</a></li>
37
- <li><a title="Using the library" href="using-library.html">Using the library</a></li>
38
- </ul>
39
- <h2>DISCLAIMER</h2>
40
- <p>The ownership of the content of the Adyen API Library remains with Adyen. The content of the Adyen API Library may only be used in connection with the services of Adyen and subject to the applicable license (Apache License, Version 2.0, the “License”), a copy of which is included in the library. Unless required by applicable law or agreed to in writing, the library is offered and/or distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Adyen does not warrant that the library or any content will be available uninterrupted or error free, that defects will be corrected, or that the library or its supporting systems are free of viruses or bugs. Please refer to the License for the specific language governing permissions and limitations under the License.</p>
41
- </section>
42
- <footer>
43
- <p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
44
- <p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
45
- </footer>
46
- </div>
47
- <script src="javascripts/scale.fix.js"></script>
48
-
49
- </body>
50
- </html>
@@ -1,61 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
6
- <title>Adyen-php-api-library by Adyen</title>
7
-
8
- <link rel="stylesheet" href="stylesheets/styles.css">
9
- <link rel="stylesheet" href="stylesheets/github-light.css">
10
- <meta name="viewport" content="width=device-width">
11
-
12
- <link rel="stylesheet" href="stylesheets/prism.css">
13
- <script src="javascripts/prism.js"></script>
14
- <!--[if lt IE 9]>
15
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
- <![endif]-->
17
- </head>
18
- <body>
19
- <div class="wrapper">
20
- <header>
21
- <h1>Adyen-ruby-api-library</h1>
22
- <p>Adyen API Library for Ruby</p>
23
-
24
- <p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
25
-
26
-
27
- <ul>
28
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
29
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
30
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
31
- </ul>
32
- </header>
33
- <section>
34
- <h1>Install the library</h1>
35
- <p>
36
- <h2>Requirements:</h2>
37
- <ul>
38
- <li>Ruby >= 2.1</li>
39
- </ul>
40
- </p>
41
- <h2>Installation</h2>
42
- <p>
43
- <ol>
44
- <li>
45
- The preferred method is via <a href="https://www.rubygems.org/packages/Adyen.EcommLibrary">RubyGems</a>.
46
- </li>
47
- <li>
48
- Download Release from GitHub: Go to our GitHub releases tab and download the zip file that is included in the release.
49
- </li>
50
- </ol>
51
- </p>
52
- </section>
53
- <footer>
54
- <p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
55
- <p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
56
- </footer>
57
- </div>
58
- <script src="javascripts/scale.fix.js"></script>
59
-
60
- </body>
61
- </html>
@@ -1,5 +0,0 @@
1
- /* PrismJS 1.14.0
2
- http://prismjs.com/download.html#themes=prism&languages=clike+ruby */
3
- var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,t){var r=n.util.type(e);switch(t=t||{},r){case"Object":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a={};t[n.util.objId(e)]=a;for(var l in e)e.hasOwnProperty(l)&&(a[l]=n.util.clone(e[l],t));return a;case"Array":if(t[n.util.objId(e)])return t[n.util.objId(e)];var a=[];return t[n.util.objId(e)]=a,e.forEach(function(e,r){a[r]=n.util.clone(e,t)}),a}return e}},languages:{extend:function(e,t){var r=n.util.clone(n.languages[e]);for(var a in t)r[a]=t[a];return r},insertBefore:function(e,t,r,a){a=a||n.languages;var l=a[e];if(2==arguments.length){r=arguments[1];for(var i in r)r.hasOwnProperty(i)&&(l[i]=r[i]);return l}var o={};for(var s in l)if(l.hasOwnProperty(s)){if(s==t)for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);o[s]=l[s]}return n.languages.DFS(n.languages,function(t,n){n===a[e]&&t!=e&&(this[t]=o)}),a[e]=o},DFS:function(e,t,r,a){a=a||{};for(var l in e)e.hasOwnProperty(l)&&(t.call(e,l,e[l],r||l),"Object"!==n.util.type(e[l])||a[n.util.objId(e[l])]?"Array"!==n.util.type(e[l])||a[n.util.objId(e[l])]||(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,l,a)):(a[n.util.objId(e[l])]=!0,n.languages.DFS(e[l],t,null,a)))}},plugins:{},highlightAll:function(e,t){n.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,r){var a={callback:r,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};n.hooks.run("before-highlightall",a);for(var l,i=a.elements||e.querySelectorAll(a.selector),o=0;l=i[o++];)n.highlightElement(l,t===!0,a.callback)},highlightElement:function(t,r,a){for(var l,i,o=t;o&&!e.test(o.className);)o=o.parentNode;o&&(l=(o.className.match(e)||[,""])[1].toLowerCase(),i=n.languages[l]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+l,t.parentNode&&(o=t.parentNode,/pre/i.test(o.nodeName)&&(o.className=o.className.replace(e,"").replace(/\s+/g," ")+" language-"+l));var s=t.textContent,u={element:t,language:l,grammar:i,code:s};if(n.hooks.run("before-sanity-check",u),!u.code||!u.grammar)return u.code&&(n.hooks.run("before-highlight",u),u.element.textContent=u.code,n.hooks.run("after-highlight",u)),n.hooks.run("complete",u),void 0;if(n.hooks.run("before-highlight",u),r&&_self.Worker){var g=new Worker(n.filename);g.onmessage=function(e){u.highlightedCode=e.data,n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(u.element),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},g.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else u.highlightedCode=n.highlight(u.code,u.grammar,u.language),n.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,a&&a.call(t),n.hooks.run("after-highlight",u),n.hooks.run("complete",u)},highlight:function(e,t,a){var l={code:e,grammar:t,language:a};return n.hooks.run("before-tokenize",l),l.tokens=n.tokenize(l.code,l.grammar),n.hooks.run("after-tokenize",l),r.stringify(n.util.encode(l.tokens),l.language)},matchGrammar:function(e,t,r,a,l,i,o){var s=n.Token;for(var u in r)if(r.hasOwnProperty(u)&&r[u]){if(u==o)return;var g=r[u];g="Array"===n.util.type(g)?g:[g];for(var c=0;c<g.length;++c){var h=g[c],f=h.inside,d=!!h.lookbehind,m=!!h.greedy,p=0,y=h.alias;if(m&&!h.pattern.global){var v=h.pattern.toString().match(/[imuy]*$/)[0];h.pattern=RegExp(h.pattern.source,v+"g")}h=h.pattern||h;for(var b=a,k=l;b<t.length;k+=t[b].length,++b){var w=t[b];if(t.length>e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+"</"+l.tag+">"},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
4
- Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};
5
- !function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism);
@@ -1,17 +0,0 @@
1
- var metas = document.getElementsByTagName('meta');
2
- var i;
3
- if (navigator.userAgent.match(/iPhone/i)) {
4
- for (i=0; i<metas.length; i++) {
5
- if (metas[i].name == "viewport") {
6
- metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
7
- }
8
- }
9
- document.addEventListener("gesturestart", gestureStart, false);
10
- }
11
- function gestureStart() {
12
- for (i=0; i<metas.length; i++) {
13
- if (metas[i].name == "viewport") {
14
- metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
15
- }
16
- }
17
- }
data/docs/marketpay.html DELETED
@@ -1,171 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta http-equiv="X-UA-Compatible" content="chrome=1">
6
- <title>Adyen-ruby-api-library by Adyen</title>
7
-
8
- <link rel="stylesheet" href="stylesheets/styles.css">
9
- <link rel="stylesheet" href="stylesheets/github-light.css">
10
- <meta name="viewport" content="width=device-width">
11
-
12
- <link rel="stylesheet" href="stylesheets/prism.css">
13
- <script src="javascripts/prism.js"></script>
14
- <!--[if lt IE 9]>
15
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
- <![endif]-->
17
- </head>
18
- <body>
19
- <div class="wrapper">
20
- <header>
21
- <h1>Adyen-ruby-api-library</h1>
22
- <p>Adyen API Library for ruby</p>
23
-
24
- <p class="view"><a href="https://github.com/Adyen/adyen-ruby-api-library">View the Project on GitHub <small>Adyen/adyen-ruby-api-library</small></a></p>
25
- <ul>
26
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/zipball/main">Download <strong>ZIP File</strong></a></li>
27
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library/tarball/main">Download <strong>TAR Ball</strong></a></li>
28
- <li><a href="https://github.com/Adyen/adyen-ruby-api-library">View On <strong>GitHub</strong></a></li>
29
- </ul>
30
- </header>
31
- <section>
32
- <h2 id="availablemethods">Available methods</h2>
33
-
34
- <h4 id="marketpayaccount">marketpay.account:</h4>
35
-
36
- <ul>
37
- <li>create_account_holder</li>
38
-
39
- <li>get_account_holder</li>
40
-
41
- <li>update_account_holder</li>
42
-
43
- <li>update_account_holder_state</li>
44
-
45
- <li>suspend_account_holder</li>
46
-
47
- <li>un_suspend_account_holder</li>
48
-
49
- <li>close_account_holder</li>
50
-
51
- <li>create_account</li>
52
-
53
- <li>update_account</li>
54
-
55
- <li>close_account</li>
56
-
57
- <li>upload_document</li>
58
-
59
- <li>get_uploaded_documents</li>
60
-
61
- <li>delete_bank_accounts</li>
62
-
63
- <li>delete_shareholders</li>
64
-
65
- <li>delete_signatories</li>
66
- </ul>
67
-
68
- <h4 id="marketpayfund">marketpay.fund:</h4>
69
-
70
- <ul>
71
- <li>account_holder_balance</li>
72
-
73
- <li>account_holder_transaction_list</li>
74
-
75
- <li>payout_account_holder</li>
76
-
77
- <li>transfer_funds</li>
78
-
79
- <li>setup_beneficiary</li>
80
-
81
- <li>refund_not_paid_out_transfers</li>
82
- </ul>
83
-
84
- <h4 id="marketpaynotification">marketpay.notification:</h4>
85
-
86
- <ul>
87
- <li>create_notification_configuration</li>
88
-
89
- <li>get_notification_configuration</li>
90
-
91
- <li>get_notification_configuration_list</li>
92
-
93
- <li>test_notification_configuration</li>
94
-
95
- <li>update_notification_configuration</li>
96
-
97
- <li>delete_notification_configurations</li>
98
- </ul>
99
-
100
- <h2 id="overview">Overview</h2>
101
-
102
- <p>Use Adyen MarketPay to power your marketplace with onboarding, payment processing, and payouts.</p>
103
-
104
- <p>Adyen MarketPay is an end-to-end payment solution for platforms and marketplaces. MarketPay's extensive API powers many types of platforms, such as crowdfunding platforms, peer-to-peer marketplaces, and on-demand services.</p>
105
-
106
- <p>MarketPay enables you to onboard sellers, service providers or contractors as sub-merchants and accept payments on their behalf. You can also split payments, transfer funds, and pay out to sub-merchants.</p>
107
-
108
- <p>From a technical perspective, MarketPay is broken down into 3 separate services:</p>
109
-
110
- <ul>
111
- <li>Account</li>
112
-
113
- <li>Fund</li>
114
-
115
- <li>Notification</li>
116
- </ul>
117
-
118
- <h2 id="authentication">Authentication</h2>
119
-
120
- <p>MarketPay is authenticated via webservice username and password.</p>
121
-
122
- <pre><code class="ruby language-ruby">adyen.ws_user = "ws@Company.TestCompany"
123
- adyen.ws_passord = "super_secure_password123"</code></pre></p>
124
-
125
- <h2 id="account">Account</h2>
126
-
127
- <p>The Account service is used for onboarding and KYC for people on both sides of your marketplace.</p>
128
-
129
- <p>To create an account holder, use the create_account_holder method:</p>
130
-
131
- <pre><code class="ruby language-ruby">response = adyen.marketpay.account('{
132
- "accountHolderCode":"GENERATE_CODE", // Your unique ID
133
- "accountHolderDetails":{
134
- "email":"tim@green.com",
135
- "individualDetails":{
136
- "name":{
137
- "firstName":"Tim",
138
- "gender": "MALE",
139
- "lastName":"Green"
140
- }
141
- }
142
- },
143
- "legalEntity":"Individual"
144
- }')</code></pre>
145
-
146
- <p>To enable payouts to an account, send required KYC information and docuemnts to the update_account_holder and upload_documents methods. Required KYC can be found in our docs <a href="https://docs.adyen.com/developers/marketpay/onboarding-and-verification#step2step2enablepayouts">here</a>.</p>
147
-
148
- <p>You can disable / delete account holders in the same way.</p>
149
-
150
- <h2 id="fund">Fund</h2>
151
-
152
- <p>The MarketPay Funding API provides endpoints for managing the funds in MarketPay accounts. These management operations include actions such as the transfer of funds from one account to another, the payout of funds to an account holder, and the retrieval of balances in an account.</p>
153
-
154
- <p>For further information on MarketPay fund management, please visit the <a href="https://docs.adyen.com/developers/marketpay/marketpay-overview">MarketPay documentation</a>.</p>
155
-
156
- <h2 id="notification">Notification</h2>
157
-
158
- <p>The Adyen MarketPay system can send you notifications for a set of events during the flow, such as creating new accounts or account holders, performing KYC checks, making payouts, and so on. </p>
159
-
160
- <p>These notifications are sent as webhooks to the corresponding URLs configured on your server. Refer to the <a href="https://docs.adyen.com/developers/marketpay/marketpay-notifications/configure-notifications">Configure notifications</a> section to learn how you can set up and test MarketPay notifications, and to <a href="Receive notifications">Receive notifications</a> to explore notification types and see the examples.</p>
161
-
162
- </section>
163
- <footer>
164
- <p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
165
- <p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
166
- </footer>
167
- </div>
168
- <script src="javascripts/scale.fix.js"></script>
169
-
170
- </body>
171
- </html>
data/docs/params.json DELETED
@@ -1 +0,0 @@
1
- {"name":"Adyen-ruby-api-library","tagline":"Adyen API Library for ruby","body":"# Adyen APIs Library for ruby\r\n\r\n## Description ##\r\nThe Adyen API Library for ruby enables you to work with Adyen APIs.\r\n\r\n## Getting Started ##\r\n\r\nMake sure you have an Adyen account. If you don't have this you can request it <a href=\"https://www.adyen.com/home/discover/test-account-signup#form\" target=\"_blank\">here</a>\r\nTo make the automatice testing cases working for your account change the credentials in the config/test.ini file.\r\n\r\n## Beta ##\r\nThis library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We are using this Libary in our Magento plugins. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), we will release a new version of the application.\r\n\r\n## Documentation ##\r\nhttps://docs.adyen.com/manuals/adyen-apis-library-for-ruby\r\n\r\n## Installation ##\r\nYou can use Composer or simply Download the Release\r\n\r\n## Composer ##\r\n\r\nThe preferred method is via [composer](https://getcomposer.org). Follow the\r\n[installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have\r\ncomposer installed.\r\n\r\n\r\nOnce composer is installed, execute the following command in your project root to install this library:\r\n\r\n```sh\r\ncomposer require adyen/ruby-api-library\r\n```\r\n\r\n## Examples ##\r\n\r\nCreate Payment Request on Test:\r\n```ruby\r\n\r\n$client = new \\Adyen\\Client();\r\n$client->setApplicationName(\"Adyen ruby Api Library Example\");\r\n$client->setUsername(\"YOUR USERNAME\");\r\n$client->setPassword(\"YOUR PASSWORD\");\r\n$client->setEnvironment(\\Adyen\\Environment::TEST);\r\n\r\n$service = new Service\\Payment($client);\r\n\r\n$json = '{\r\n \"card\": {\r\n \"number\": \"4111111111111111\",\r\n \"expiryMonth\": \"6\",\r\n \"expiryYear\": \"2016\",\r\n \"cvc\": \"737\",\r\n \"holderName\": \"John Smith\"\r\n },\r\n \"amount\": {\r\n \"value\": 1500,\r\n \"currency\": \"EUR\"\r\n },\r\n \"reference\": \"payment-test\",\r\n \"merchantAccount\": \"YOUR MERCHANT ACCOUNT\"\r\n}';\r\n\r\n$params = json_decode($json, true);\r\n\r\n$result = $service->authorise($params);\r\n\r\n```\r\n\r\nFor CSE use\r\n\r\n```ruby\r\n{\r\n \"amount\": {\r\n \"value\": 1499,\r\n \"currency\": \"GBP\"\r\n },\r\n \"reference\": \"payment-test\",\r\n \"merchantAccount\": \"YOUR MERCHANT ACCOUNT\",\r\n \"additionalData\": {\r\n \"card.encrypted.json\": \"THE ENCRYPTED DATA\"\r\n }\r\n}\r\n```\r\n\r\nRefund example:\r\n\r\n```ruby\r\n\r\n$client = new \\Adyen\\Client();\r\n$client->setApplicationName(\"Adyen ruby Api Library Example\");\r\n$client->setUsername(\"YOUR USERNAME\");\r\n$client->setPassword(\"YOUR PASSWORD\");\r\n$client->setEnvironment(\\Adyen\\Environment::TEST);\r\n\r\n// intialize modification service\r\n$service = new Service\\Modification($client);\r\n\r\n// set the amount you want to refund\r\n$modificationAmount = array('currency' => 'CURRENCY', 'value' => 'VALUE');\r\n\r\n// required are merchantAccount, ModificationAmount(currency,value), reference and originalReference\r\n$params = array(\r\n \"merchantAccount\" => 'YOUR MERCHANT ACCOUNT',\r\n \"modificationAmount\" => $modificationAmount,\r\n \"reference\" => 'YOUR OWN REFERENCE',\r\n \"originalReference\" => 'PSPREFERENCE OF THE PAYMENT YOU WANT TO REFUND'\r\n);\r\n\r\n$result = $service->refund($params);\r\n\r\n// $result['response'] = [refund-received]\r\n\r\n```\r\n\r\n## Tests ##\r\nFor the test cases you need the PCI permission enabled on you account. There are no test cases for CSE because credit card data is encrypted through our javascript library.\r\nBy default the test will then be skipped. If you have these permissions fill in your account details in the config/test.ini file to let the test work.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}