checkout_sdk 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile.lock +20 -20
- data/README.md +33 -15
- data/checkout_sdk.gemspec +3 -3
- data/documentation/.gitignore +20 -0
- data/documentation/docs/environment.md +26 -0
- data/documentation/docs/getting_started.md +48 -0
- data/documentation/docs/initialize.md +19 -0
- data/documentation/docs/install.md +21 -0
- data/documentation/docs/payments.md +200 -0
- data/documentation/docs/sources.md +53 -0
- data/documentation/docs/tokens.md +88 -0
- data/documentation/docusaurus.config.js +60 -0
- data/documentation/package-lock.json +13511 -0
- data/documentation/package.json +32 -0
- data/documentation/sidebars.js +10 -0
- data/documentation/src/css/custom.css +103 -0
- data/documentation/src/pages/index.js +10 -0
- data/documentation/src/pages/styles.module.css +37 -0
- data/documentation/static/img/favicon.png +0 -0
- data/documentation/static/img/logo.png +0 -0
- data/documentation/static/img/undraw_docusaurus_mountain.svg +170 -0
- data/documentation/static/img/undraw_docusaurus_react.svg +169 -0
- data/documentation/static/img/undraw_docusaurus_tree.svg +1 -0
- data/documentation/yarn.lock +9369 -0
- data/lib/checkout_sdk/api_resource.rb +4 -1
- data/lib/checkout_sdk/configuration.rb +2 -1
- data/lib/checkout_sdk/data/payment_request_source.rb +2 -1
- data/lib/checkout_sdk/version.rb +1 -1
- data/spec/checkout_sdk_spec.rb +14 -0
- metadata +32 -12
@@ -5,7 +5,10 @@ class CheckoutSdk::ApiResource
|
|
5
5
|
attr_reader :checkout_connection
|
6
6
|
|
7
7
|
def initialize
|
8
|
-
@checkout_connection = Excon.new(
|
8
|
+
@checkout_connection = Excon.new(
|
9
|
+
"#{CheckoutSdk.configuration.base_url}",
|
10
|
+
persistent: CheckoutSdk.configuration.persistent
|
11
|
+
)
|
9
12
|
end
|
10
13
|
|
11
14
|
def request_payment(data_object)
|
@@ -1,9 +1,10 @@
|
|
1
1
|
class CheckoutSdk::Configuration
|
2
|
-
attr_accessor :secret_key, :public_key, :base_url
|
2
|
+
attr_accessor :secret_key, :public_key, :base_url, :persistent
|
3
3
|
|
4
4
|
def initialize
|
5
5
|
@secret_key = nil
|
6
6
|
@public_key = nil
|
7
7
|
@base_url = nil
|
8
|
+
@persistent = true
|
8
9
|
end
|
9
10
|
end
|
@@ -10,13 +10,14 @@ class CheckoutSdk::PaymentRequestSource
|
|
10
10
|
:success_url, :failure_url, :payment_ip, :recipient_dob, :recipient_account_number,
|
11
11
|
:recipient_zip, :recipient_last_name, :processing_mid, :metadata, :cvv, :id, :card_number,
|
12
12
|
:card_expiry_month, :card_expiry_year, :card_name, :card_cvv, :card_stored, :customer_id,
|
13
|
-
:customer_email
|
13
|
+
:customer_email, :merchant_initiated
|
14
14
|
|
15
15
|
def data
|
16
16
|
{ source: source(type),
|
17
17
|
amount: amount,
|
18
18
|
currency: currency,
|
19
19
|
payment_type: payment_type,
|
20
|
+
merchant_initiated: merchant_initiated,
|
20
21
|
reference: reference,
|
21
22
|
description: description,
|
22
23
|
capture: capture,
|
data/lib/checkout_sdk/version.rb
CHANGED
data/spec/checkout_sdk_spec.rb
CHANGED
@@ -4,4 +4,18 @@ RSpec.describe CheckoutSdk do
|
|
4
4
|
it "has a version number" do
|
5
5
|
expect(CheckoutSdk::VERSION).not_to be nil
|
6
6
|
end
|
7
|
+
|
8
|
+
describe "Config persistent" do
|
9
|
+
it "has a default persistent option" do
|
10
|
+
expect(CheckoutSdk.configuration.persistent).to be_truthy
|
11
|
+
end
|
12
|
+
|
13
|
+
it "allows you to change the persistent option" do
|
14
|
+
CheckoutSdk.configure do |config|
|
15
|
+
config.persistent = false
|
16
|
+
end
|
17
|
+
|
18
|
+
expect(CheckoutSdk.configuration.persistent).to be_falsy
|
19
|
+
end
|
20
|
+
end
|
7
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkout_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Khalid Jazaerly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.5'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,9 +87,9 @@ dependencies:
|
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.66'
|
90
|
-
- - "
|
90
|
+
- - "<="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
92
|
+
version: 0.88.0
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -97,9 +97,9 @@ dependencies:
|
|
97
97
|
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0.66'
|
100
|
-
- - "
|
100
|
+
- - "<="
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: 0.88.0
|
103
103
|
description: A Ruby API wrapper for checkout.com.
|
104
104
|
email:
|
105
105
|
- khalid.jaz@gmail.com
|
@@ -118,6 +118,27 @@ files:
|
|
118
118
|
- bin/console
|
119
119
|
- bin/setup
|
120
120
|
- checkout_sdk.gemspec
|
121
|
+
- documentation/.gitignore
|
122
|
+
- documentation/docs/environment.md
|
123
|
+
- documentation/docs/getting_started.md
|
124
|
+
- documentation/docs/initialize.md
|
125
|
+
- documentation/docs/install.md
|
126
|
+
- documentation/docs/payments.md
|
127
|
+
- documentation/docs/sources.md
|
128
|
+
- documentation/docs/tokens.md
|
129
|
+
- documentation/docusaurus.config.js
|
130
|
+
- documentation/package-lock.json
|
131
|
+
- documentation/package.json
|
132
|
+
- documentation/sidebars.js
|
133
|
+
- documentation/src/css/custom.css
|
134
|
+
- documentation/src/pages/index.js
|
135
|
+
- documentation/src/pages/styles.module.css
|
136
|
+
- documentation/static/img/favicon.png
|
137
|
+
- documentation/static/img/logo.png
|
138
|
+
- documentation/static/img/undraw_docusaurus_mountain.svg
|
139
|
+
- documentation/static/img/undraw_docusaurus_react.svg
|
140
|
+
- documentation/static/img/undraw_docusaurus_tree.svg
|
141
|
+
- documentation/yarn.lock
|
121
142
|
- lib/checkout_sdk.rb
|
122
143
|
- lib/checkout_sdk/api_resource.rb
|
123
144
|
- lib/checkout_sdk/configuration.rb
|
@@ -152,8 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
173
|
- !ruby/object:Gem::Version
|
153
174
|
version: '0'
|
154
175
|
requirements: []
|
155
|
-
|
156
|
-
rubygems_version: 2.5.2.3
|
176
|
+
rubygems_version: 3.0.3
|
157
177
|
signing_key:
|
158
178
|
specification_version: 4
|
159
179
|
summary: A Ruby API wrapper for checkout.com.
|