gyftwrapper 0.1.1 → 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: 45ae9c41cac6ac566923edd15dc1bbc3ecf363b4
4
- data.tar.gz: 053cdca66820bbc0d5112573054853490c61b8b8
3
+ metadata.gz: ddb57cbe8712bfc61d33311366949034ec0cb6d4
4
+ data.tar.gz: 3931e17052a7e6447e5e58a80da4b76bc64fcca6
5
5
  SHA512:
6
- metadata.gz: 53241b1b0a125e5f53208c1b29222b902c367a65a1a10156ca0cf46f7cb8cc86e0b03dfb0b1844dfc7aa6546df709367fb8fc0fd1dab0606a33c34157a81e610
7
- data.tar.gz: a512e552e96b857e7de11b1e9160d7d7a6a504b032218e9c8b914f972fa3c7b65749b8f4f62535ee35fe6040d5e29bd6735620837b735184cefc6bccc49ca614
6
+ metadata.gz: 147ae44a310c2be9ad8b9cfb58f971923073c45fb6bc0b8a699168b4074d785bc6112eb9c243811d94fe5017141e7a59c5f049ea621042b7141872a300ad2fad
7
+ data.tar.gz: 15d45e2128916ed78f49fb71d955c749cca4eeaf23c75c737af378189dbc63f3b27e49e5bcfa7cb6a0a2091bdf0c7c497d5f6d44cd38c9d82a85c72e23fc1562
@@ -23,7 +23,7 @@ module Gyftwrapper
23
23
 
24
24
  def purchase_card(params)
25
25
  send_request do
26
- RestClient.post(url_for(:purchase_card), params, 'x-sig-timestamp' => timestamp)
26
+ RestClient.post(url_for(:purchase_card), params.merge(default_params), 'x-sig-timestamp' => timestamp)
27
27
  end
28
28
  end
29
29
 
@@ -63,5 +63,12 @@ module Gyftwrapper
63
63
 
64
64
  data ? OpenStruct.new(data) : data
65
65
  end
66
+
67
+ def default_params
68
+ {
69
+ return_direct_link: true,
70
+ whitelabel: true
71
+ }
72
+ end
66
73
  end
67
74
  end
@@ -1,3 +1,3 @@
1
1
  module Gyftwrapper
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=57df75e96cd2d78290071e17dde29f9be30910542dfa6441e1c9564e606a7a3b
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=305ab2becf7a646086276f68e629f6cc0756f7a2999fcdd5a673a302bb198741
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=111
8
+ string: shop_card_id=111&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564398'
15
+ - '1434559250'
16
16
  Content-Length:
17
- - '16'
17
+ - '56'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:39 GMT
32
+ - Wed, 17 Jun 2015 16:40:50 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -40,15 +40,16 @@ http_interactions:
40
40
  - max-age=15768000
41
41
  Vary:
42
42
  - Accept-Encoding
43
- Content-Length:
44
- - '253'
43
+ Transfer-Encoding:
44
+ - chunked
45
45
  Connection:
46
46
  - keep-alive
47
47
  body:
48
48
  encoding: UTF-8
49
- string: "[ServiceException] Cannot find shop card for purchase: kwpbn8ff4cb5aueu329kq5u7,
50
- ResellerPurchaseCardRequest{shop_card_id=111, reseller_reference=null, to_email=null,
51
- return_direct_link=false, first_name=null, last_name=null, gender=null, birthday=null}"
49
+ string: "[ServiceException] Cannot find shop card for purchase: qfztjgd4rmtpeb9a9eb7nu3x,
50
+ ResellerPurchaseCardRequest{shop_card_id=111, reseller_reference=null, notes=null,
51
+ to_email=null, return_direct_link=true, first_name=null, last_name=null, gender=null,
52
+ birthday=null}"
52
53
  http_version:
53
- recorded_at: Thu, 05 Mar 2015 14:06:39 GMT
54
+ recorded_at: Wed, 17 Jun 2015 16:40:51 GMT
54
55
  recorded_with: VCR 2.9.3
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=135f041ea54ef965eea78d4f21bf9870c3a9453a0d702acb11f1398ad3a55dab
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=9c9ab3a1d2ae6f76812686eb7e203580a4cc71232d58755b124d9818b40a5419
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=111
8
+ string: shop_card_id=111&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564397'
15
+ - '1434559249'
16
16
  Content-Length:
17
- - '16'
17
+ - '56'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:37 GMT
32
+ - Wed, 17 Jun 2015 16:40:50 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -46,9 +46,10 @@ http_interactions:
46
46
  - keep-alive
47
47
  body:
48
48
  encoding: UTF-8
49
- string: "[ServiceException] Cannot find shop card for purchase: kwpbn8ff4cb5aueu329kq5u7,
50
- ResellerPurchaseCardRequest{shop_card_id=111, reseller_reference=null, to_email=null,
51
- return_direct_link=false, first_name=null, last_name=null, gender=null, birthday=null}"
49
+ string: "[ServiceException] Cannot find shop card for purchase: qfztjgd4rmtpeb9a9eb7nu3x,
50
+ ResellerPurchaseCardRequest{shop_card_id=111, reseller_reference=null, notes=null,
51
+ to_email=null, return_direct_link=true, first_name=null, last_name=null, gender=null,
52
+ birthday=null}"
52
53
  http_version:
53
- recorded_at: Thu, 05 Mar 2015 14:06:38 GMT
54
+ recorded_at: Wed, 17 Jun 2015 16:40:50 GMT
54
55
  recorded_with: VCR 2.9.3
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=c062b24cc15d920a33ca5087ea42fcf8fc4f1f3c16f6c19f483abd77acc451b0
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=e948f9800a9b856b95758eea3bb5612a92e76e6548923600994616770ed8289e
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=3266&to_email=123
8
+ string: shop_card_id=3266&to_email=123&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564400'
15
+ - '1434559251'
16
16
  Content-Length:
17
- - '30'
17
+ - '70'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:41 GMT
32
+ - Wed, 17 Jun 2015 16:40:52 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -48,5 +48,5 @@ http_interactions:
48
48
  encoding: UTF-8
49
49
  string: "[ServiceException] Email address is not valid: 123"
50
50
  http_version:
51
- recorded_at: Thu, 05 Mar 2015 14:06:41 GMT
51
+ recorded_at: Wed, 17 Jun 2015 16:40:52 GMT
52
52
  recorded_with: VCR 2.9.3
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=455ce60ef50e9ddf642ad969aa7347e63694c3e2d5bf072345ac7cae58ae903d
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=e948f9800a9b856b95758eea3bb5612a92e76e6548923600994616770ed8289e
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=3266&to_email=123
8
+ string: shop_card_id=3266&to_email=123&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564399'
15
+ - '1434559251'
16
16
  Content-Length:
17
- - '30'
17
+ - '70'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:39 GMT
32
+ - Wed, 17 Jun 2015 16:40:51 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -40,13 +40,13 @@ http_interactions:
40
40
  - max-age=15768000
41
41
  Vary:
42
42
  - Accept-Encoding
43
- Content-Length:
44
- - '50'
43
+ Transfer-Encoding:
44
+ - chunked
45
45
  Connection:
46
46
  - keep-alive
47
47
  body:
48
48
  encoding: UTF-8
49
49
  string: "[ServiceException] Email address is not valid: 123"
50
50
  http_version:
51
- recorded_at: Thu, 05 Mar 2015 14:06:40 GMT
51
+ recorded_at: Wed, 17 Jun 2015 16:40:51 GMT
52
52
  recorded_with: VCR 2.9.3
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=9b7349a83f7bf92d1e036adde01dbc7f65c1277cfdf57fb05c58beca23ad7b47
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=9c9ab3a1d2ae6f76812686eb7e203580a4cc71232d58755b124d9818b40a5419
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=3266&to_email=rpmilevskiy%40gmail.com
8
+ string: shop_card_id=3266&to_email=rpmilevskiy%40gmail.com&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564396'
15
+ - '1434559249'
16
16
  Content-Length:
17
- - '50'
17
+ - '90'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:37 GMT
32
+ - Wed, 17 Jun 2015 16:40:49 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -40,13 +40,13 @@ http_interactions:
40
40
  - max-age=15768000
41
41
  Vary:
42
42
  - Accept-Encoding
43
- Content-Length:
44
- - '55'
43
+ Transfer-Encoding:
44
+ - chunked
45
45
  Connection:
46
46
  - keep-alive
47
47
  body:
48
48
  encoding: UTF-8
49
- string: '{"id":21191,"url":"https://apptest.gyft.com/redirect/"}'
49
+ string: '{"id":25639,"url":"https://apptest.gyft.com/gyfted_cards/by_card/?whitelabel=true#MGYyY2JiMzcyZTQ0NGY5NDlkZjZlNGMxYTg1OGUyNmI2YTYzMmY4MmZmMmM0NDcyODMyYmUwODk3ZjFlMzc0NUx3"}'
50
50
  http_version:
51
- recorded_at: Thu, 05 Mar 2015 14:06:37 GMT
51
+ recorded_at: Wed, 17 Jun 2015 16:40:49 GMT
52
52
  recorded_with: VCR 2.9.3
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=kwpbn8ff4cb5aueu329kq5u7&sig=a63d5051de8d828717c9ed64dbc2833040253bca6d48c1d291fc66245a5788cc
5
+ uri: https://apitest.gyft.com/mashery/v1/reseller/purchase/card?api_key=qfztjgd4rmtpeb9a9eb7nu3x&sig=3a1c997648da5935b65ef2c4afae7a86754f5263ea9a3246c4393685eb0c450c
6
6
  body:
7
7
  encoding: US-ASCII
8
- string: shop_card_id=3266&to_email=rpmilevskiy%40gmail.com
8
+ string: shop_card_id=3266&to_email=rpmilevskiy%40gmail.com&return_direct_link=true&whitelabel=true
9
9
  headers:
10
10
  Accept:
11
11
  - "*/*; q=0.5, application/xml"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  X-Sig-Timestamp:
15
- - '1425564395'
15
+ - '1434559248'
16
16
  Content-Length:
17
- - '50'
17
+ - '90'
18
18
  Content-Type:
19
19
  - application/x-www-form-urlencoded
20
20
  User-Agent:
@@ -29,7 +29,7 @@ http_interactions:
29
29
  Content-Type:
30
30
  - application/json
31
31
  Date:
32
- - Thu, 05 Mar 2015 14:06:36 GMT
32
+ - Wed, 17 Jun 2015 16:40:49 GMT
33
33
  Expires:
34
34
  - Thu, 01 Jan 1970 00:00:00 GMT
35
35
  Pragma:
@@ -40,13 +40,13 @@ http_interactions:
40
40
  - max-age=15768000
41
41
  Vary:
42
42
  - Accept-Encoding
43
- Content-Length:
44
- - '55'
43
+ Transfer-Encoding:
44
+ - chunked
45
45
  Connection:
46
46
  - keep-alive
47
47
  body:
48
48
  encoding: UTF-8
49
- string: '{"id":21190,"url":"https://apptest.gyft.com/redirect/"}'
49
+ string: '{"id":25638,"url":"https://apptest.gyft.com/gyfted_cards/by_card/?whitelabel=true#NmU1OTU5MGE4ZjZlNDIwNjgyNjQwNGVhMjcyNGY1ZTE0Y2NlNzMyOWI2ZmM0YmUxODEyNDg0ZDQxYWIyM2Q2NW02"}'
50
50
  http_version:
51
- recorded_at: Thu, 05 Mar 2015 14:06:36 GMT
51
+ recorded_at: Wed, 17 Jun 2015 16:40:49 GMT
52
52
  recorded_with: VCR 2.9.3
@@ -1,4 +1,4 @@
1
1
  test:
2
- api_key: kwpbn8ff4cb5aueu329kq5u7
3
- api_secret: 4wX5YfEqmp
2
+ api_key: qfztjgd4rmtpeb9a9eb7nu3x
3
+ api_secret: nzsg83cRGg
4
4
  endpoint: https://apitest.gyft.com/mashery/v1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gyftwrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Milevskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-13 00:00:00.000000000 Z
11
+ date: 2015-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client