bayonet_client 2.1.2 → 2.2.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 +4 -4
- data/README.md +6 -7
- data/lib/bayonet_client/response.rb +4 -1
- data/lib/bayonet_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00f8ac54c8fa4829fc86fe665d0804ef7cfa997e
|
4
|
+
data.tar.gz: d88cd79656c0f82e00b3895b8a2b8183fe466563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cc37b86aafdeebd4a97ee9de24c815f7246ed1a03a6e48d06c7a0de14d24eb385c62889a2463d16b85621fdd991570bb1ecdd3718277c4e7e35c21b2a1c7193
|
7
|
+
data.tar.gz: 6d79e7ee70a721aa547bca006cff2a552db83df8d8e83148a052baa66311f30d2e7ec47122a5a29def3d7f55878007cea3bc8124266de4e88df67505607cdf7f
|
data/README.md
CHANGED
@@ -48,10 +48,10 @@ Once you have Bayonet's SDK configured, you can call the APIs with the following
|
|
48
48
|
|
49
49
|
### Ecommerce
|
50
50
|
|
51
|
-
*
|
51
|
+
* Consult API
|
52
52
|
|
53
53
|
```ruby
|
54
|
-
BayonetClient::Ecommerce.
|
54
|
+
BayonetClient::Ecommerce.consult({
|
55
55
|
channel: 'ecommerce',
|
56
56
|
email: 'example@bayonet.io',
|
57
57
|
consumer_name: 'Example name',
|
@@ -78,7 +78,7 @@ Once you have Bayonet's SDK configured, you can call the APIs with the following
|
|
78
78
|
zip_code: '64000'
|
79
79
|
},
|
80
80
|
payment_method: 'card',
|
81
|
-
|
81
|
+
transaction_id: '<your internal ID for this transaction>'
|
82
82
|
payment_gateway: 'stripe',
|
83
83
|
coupon: 'discount_buen_fin',
|
84
84
|
expedited_shipping: true,
|
@@ -99,13 +99,12 @@ Once you have Bayonet's SDK configured, you can call the APIs with the following
|
|
99
99
|
bayonet_fingerprint_token: '<token generated by Bayonet fingerprinting JS'
|
100
100
|
})
|
101
101
|
```
|
102
|
-
*
|
102
|
+
* Update Transaction API
|
103
103
|
|
104
104
|
```ruby
|
105
|
-
BayonetClient::Ecommerce.
|
106
|
-
|
105
|
+
BayonetClient::Ecommerce.update-transaction({
|
106
|
+
transaction_id: '<your internal ID for this transaction (as sent in the consult step)>',
|
107
107
|
transaction_status: 'success',
|
108
|
-
transaction_id: '<your internal ID for this transaction>',
|
109
108
|
...
|
110
109
|
})
|
111
110
|
```
|
@@ -4,7 +4,7 @@ module BayonetClient
|
|
4
4
|
|
5
5
|
class BayonetResponse
|
6
6
|
attr_accessor :rules_triggered,
|
7
|
-
:decision, :payload, :reason_code,
|
7
|
+
:decision, :bayonet_tracking_id, :payload, :reason_code,
|
8
8
|
:reason_message, :request_body, :bayonet_fingerprint,
|
9
9
|
:raw
|
10
10
|
|
@@ -16,6 +16,9 @@ module BayonetClient
|
|
16
16
|
if parsed_response.key?('decision')
|
17
17
|
self.decision = parsed_response['decision']
|
18
18
|
end
|
19
|
+
if parsed_response.key?('bayonet_tracking_id')
|
20
|
+
self.bayonet_tracking_id = parsed_response['bayonet_tracking_id']
|
21
|
+
end
|
19
22
|
if parsed_response.key?('payload')
|
20
23
|
self.payload = parsed_response['payload']
|
21
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bayonet_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bayonet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|