cirro-ruby-client 2.5.9 → 2.5.11

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
  SHA256:
3
- metadata.gz: 88cf9dc949544b88c4eab4dcf6495655812a8348ddf7c90a120a1c980ab5fb92
4
- data.tar.gz: 15706dbf189a17418cb03332053a1ba00f406f8e8f0d60f81791c4e2d9e9e0a9
3
+ metadata.gz: 2ce81e7b0822c3a040876d798246e58e6e3c1d4d53ae65a00d8f8c31a1b93376
4
+ data.tar.gz: 2a6ba790c9021d73593c657de850874ee30483b9defbe909be87b4cd5af44d1a
5
5
  SHA512:
6
- metadata.gz: b392de36c65e0861c5b379c09f356a5d6eb3325cb26800b879471e995b4c3c410403d8a9a270cef68573bc98d718255a05e767d11cc9905286bf92cc1bf44b3e
7
- data.tar.gz: 3c274bfaeb71513309298006e127fbf549c7f3949d56417c63a1aa587ca76b3de9c0392705127a919e78e96c73ccc10f35a8902f107cc4f96c8bdafaac376bc6
6
+ metadata.gz: 9e7c815ff399fce832806acd5e5e02af6f55c74de231390cbdf7f24cacc17eadf0c2608888e6e6a299c2eed96a3bb3c46ba0ad3a791509bb91bf732464e4194a
7
+ data.tar.gz: 63ed1f73437dad7695725311b279c06b3dc57209d9a2211cfc305eafcacd7103ed110a933c7b3b524a5976b8eb55db24c6a256825a3c7c55adaccb76b2861e81
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cirro-ruby-client (2.5.9)
4
+ cirro-ruby-client (2.5.11)
5
5
  activesupport
6
6
  faraday (< 1.2.0)
7
7
  faraday_middleware
@@ -11,14 +11,13 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (6.1.7)
15
- activesupport (= 6.1.7)
16
- activesupport (6.1.7)
14
+ activemodel (7.0.4.2)
15
+ activesupport (= 7.0.4.2)
16
+ activesupport (7.0.4.2)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- zeitwerk (~> 2.3)
22
21
  addressable (2.8.0)
23
22
  public_suffix (>= 2.0.2, < 5.0)
24
23
  ast (2.4.1)
@@ -43,10 +42,10 @@ GEM
43
42
  faraday (>= 0.15.2, < 2.0)
44
43
  faraday_middleware (>= 0.9.0, < 2.0)
45
44
  rack (>= 0.2)
46
- jwt (2.6.0)
45
+ jwt (2.7.0)
47
46
  method_source (1.0.0)
48
47
  minitest (5.17.0)
49
- multipart-post (2.2.3)
48
+ multipart-post (2.3.0)
50
49
  parallel (1.19.2)
51
50
  parser (2.7.2.0)
52
51
  ast (~> 2.4.1)
@@ -54,7 +53,7 @@ GEM
54
53
  coderay (~> 1.1)
55
54
  method_source (~> 1.0)
56
55
  public_suffix (4.0.6)
57
- rack (3.0.3)
56
+ rack (3.0.4.1)
58
57
  rainbow (3.0.0)
59
58
  rake (12.3.3)
60
59
  regexp_parser (1.8.1)
@@ -87,14 +86,13 @@ GEM
87
86
  rubocop (~> 0.87)
88
87
  ruby-progressbar (1.10.1)
89
88
  ruby2_keywords (0.0.5)
90
- tzinfo (2.0.5)
89
+ tzinfo (2.0.6)
91
90
  concurrent-ruby (~> 1.0)
92
91
  unicode-display_width (1.7.0)
93
92
  webmock (3.9.1)
94
93
  addressable (>= 2.3.6)
95
94
  crack (>= 0.3.2)
96
95
  hashdiff (>= 0.4.0, < 2.0.0)
97
- zeitwerk (2.6.6)
98
96
 
99
97
  PLATFORMS
100
98
  ruby
data/README.md CHANGED
@@ -38,7 +38,7 @@ Or install it yourself as:
38
38
 
39
39
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
40
40
 
41
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
41
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then wait for circle CI to complete, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
42
 
43
43
  ## License
44
44
 
@@ -186,6 +186,26 @@ client.Gig.create(
186
186
  # => Gig object
187
187
  ```
188
188
 
189
+ ### Manually invite user to a gig
190
+
191
+ ##### Invite single user
192
+ ```ruby
193
+ gig_id = 1
194
+ app_user_id = 1
195
+
196
+ client.Gig.invite(gig_id, { user_id: app_user_id })
197
+ # => GigInvitation object
198
+ ```
199
+
200
+ ##### Invite multiple users and overwrite no_reward
201
+ ```ruby
202
+ gig_id = 1
203
+ users = [{ id: 1, no_reward: true }, { id: 2, no_reward: true }]
204
+
205
+ client.Gig.invite(gig_id, { users: users })
206
+ # => GigInvitationList object
207
+ ```
208
+
189
209
  ## GigInvitation
190
210
  ### Get list of gig invitations
191
211
 
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Style/MutableConstant
2
2
  module CirroIO
3
3
  module Client
4
- VERSION = '2.5.9'
4
+ VERSION = '2.5.11'
5
5
  end
6
6
  end
7
7
  # rubocop:enable Style/MutableConstant
@@ -35,6 +35,13 @@ module CirroIOV2
35
35
  response = client.request_client.request(:post, "#{resource_root}/#{gig_id}/tasks/#{task_id}", body: params)
36
36
  Responses::GigTaskResponse.new(response.body)
37
37
  end
38
+
39
+ def invite(id, params)
40
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/invite", body: params)
41
+
42
+ return Responses::GigInvitationResponse.new(response.body) if response.body['object'] == 'gig_invitation'
43
+ return Responses::GigInvitationListResponse.new(response.body) if response.body['object'] == 'list'
44
+ end
38
45
  end
39
46
  end
40
47
  end
@@ -15,7 +15,7 @@ module CirroIOV2
15
15
  :NotificationTemplateListResponse,
16
16
  ].freeze
17
17
 
18
- UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :birthday, :country_code, :epam, :worker) do
18
+ UserResponse = Struct.new(:id, :object, :first_name, :last_name, :time_zone, :birthday, :country_code, :epam, :worker, :anonymous_email) do
19
19
  include Base
20
20
  end
21
21
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cirro-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.9
4
+ version: 2.5.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cirro Dev Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport