voucherify 4.0.0 → 4.1.0

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: c678dc889e798e587fa154be5986162843a121b45d319073f5412a4928c30880
4
- data.tar.gz: 0bb3ef7753ce2fc0e57a8b650c4489e3d974342f381b5dd177a6c098e9ae983f
3
+ metadata.gz: eb19e1e94775f9fdfce14afa6ca9f75bba8383b5666668aa81ae73113f007f4e
4
+ data.tar.gz: e89a5ea5781dc6fbc414f078d74b144680fe61d2605a578e8a0087bb901e0cd9
5
5
  SHA512:
6
- metadata.gz: fa1417056871b3c6aa3f1dfd8e494579a78c3b550f74eb0cd349b5223c496655330a69cb60dfc1c214410f5b114d8f43ff149e17794a274b2eddec7d46b2b0bf
7
- data.tar.gz: 477e66648852cf962914b3ca660d7f848e4ad3f69c8e44fed7d195ca7bd82076ec6b156be09f4400cb1cb25263d1c4422314db2ff02dfd70ded888a26d777e7c
6
+ metadata.gz: b430a571452fde8d681b36e6e2523f41f7e4c9b6a86b4746fcf7795a47a648a189c4ceb99f2c3988ac5ca69f90dc6c8f7c46f1f624622f28a6329c8712a28f50
7
+ data.tar.gz: 0c5eed356516b95cccfc6d7203c33038415dadbe7ad46e2dc6686735ba98370024dffca3b5f0aa80ded1f84744d10b44a369594043f9454a14e99486f961dae9
data/.gitignore CHANGED
@@ -37,6 +37,7 @@ Gemfile.lock
37
37
 
38
38
  # Jetbrains temp
39
39
  .idea
40
+ *.iml
40
41
 
41
42
  .ruby-version
42
43
  .vscode/
data/README.md CHANGED
@@ -667,6 +667,22 @@ voucherify.events.track(event, metadata, customer, referral);
667
667
  ```ruby
668
668
  voucherify.events.track_event(data);
669
669
  ```
670
+
671
+ ### Async Actions API
672
+ Methods are provided within `voucherify.async_actions.*` namespace.
673
+ - [Get Async Action](#get-async-action)
674
+ - [List Async Actions](#list-async-actions)
675
+
676
+ #### [Get Async Action]
677
+ ```java
678
+ voucherify.async_actions.get(id);
679
+ ```
680
+
681
+ #### [List Async Actions]
682
+ ```java
683
+ voucherify.async_actions.list(query);
684
+ ```
685
+
670
686
  ---
671
687
 
672
688
  ### Migration from 0.x
@@ -757,6 +773,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
757
773
  Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
758
774
 
759
775
  ## Changelog
776
+ - **2022-01-18** - `4.1.0` - Async Actions support.
760
777
  - **2021-06-14** - `4.0.0` - Bumped required ruby version, bumped dependencies, added `Consents` API support, remove deprecated `URI.escape`.
761
778
  - **2020-03-09** - `3.0.0` - Bumped required ruby version, bumped dependencies, added `list` method in Customers module.
762
779
  - **2019-06-19** - `2.4.0` - Added support for custom API endpoint, that allows to connect to projects created in specific Voucherify region.
@@ -795,6 +812,9 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/rspect
795
812
 
796
813
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
797
814
 
815
+ [Get Async Action]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-async-actions-1
816
+ [List Async Actions]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-async-actions
817
+
798
818
  [Create Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-voucher
799
819
  [Get Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#vouchers-get
800
820
  [Update Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-voucher
@@ -20,6 +20,10 @@ module Voucherify
20
20
  @timeout = @options[:timeout] || @options['timeout']
21
21
  end
22
22
 
23
+ def async_actions
24
+ Voucherify::Service::AsyncActions.new(self)
25
+ end
26
+
23
27
  def vouchers
24
28
  Voucherify::Service::Vouchers.new(self)
25
29
  end
@@ -0,0 +1,22 @@
1
+ require 'uri'
2
+
3
+ module Voucherify
4
+ module Service
5
+ class AsyncActions
6
+ attr_reader :client
7
+
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def get(id)
13
+ @client.get("/async-actions/#{ERB::Util.url_encode(id)}")
14
+ end
15
+
16
+ def list(query)
17
+ @client.get('/async-actions', query)
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Voucherify
2
- VERSION = '4.0.0'
2
+ VERSION = '4.1.0'
3
3
  end
data/lib/voucherify.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'voucherify/version'
2
2
  require 'voucherify/client'
3
+ require 'voucherify/service/async_actions'
3
4
  require 'voucherify/service/campaigns'
4
5
  require 'voucherify/service/customers'
5
6
  require 'voucherify/service/distributions'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voucherify
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawelrychlik
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-14 00:00:00.000000000 Z
11
+ date: 2022-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.1.0
69
- description:
69
+ description:
70
70
  email:
71
71
  - pawel.rychlik@rspective.pl
72
72
  executables: []
@@ -87,6 +87,7 @@ files:
87
87
  - examples/vouchers.rb
88
88
  - lib/voucherify.rb
89
89
  - lib/voucherify/client.rb
90
+ - lib/voucherify/service/async_actions.rb
90
91
  - lib/voucherify/service/campaigns.rb
91
92
  - lib/voucherify/service/consents.rb
92
93
  - lib/voucherify/service/customers.rb
@@ -110,7 +111,7 @@ homepage: https://github.com/rspective/voucherify-ruby-sdk/
110
111
  licenses:
111
112
  - MIT
112
113
  metadata: {}
113
- post_install_message:
114
+ post_install_message:
114
115
  rdoc_options: []
115
116
  require_paths:
116
117
  - lib
@@ -125,8 +126,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
128
  requirements: []
128
- rubygems_version: 3.0.3
129
- signing_key:
129
+ rubygems_version: 3.2.15
130
+ signing_key:
130
131
  specification_version: 4
131
132
  summary: Ruby SDK for Voucherify. More info on http://www.voucherify.io
132
133
  test_files: []