diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c8e41e..9459e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ A simple client library for [PCI Proxy](https://pci-proxy.com)'s API +v1.1.0 - 17th January 2020 - Return an instance of PciProxy::Model::TokenisedCard instead of plain Hash + v1.0.1 - 14th January 2020 - Relax dependency version requirements v1.0.0 - 14th January 2020 - Initial release - covering the [Token API](https://docs.pci-proxy.com/collect-and-store-cards/capture-iframes/token-api) diff --git a/Gemfile.lock b/Gemfile.lock index 9725f64..db4b6df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - pci_proxy (1.0.1) + pci_proxy (1.1.0) faraday (>= 0.8.9) multi_json (>= 1.10.0) diff --git a/README.md b/README.md index 5327f3c..3019047 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,10 @@ And execute a token exchange like so: client.execute(transaction_id: '1234567890') ``` -In the event of a 200 OK response, the JSON response body is returned as a hash, for example: +In the event of a 200 OK response, an instance of PciProxy::Model::TokenisedCard is returned: ```ruby -{"aliasCC"=>"411111GGCMUJ1111", "aliasCVV"=>"vCslSwP0SQ9JXJy-nDzLKHaS"} +#"411111GGCMUJ1111", "aliasCVV"=>"b8XeAbhQQES6OVWTpOCaAscj", "paymentMethod"=>"VIS"}, @pan_token="411111GGCMUJ1111", @cvv_token="b8XeAbhQQES6OVWTpOCaAscj", @type_slug=:visa> ``` In the event of an error, a subclass of ```PciProxyAPIError``` will be raised. diff --git a/lib/pci_proxy.rb b/lib/pci_proxy.rb index e5d79fa..17513cd 100644 --- a/lib/pci_proxy.rb +++ b/lib/pci_proxy.rb @@ -3,6 +3,7 @@ require 'pci_proxy/base' require 'pci_proxy/token' +require 'pci_proxy/model/tokenised_card' module PciProxy PciProxyAPIError = Class.new(StandardError)