giftery 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 597c9f0c0bd83f6c5dc5645f4ea4acd496a8ba01ffa216333bf5a5271629b0be
4
- data.tar.gz: c548bd101623a7a4f472dee815c4107b164bd1d54b498078fe7f26fefeb23988
3
+ metadata.gz: 7681e0bcc949ceebc6205e458ddca045bd0d27623dd9375e4a4f9de85a4002f9
4
+ data.tar.gz: 6ff5050fe6b3b17d68ddb79b13bd1852a2fd271653ea6e637df7255b0e66aefb
5
5
  SHA512:
6
- metadata.gz: 02aa538e43a18c4ae37d23bc34c618ebab8389c0f1f13660be484e7ffaff945502b049f8502b2a99b8a8c48320f1c44c6c8334526e42e01a0d21681941c3f7fc
7
- data.tar.gz: 74c181d0fe339a0679559d12e221d6c8c6cd5176e657eb2569c86a7926c9da50cd6341ca548c00c06bb26a67ea5f17d392c98e10bbbbe52f75dcd128c67406df
6
+ metadata.gz: 7970ed5e5e2628d7072c1ac5cdced5c23727d5f0bad5949585c1686b5fb77006a199fc0ad765312985bdafb4d10bee313fefe029eee2edd4ba167527e5cba17b
7
+ data.tar.gz: 8d5eb8a92262853ddff108fc63d6776158f50d9ffa80d31fca3761dbfb54831c5ca8fb9b3bcbfd46cbd1c5a6035aff112f915be6358213741158b5390794bb99
@@ -11,7 +11,7 @@ module Giftery
11
11
  OUTPUT_FORMAT = 'json'
12
12
 
13
13
  # Giftery::Client class needs to be used
14
- # for making requests to Giftery API
14
+ # for making requests to Giftery API https://docs.giftery.tech/b2b-api/
15
15
  class Client
16
16
  def initialize(client_id, secret)
17
17
  @client_id = client_id
@@ -22,43 +22,61 @@ module Giftery
22
22
  make_request('test')
23
23
  end
24
24
 
25
+ # Creates order
26
+ # More info here: https://docs.giftery.tech/b2b-api/methods/makeOrder/
25
27
  def make_order(product_id, face, options = {})
26
28
  data = options.merge!(product_id: product_id, face: face)
27
29
  make_request('makeOrder', data)
28
30
  end
29
31
 
32
+ # Returns list of available products
33
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getProducts/
30
34
  def products
31
35
  make_request('getProducts')
32
36
  end
33
37
 
38
+ # Returns base64 encoded PDF certificate
39
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getCertificate/
34
40
  def certificate(queue_id)
35
41
  make_request('getCertificate', queue_id: queue_id)
36
42
  end
37
43
 
44
+ # Returns certificate requisites
45
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getCode/
38
46
  def code(queue_id, order_id)
39
47
  make_request('getCode',
40
48
  queue_id: queue_id,
41
49
  order_id: order_id)
42
50
  end
43
51
 
52
+ # Returns certificate links
53
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getLinks/
44
54
  def links(queue_id, order_id)
45
55
  make_request('getLinks',
46
56
  queue_id: queue_id,
47
57
  order_id: order_id)
48
58
  end
49
59
 
60
+ # Returns status of order that is created by make_order
61
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getStatus/
50
62
  def status(id)
51
63
  make_request('getStatus', id: id)
52
64
  end
53
65
 
66
+ # Returns list of available certificate categories
67
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getCategories/
54
68
  def categories
55
69
  make_request('getCategories')
56
70
  end
57
71
 
72
+ # Returns your available balance
73
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getBalance/
58
74
  def balance
59
75
  make_request('getBalance')
60
76
  end
61
77
 
78
+ # Returns list of places (with address) where certificate can be accepted
79
+ # More info here: https://docs.giftery.tech/b2b-api/methods/getAddress/
62
80
  def address(product_id, area_name, locality_name)
63
81
  make_request('getBalance',
64
82
  product_id: product_id,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Giftery
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: giftery
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
  - Boris Drazhzhov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler