processout 1.0.4 → 1.0.5

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: 78222bf7f9a5fd5ff01cec3a596b22225bd3bedd
4
- data.tar.gz: 3258bf1781f3e6554a6187119c944e70fc82ed74
3
+ metadata.gz: f5e2cdc042316196e59c7dd6ebb34a1a25581bd0
4
+ data.tar.gz: '0967a09a211c169ad983027c6b0a5b6744034c71'
5
5
  SHA512:
6
- metadata.gz: ea9ac41a42369d62627bb6bc877357149e5166d96b1ec8dc6c29777df24d41e99f4b9b172c86a896cdb299c8dc8312aac54df7d939083e0507e96c104183ade4
7
- data.tar.gz: e63362345eb3430585f8ad72124c30a94359a68307e94aec9f2d530a24c9f4009a6fc4ab6efc28fc9e97b5267c3fdf540b4dcf0c60dd8349e52e4057cbd9fd6a
6
+ metadata.gz: 39d967203cfd32de53825a0e7d43dbaebc74e753b615c2d256045e997d2160d48961e5fb6ef35b90bfc3cd5cd3cad4ce3cf4c170c9e7dd840a8db1adaf6806d7
7
+ data.tar.gz: d62e0993b549096faca9328b40e55ff8f5b0df3ab62d26f99dc57f6a4dc1a234391420a72dee3291309e543898a81919c95bf7a88a4a8fba17f3b9f06083bf6e
@@ -272,6 +272,26 @@ module ProcessOut
272
272
  return_values[0]
273
273
  end
274
274
 
275
+ # Delete a customer's token by its ID.
276
+ # Params:
277
+ # +token_id+:: ID of the token
278
+ # +options+:: +Hash+ of options
279
+ def delete_token(token_id, options = {})
280
+ request = Request.new(@client)
281
+ path = "customers/" + CGI.escape(@id) + "/tokens/" + CGI.escape(token_id) + ""
282
+ data = {
283
+
284
+ }
285
+
286
+ response = Response.new(request.delete(path, data, options))
287
+ return_values = Array.new
288
+
289
+ return_values.push(response.success)
290
+
291
+
292
+ return_values[0]
293
+ end
294
+
275
295
  # Get the transactions belonging to the customer.
276
296
  # Params:
277
297
  # +options+:: +Hash+ of options
@@ -9,6 +9,7 @@ module ProcessOut
9
9
 
10
10
  attr_reader :id
11
11
  attr_reader :customer
12
+ attr_reader :customer_id
12
13
  attr_reader :card
13
14
  attr_reader :type
14
15
  attr_reader :metadata
@@ -31,6 +32,10 @@ module ProcessOut
31
32
 
32
33
  end
33
34
 
35
+ def customer_id=(val)
36
+ @customer_id = val
37
+ end
38
+
34
39
  def card=(val)
35
40
  if val.instance_of? Card
36
41
  @card = val
@@ -68,6 +73,7 @@ module ProcessOut
68
73
 
69
74
  @id = data.fetch(:id, "")
70
75
  @customer = data.fetch(:customer, nil)
76
+ @customer_id = data.fetch(:customer_id, "")
71
77
  @card = data.fetch(:card, nil)
72
78
  @type = data.fetch(:type, "")
73
79
  @metadata = data.fetch(:metadata, Hash.new)
@@ -91,6 +97,9 @@ module ProcessOut
91
97
  if data.include? "customer"
92
98
  self.customer = data["customer"]
93
99
  end
100
+ if data.include? "customer_id"
101
+ self.customer_id = data["customer_id"]
102
+ end
94
103
  if data.include? "card"
95
104
  self.card = data["card"]
96
105
  end
@@ -190,6 +199,25 @@ module ProcessOut
190
199
 
191
200
 
192
201
 
202
+ return_values[0]
203
+ end
204
+
205
+ # Delete a customer token
206
+ # Params:
207
+ # +options+:: +Hash+ of options
208
+ def delete(options = {})
209
+ request = Request.new(@client)
210
+ path = "customers/" + CGI.escape(@customer_id) + "/tokens/" + CGI.escape(@id) + ""
211
+ data = {
212
+
213
+ }
214
+
215
+ response = Response.new(request.delete(path, data, options))
216
+ return_values = Array.new
217
+
218
+ return_values.push(response.success)
219
+
220
+
193
221
  return_values[0]
194
222
  end
195
223
 
@@ -1,3 +1,3 @@
1
1
  module ProcessOut
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processout
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel HUEZ