cantook 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eca05aa27bc6614b4bdbdf3a5ddd08c173217d3e
4
- data.tar.gz: 61e5da210ac6500bfc4c2be0a30c1f7b435c96df
3
+ metadata.gz: 8f2fcc88549b583a38aafb51c0b03047928c1bb7
4
+ data.tar.gz: 9be02f0ae31395d99bd6977e63d4034f4571f8f7
5
5
  SHA512:
6
- metadata.gz: e21372c51bd5e0bad3aa4d7ff0e50feff3115ec6542196e0c23f9f2288f0131829ede5b1b89987e8732331c844425f6e81021ec7aca7aa782fd48261aa80eed0
7
- data.tar.gz: f7064dc43f0b8d62a9379d3a889e5437855e5580168ee5e1524d13c2f347654a16237d97b9fdd7705730693d7bd4d159ea2ee3d95d992e87b1fceebb00d649d4
6
+ metadata.gz: 35c92813573e7e5e87401f296aa7df5009d7af837ddc1f8e114bbe7651dc5beaf81d16c3a6fb1601c1533d5d91072b48d0f28e692eb7f57c4fb92e935e153c97
7
+ data.tar.gz: 612c2083689e5a0fae64431c0beba5667c387015e8ac610b21acf7c1fc2566806f376b4c998f06bd70c71f265c490eafd6c6916ebceca1285cd9937a764ef21b
data/lib/cantook/base.rb CHANGED
@@ -23,7 +23,8 @@ module Cantook
23
23
  :format,
24
24
  :response,
25
25
  :query,
26
- :sale_state
26
+ :sale_state,
27
+ :currency
27
28
 
28
29
  # @param [Hash] params
29
30
  # @option params [String] :username - your Cantook API username
@@ -33,6 +34,7 @@ module Cantook
33
34
  # @option params [String] :isbn - ISBN of the publication you are selling
34
35
  # @option params [String] :format - format of the publication being sold, eg 'epub' or 'mobi'
35
36
  # @option params [String] :sale_state - use 'test' for test/development, nil for production (real sales)
37
+ # @option params [String] :currency - 3-letter ISO-4217 code
36
38
  def initialize(params = {})
37
39
  @username = params[:username]
38
40
  @password = params[:password]
@@ -41,13 +43,14 @@ module Cantook
41
43
  @isbn = params[:isbn]
42
44
  @format = params[:format]
43
45
  @sale_state = params[:sale_state]
46
+ @currency = params[:isbn]
44
47
  @base_url = "https://#{platform}/api/organisations/#{organisation_id}"
45
48
  @auth = { username: username, password: password }
46
49
  end
47
50
 
48
51
  # @return [Hash] A basic hash of options common to all Cantook requests
49
52
  def base_options
50
- { format: format, isbn: isbn, sale_state: sale_state }
53
+ { format: format, isbn: isbn, sale_state: sale_state, currency: currency }
51
54
  end
52
55
  private :base_options
53
56
 
@@ -1,3 +1,3 @@
1
1
  module Cantook
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cantook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gordon B. Isnor