cantook 0.0.9 → 0.1.0

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: 8b56ec6bfc9b513e4e50ffd669412d52c617e310
4
- data.tar.gz: e51669f40a922c9c9792572423f4062a0aa61c17
3
+ metadata.gz: d0767fbc1869bdbedd9b1b4fce57f328a14b3f8a
4
+ data.tar.gz: e8ff6121f43c1b5238db121a5c4476928084d3e3
5
5
  SHA512:
6
- metadata.gz: 9972e55cc9b39f26813e87629ef5dd3e792bd6648fe3ac35816a5a54d4812c905dac4d81fb7f59586f9e9395c0d9022eaa1a61e9989c5bb9887cabc996e381fb
7
- data.tar.gz: 306c8a7be338bfe0d5250b23bd8db28d9c93d70d73f0e87ce14de482e0eee6481d61261ad844b6efc93aaf83b3d53b5262d71d88436156185d7709d8735d01e8
6
+ metadata.gz: cd660bfb32a78528d4051fbf857a8fcdda1e89b13cee1ba665208bcbc7777d7182f2834217c1275e14a13ed90c65157a5bc66c32a70fd013256eeed3604f2aae
7
+ data.tar.gz: df2681d7798b7f8702a047243078c3760b8016768954a57014c67b7ec52780a5188ca154bc41d66a05060b4e8d897933d7ebc74991fd9520fe39d794db15f11c
data/README.md CHANGED
@@ -34,13 +34,14 @@ base_hash = {
34
34
  organisation_id: 123,
35
35
  sale_state: 'test',
36
36
  format: 'epub',
37
- isbn: '123456789asdf'
37
+ isbn: '123456789asdf',
38
+ currency: 'CAD'
38
39
  }
39
40
 
40
41
  simulate_hash = {
41
42
  cost: '999',
42
43
  protection: 'acs4',
43
- country: nil
44
+ country: 'CA'
44
45
  }
45
46
 
46
47
  cantook = Cantook::SimulateASale.new(base_hash)
@@ -62,14 +63,16 @@ base_hash = {
62
63
  organisation_id: 123,
63
64
  sale_state 'test',
64
65
  format: 'epub',
65
- isbn: '123456789asdf'
66
+ isbn: '123456789asdf',
67
+ currency: 'CAD'
66
68
  }
67
69
 
68
70
  sale_hash = {
69
71
  cost: '999',
70
72
  customer_id: '123',
71
73
  transaction_id: 'abc',
72
- protection: 'acs4'
74
+ protection: 'acs4',
75
+ country: 'CA'
73
76
  }
74
77
 
75
78
  cantook = Cantook::SaleOfAPublication.new(base_hash)
data/lib/cantook/base.rb CHANGED
@@ -12,6 +12,7 @@ module Cantook
12
12
  # organisation_id Yes Your merchant number. This number is provided upon registration.
13
13
  # isbn Yes The publication's ISBN.
14
14
  # format Yes The publication's format (pdf/epub/mobi).
15
+ # currency Yes
15
16
 
16
17
  attr_accessor :base_url,
17
18
  :auth,
@@ -18,7 +18,7 @@ module Cantook
18
18
  # transaction_id Yes The transaction / purchase basket's unique ID number. Multiple sales can be added to a basket, as long as they have the same unique ID number and are related to a single user. Alphanumerical characters only ("-" and "_" also accepted).
19
19
  # credit_card_prefix No 4 first numbers of the credit card number used for payment. It allows the publisher to check if the territory constraints (determined by these 4 first numbers) are respected.
20
20
  # sale_state No The sale state. By default, a sale is always in "active" state, but it is possible to specify that the sale must be in "test" state using this parameter. Possible values: active / test
21
- # country No The country which will be considered to validate the price of the publication. Value by default: the country of your organization. ISO 3166-1 Alpha-3 (can, fra, ita) format.
21
+ # country Yes The country which will be considered to validate the price of the publication.
22
22
  # aggregator No When a parent store makes a sale for one of it's child store, this field represents the ID of the parent store.
23
23
  # uname No First and last name of the user. The value of this parameter will appear in the text of the digital watermark that will be placed on the file. When this parameter is provided on Sale API call, the watermarking delay will be shortened on the download request (the download will begin as soon as the user clicks on the download button instead of waiting for the platform to generate the watermarked copy).
24
24
 
@@ -14,7 +14,7 @@ module Cantook
14
14
  # Name Mandatory Description
15
15
  # cost Yes The price of the sale in cents (e.g., $19.99 => 1999).
16
16
  # protection Yes The type of protection on the sold publication (none/watermark/acs4/acs4_time_limited).
17
- # country No The country which will be considered to validate the price of the publication. Value by default: the country of your organization. ISO 3166-1 alpha-3 (can, fra, ita) format.
17
+ # country Yes The country which will be considered to validate the price of the publication.
18
18
 
19
19
  # RESPONSE CODES
20
20
  # Code Content Description
@@ -1,3 +1,3 @@
1
1
  module Cantook
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
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.9
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gordon B. Isnor