wheretocard 0.1.0 → 0.1.2

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: 9525b0d8a16b19b0ca6a24e94c14c0695fbad479
4
- data.tar.gz: e023fb76f40ed4ed084f710b0f8845e4364904c1
3
+ metadata.gz: bab759e2fd259f5d3fac47e132ed5716802c61cc
4
+ data.tar.gz: 6b2dbcec0aed0cd4a8b07ccdb3819dab3b6e8dde
5
5
  SHA512:
6
- metadata.gz: 74b996595133f49ea3a67b3fcd64f7d0039676995d16ff6670d86554143250568a3ea586dcb561cd48feb45ceff6e585d1776ce8a0072623040ccf888cbd0b8e
7
- data.tar.gz: b65fb0053e6d10167f7ac99832f79e10d0a9ea31d40015a32b15883de515943b7a7a7998ac8ec9a38534b8772fdbc051e8819cdf4cfac36eb44625d836154472
6
+ metadata.gz: 6676300bd6a8b5d31019aea09c6b2a5355974b8b346d309a32fb46a598c33fe031ba860ac676aad80c3d3ab0aa8657c78785eafba9f3019b6aeb126e15a9b87b
7
+ data.tar.gz: ec60a2e644030ecc7788d15113aad0a5ed5eb79b93d8f1c58278fba4e8f436affef2b6bee747f414dce29c7830b80cd7f4f7a9b46da6e55a0c7deba8ca927ebf
data/README.md CHANGED
@@ -35,18 +35,18 @@ To request two barcodes from two different ticket kinds (4 barcodes in total), y
35
35
  )
36
36
 
37
37
  # Check the credentials first, without making test orders
38
- @order.check_credentials("TICKET_KIND_1_CODE") #returns true or false
38
+ @wtc_client.check_credentials("TICKET_KIND_1_CODE") #returns true or false
39
39
 
40
40
  # Initialize a new OrderRequest
41
- @order_request = @wtc_client.order_request
42
- @order_request.first_name = "Foo"
43
- @order_request.last_name = "Bar"
44
- @order_request.email = "foobar@example.org"
45
- @order_request.delivery_type = "BARCODE" # ["TEXTCODE","BARCODE"]
41
+ @order = @wtc_client.new_order
42
+ @order.first_name = "Foo"
43
+ @order.last_name = "Bar"
44
+ @order.email = "foobar@example.org"
45
+ @order.delivery_format = "BARCODE" # ["TEXTCODE","BARCODE"]
46
46
 
47
47
  # Add line itmes to the request
48
48
  # Please note: the price is in cents (currency is EUR)
49
- @order_request.add_line_item(
49
+ @order.add_line_item(
50
50
  product_code: TICKET_KIND_1_CODE,
51
51
  quantity: 2,
52
52
  price: 1250,
@@ -57,9 +57,11 @@ To request two barcodes from two different ticket kinds (4 barcodes in total), y
57
57
 
58
58
  # It is also possible to not let WtC pick a barcode,
59
59
  # but to submit your own barcode by adding the 'barcode' param
60
- @order_request.add_line_item(
60
+ # WARNING: don't use quantity > 1 here, otherwise you'l create duplicate barcodes
61
+ # If you need multiple tickets for this ticket kind, simply create one line item
62
+ # per ticket.
63
+ @order.add_line_item(
61
64
  product_code: TICKET_KIND_3_CODE,
62
- quantity: 2,
63
65
  price: 1750,
64
66
  description: Action Description,
65
67
  barcode: "ABC12345"
@@ -69,7 +71,7 @@ To request two barcodes from two different ticket kinds (4 barcodes in total), y
69
71
 
70
72
 
71
73
  # Submit the request and receive a response object
72
- @response = @order_request.submit
74
+ @response = @order.submit
73
75
 
74
76
  # redirect the consumer to the PDF download page:
75
77
  if @response.success?
data/lib/wheretocard.rb CHANGED
@@ -13,7 +13,7 @@ require 'nokogiri'
13
13
  # Files
14
14
  require "wheretocard/version"
15
15
  require "wheretocard/config"
16
- require "wheretocard/engine" if defined?(Rails) && Rails::VERSION::MAJOR.to_i >= 3
16
+ # require "wheretocard/engine" if defined?(Rails) && Rails::VERSION::MAJOR.to_i >= 3
17
17
  require "wheretocard/wheretocard_error"
18
18
  require "wheretocard/client"
19
19
  require "wheretocard/order"
@@ -1,3 +1,3 @@
1
1
  module Wheretocard
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wheretocard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henk Meijer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.10'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.10'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: vcr
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fakeweb
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: coveralls
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: simplecov
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: httparty
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: nokogiri
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '>='
129
+ - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  description: Ruby binder to the Wherto CARD API
@@ -143,9 +143,9 @@ executables: []
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - .gitignore
147
- - .rspec
148
- - .travis.yml
146
+ - ".gitignore"
147
+ - ".rspec"
148
+ - ".travis.yml"
149
149
  - Gemfile
150
150
  - LICENSE.txt
151
151
  - README.md
@@ -174,17 +174,17 @@ require_paths:
174
174
  - lib
175
175
  required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - '>='
177
+ - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
- - - '>='
182
+ - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
186
  rubyforge_project:
187
- rubygems_version: 2.3.0
187
+ rubygems_version: 2.4.5.1
188
188
  signing_key:
189
189
  specification_version: 4
190
190
  summary: Ruby binder to the Wherto CARD API