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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a86f317ddaebb1e8807220b705ba67d0ad717ae1
4
- data.tar.gz: 61d4c37731cecf063c68e13e4f46766c9d59c319
3
+ metadata.gz: 00f8ac54c8fa4829fc86fe665d0804ef7cfa997e
4
+ data.tar.gz: d88cd79656c0f82e00b3895b8a2b8183fe466563
5
5
  SHA512:
6
- metadata.gz: 810ec93b4da8ce661c5c95a83cd61263bc5bc9c76e9fd387c1b0bc0ef3511d6c31aebbda388a9557780a2c70930f03cea5be255f078174bd71180ba24d71bd5d
7
- data.tar.gz: 2ca2b105e0c3df700df8077863328ebfa60f078103ded03ce8b5cb716b20a829598182539ca4b9eadb39ddb14afbf07a50282e2cced2d52dac750c0dda707d78
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
- * Consulting API
51
+ * Consult API
52
52
 
53
53
  ```ruby
54
- BayonetClient::Ecommerce.consulting({
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
- transaction_time: 1476012879,
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
- * Feedback API
102
+ * Update Transaction API
103
103
 
104
104
  ```ruby
105
- BayonetClient::Ecommerce.feedback({
106
- feedback_api_trans_code: '<code returned by the previous consulting response>'
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
@@ -1,4 +1,4 @@
1
1
  module BayonetClient
2
- VERSION = '2.1.2'
2
+ VERSION = '2.2.0'
3
3
  SUPPORTED_API_VERSIONS = ['2']
4
4
  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.1.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-05 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty