ethikdo 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91261a326d27463a34a86290689a2ecee73fef23f92ed8f80f0b4fc12e05bada
4
- data.tar.gz: 1df1082ae02df32b9275fce2e332b4dc05c254eb0fab0ce6bf6f73adb0aa991d
3
+ metadata.gz: c1a6102a4153dd8b98d42b53ef0a18560924b729e62981e345d139eaa224d036
4
+ data.tar.gz: 52276b286b5c55d961ddeb161caa42fa9bd63d4a3b8643f08fab3d82ac9a44c2
5
5
  SHA512:
6
- metadata.gz: 7f9799419e4b9ff6c5c726244ecfb00733030e1b20f2f859f1a66869a704db73af6af39085ac551241ecfc6ec0e5479251f97ff40f086dbc872774c4ab56f780
7
- data.tar.gz: 913eb2de458bed68fb41b273074e4caf58a5ed609af5c95a5fcdedf1c0d1a7914d854ea53214b777726e856de6dd2de8557b1fdc3a2640510adf15190401be73
6
+ metadata.gz: 6a622ca75067620e9ef4190895b9277af4d4f793237466ac10f5bdaaf707cfc8479a83635cc956d64e8de047e35cc47632931ca53e638187874637a06ac4039a
7
+ data.tar.gz: d56cc70605ea5959f032f78a34c35bdefb16acf183b5635c1e69ea7b0cd1a756c0d9bce5dd09ea2cb39ae06c5f1c3425e051dd3135597f78a9b0229d664c28a7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ethikdo (0.0.1)
4
+ ethikdo (1.1.0)
5
5
  httparty
6
6
 
7
7
  GEM
@@ -27,19 +27,22 @@ GEM
27
27
  tzinfo (~> 2.0)
28
28
  addressable (2.8.1)
29
29
  public_suffix (>= 2.0.2, < 6.0)
30
+ bigdecimal (3.3.1)
30
31
  builder (3.2.4)
31
32
  concurrent-ruby (1.1.10)
32
33
  crack (0.4.5)
33
34
  rexml
34
35
  crass (1.0.6)
36
+ csv (3.3.5)
35
37
  diff-lcs (1.5.0)
36
38
  erubi (1.11.0)
37
39
  generator_spec (0.9.4)
38
40
  activesupport (>= 3.0.0)
39
41
  railties (>= 3.0.0)
40
42
  hashdiff (1.0.1)
41
- httparty (0.20.0)
42
- mime-types (~> 3.0)
43
+ httparty (0.23.2)
44
+ csv
45
+ mini_mime (>= 1.0.0)
43
46
  multi_xml (>= 0.5.2)
44
47
  i18n (1.12.0)
45
48
  concurrent-ruby (~> 1.0)
@@ -47,12 +50,13 @@ GEM
47
50
  crass (~> 1.0.2)
48
51
  nokogiri (>= 1.5.9)
49
52
  method_source (1.0.0)
50
- mime-types (3.4.1)
51
- mime-types-data (~> 3.2015)
52
- mime-types-data (3.2022.0105)
53
+ mini_mime (1.1.5)
54
+ mini_portile2 (2.8.9)
53
55
  minitest (5.16.3)
54
- multi_xml (0.6.0)
55
- nokogiri (1.13.9-arm64-darwin)
56
+ multi_xml (0.7.2)
57
+ bigdecimal (~> 3.1)
58
+ nokogiri (1.13.9)
59
+ mini_portile2 (~> 2.8.0)
56
60
  racc (~> 1.4)
57
61
  public_suffix (5.0.0)
58
62
  racc (1.6.0)
@@ -97,6 +101,7 @@ GEM
97
101
 
98
102
  PLATFORMS
99
103
  arm64-darwin-20
104
+ arm64-darwin-24
100
105
 
101
106
  DEPENDENCIES
102
107
  ethikdo!
@@ -54,10 +54,10 @@ module Ethikdo
54
54
 
55
55
  def self.base_options
56
56
  {
57
- format: :json,
58
57
  headers: {
59
58
  'Accept' => 'application/json',
60
- 'Authorization' => api_key
59
+ 'Authorization' => api_key,
60
+ 'Content-Type' => 'application/json'
61
61
  }
62
62
  }
63
63
  end
@@ -17,7 +17,7 @@ module Ethikdo
17
17
  attr_accessor :results
18
18
 
19
19
  def self.create(card_number:, card_crypto:)
20
- response = execute("post", '/provisions/', body: { card_number: card_number, card_crypto: card_crypto })
20
+ response = execute("post", '/provisions/', body: { card_number: card_number.to_s, card_crypto: card_crypto.to_s }.to_json)
21
21
  self.new(response.parsed_response)
22
22
  end
23
23
 
@@ -19,12 +19,12 @@ module Ethikdo
19
19
 
20
20
  def self.create(capture_token:, amount_requested:, amount_purchased: 0, transaction_id:, customer_email: nil)
21
21
  response = execute('post', '/sales/', body: {
22
- capture_token: capture_token,
23
- amount_requested: amount_requested,
24
- amount_purchased: amount_purchased,
25
- transaction_id: transaction_id,
26
- customer_email: customer_email
27
- })
22
+ capture_token: capture_token,
23
+ amount_requested: amount_requested.to_s,
24
+ amount_purchased: amount_purchased.to_s,
25
+ transaction_id: transaction_id.to_s,
26
+ customer_email: customer_email
27
+ }.to_json)
28
28
  self.new(response.parsed_response)
29
29
  end
30
30
 
@@ -1,3 +1,3 @@
1
1
  module Ethikdo
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -34,13 +34,17 @@ describe Ethikdo::Provision do
34
34
  expect(WebMock).to have_requested(
35
35
  :post,
36
36
  'https://www.ethikdo.co/api/v1/provisions/'
37
- ).with(headers: {
38
- 'Accept' => 'application/json',
39
- 'Authorization' => '1234',
40
- }, body: {
41
- 'card_number' => '1234123412341234',
42
- 'card_crypto' => '123'
43
- })
37
+ ).with(
38
+ headers: {
39
+ 'Accept' => 'application/json',
40
+ 'Authorization' => '1234',
41
+ 'Content-Type' => 'application/json',
42
+ },
43
+ body: {
44
+ card_number: '1234123412341234',
45
+ card_crypto: '123'
46
+ }.to_json
47
+ )
44
48
  end
45
49
 
46
50
  it 'returns the correct response' do
@@ -34,16 +34,19 @@ describe Ethikdo::Transaction do
34
34
  expect(WebMock).to have_requested(
35
35
  :post,
36
36
  'https://www.ethikdo.co/api/v1/sales/'
37
- ).with(headers: {
38
- 'Accept' => 'application/json',
39
- 'Authorization' => '1234',
40
- }, body: {
37
+ ).with(
38
+ headers: {
39
+ 'Accept' => 'application/json',
40
+ 'Authorization' => '1234',
41
+ },
42
+ body: {
41
43
  'capture_token' => 'foo',
42
44
  'amount_requested' => '10000',
43
45
  'amount_purchased' => '10000',
44
46
  'transaction_id' => '1',
45
47
  'customer_email' => 'foo@bar.com'
46
- })
48
+ }.to_json
49
+ )
47
50
  end
48
51
 
49
52
  it 'returns the correct response' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ethikdo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Baumann
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-24 00:00:00.000000000 Z
12
+ date: 2025-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
- rubygems_version: 3.3.3
151
+ rubygems_version: 3.5.22
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: A ruby wrapper for Ethikdo REST API