README.md in bayonet_client-2.2.1 vs README.md in bayonet_client-2.3.0

- old
+ new

@@ -36,13 +36,17 @@ * Set up your configuration, with parameters (api_key, api_version). The latest stable API version is '2' ```ruby BayonetClient.configure(api_key, api_version) ``` + You can also set a timeout value (in seconds): + ```ruby + BayonetClient.configure(api_key, api_version, timeout) + ``` ## Usage -Once you have Bayonet's SDK configured, you can call the APIs with the following syntax.Follow the guidelines specific to the product you are integrating: +Once you have Bayonet's SDK configured, you can call the APIs with the following syntax. Follow the guidelines specific to the product you are integrating: * [Ecommerce](#ecommerce) * [Lending](#lending) @@ -76,11 +80,12 @@ state: 'Mexico DF', country: 'MEX', zip_code: '64000' }, payment_method: 'card', - transaction_id: '<your internal ID for this transaction>' + order_id: '<your internal ID for this order (mandatory)>', + transaction_id: '<your internal ID for this transaction (optional)>', payment_gateway: 'stripe', coupon: 'discount_buen_fin', expedited_shipping: true, products: [ { @@ -101,14 +106,17 @@ ``` * Update Transaction API ```ruby BayonetClient::Ecommerce.update-transaction({ + order_id: '<your internal ID for this order (as sent in the consult step)>', transaction_id: '<your internal ID for this transaction (as sent in the consult step)>', + bayonet_tracking_id: '<tracking ID returned by the API in the consult step>', transaction_status: 'success', ... }) + # please note that you can use either one of 'order_id', 'transaction_id', or 'bayonet_tracking_id' to update the status of a transaction ``` * Feedback-historical API ```ruby BayonetClient::Ecommerce.feedback_historical({ @@ -290,10 +298,10 @@ puts e.reason_code puts e.reason_message end begin - BayonetClient::Ecommerce.consulting(params) + BayonetClient::Ecommerce.consult(params) rescue BayonetClient::BayonetError => e puts e.reason_code puts e.reason_message end ```