cirro-ruby-client 2.1.0 → 2.2.1

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: cb241151c08978a8fea7a2b594440dd63ea330620c3e2e75c392bf78c4e85a9a
4
- data.tar.gz: 32028d6fd708791bb8ef147a6149d3eb8ee54739ee01d384c5929a2c56b6ba11
3
+ metadata.gz: bad4d8ea7ee1d896f80d0683017351fb6abb4d5a405029bde6336000816bbb99
4
+ data.tar.gz: 283add293e1ac93ffdedf1bf119acbd993e7ad2493d072de6cd1ebd0e16582de
5
5
  SHA512:
6
- metadata.gz: afd6cc918fda461905fe9ffd2a91492c40fa7feaa7ae82f7fc6c216b8448e04fad95f510bc7da0e4fe33f90ec1bf27b73270d21f6027f02cd2e8154033d41c21
7
- data.tar.gz: 53e4c74b781b0d695d9f85d08e9524bca54aa2a4c59c3bf7875e23051468df25320ff271df34c7af0985da9ea755ef180f94ff49deed44745b672c83cef0f490
6
+ metadata.gz: 26cd4f5311b44d5b055bd2a07cf4702d7f3ebaf4b2005ab1660bfa89681b09a44c8b5eaf6713dc643e807b3bdb12322739497f00defc6787433c8500c1f7a429
7
+ data.tar.gz: 9914227f35886b4c53ef3c18ebc58334b0fb50fd122a6e61ce26e41967dbb83ad4c0b503324104f749ef91f788e29b354169a8c10d29c2287dc892f85210f5ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cirro-ruby-client (2.1.0)
4
+ cirro-ruby-client (2.2.1)
5
5
  activesupport
6
6
  faraday (< 1.2.0)
7
7
  faraday_middleware
@@ -11,9 +11,9 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activemodel (6.1.5)
15
- activesupport (= 6.1.5)
16
- activesupport (6.1.5)
14
+ activemodel (6.1.7)
15
+ activesupport (= 6.1.7)
16
+ activesupport (6.1.7)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
@@ -43,10 +43,10 @@ GEM
43
43
  faraday (>= 0.15.2, < 2.0)
44
44
  faraday_middleware (>= 0.9.0, < 2.0)
45
45
  rack (>= 0.2)
46
- jwt (2.3.0)
46
+ jwt (2.5.0)
47
47
  method_source (1.0.0)
48
- minitest (5.15.0)
49
- multipart-post (2.1.1)
48
+ minitest (5.16.3)
49
+ multipart-post (2.2.3)
50
50
  parallel (1.19.2)
51
51
  parser (2.7.2.0)
52
52
  ast (~> 2.4.1)
@@ -54,7 +54,7 @@ GEM
54
54
  coderay (~> 1.1)
55
55
  method_source (~> 1.0)
56
56
  public_suffix (4.0.6)
57
- rack (2.2.3)
57
+ rack (3.0.0)
58
58
  rainbow (3.0.0)
59
59
  rake (12.3.3)
60
60
  regexp_parser (1.8.1)
@@ -87,14 +87,14 @@ GEM
87
87
  rubocop (~> 0.87)
88
88
  ruby-progressbar (1.10.1)
89
89
  ruby2_keywords (0.0.5)
90
- tzinfo (2.0.4)
90
+ tzinfo (2.0.5)
91
91
  concurrent-ruby (~> 1.0)
92
92
  unicode-display_width (1.7.0)
93
93
  webmock (3.9.1)
94
94
  addressable (>= 2.3.6)
95
95
  crack (>= 0.3.2)
96
96
  hashdiff (>= 0.4.0, < 2.0.0)
97
- zeitwerk (2.5.4)
97
+ zeitwerk (2.6.0)
98
98
 
99
99
  PLATFORMS
100
100
  ruby
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Style/MutableConstant
2
2
  module CirroIO
3
3
  module Client
4
- VERSION = '2.1.0'
4
+ VERSION = '2.2.1'
5
5
  end
6
6
  end
7
7
  # rubocop:enable Style/MutableConstant
@@ -7,6 +7,9 @@ require 'cirro_io_v2/request_clients/jwt'
7
7
 
8
8
  require 'cirro_io_v2/resources/base'
9
9
  require 'cirro_io_v2/resources/gig'
10
+ require 'cirro_io_v2/resources/gig_result'
11
+ require 'cirro_io_v2/resources/gig_time_activity'
12
+ require 'cirro_io_v2/resources/payout'
10
13
  require 'cirro_io_v2/resources/gig_invitation'
11
14
  require 'cirro_io_v2/resources/user'
12
15
 
@@ -69,6 +72,18 @@ module CirroIOV2
69
72
  Resources::Gig.new(self)
70
73
  end
71
74
 
75
+ def GigResult
76
+ Resources::GigResult.new(self)
77
+ end
78
+
79
+ def GigTimePayout
80
+ Resources::GigTimePayout.new(self)
81
+ end
82
+
83
+ def Payout
84
+ Resources::Payout.new(self)
85
+ end
86
+
72
87
  def NotificationBroadcast
73
88
  Resources::NotificationBroadcast.new(self)
74
89
  end
@@ -98,7 +113,7 @@ module CirroIOV2
98
113
  end
99
114
 
100
115
  def NotificationTemplate
101
- Resources::NotificationTopic.new(self)
116
+ Resources::NotificationTemplate.new(self)
102
117
  end
103
118
 
104
119
  # rubocop:enable Naming/MethodName
@@ -5,6 +5,21 @@ module CirroIOV2
5
5
  response = client.request_client.request(:post, resource_root, body: params)
6
6
  Responses::GigResponse.new(response.body)
7
7
  end
8
+
9
+ def archive(id, params)
10
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/archive", body: params)
11
+ Responses::GigResponse.new(response.body)
12
+ end
13
+
14
+ def tasks(id, params)
15
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/tasks", body: params)
16
+ Responses::GigTaskResponse.new(response.body)
17
+ end
18
+
19
+ def update_task(gig_id, task_id, params)
20
+ response = client.request_client.request(:post, "#{resource_root}/#{gig_id}/tasks/#{task_id}", body: params)
21
+ Responses::GigTaskResponse.new(response.body)
22
+ end
8
23
  end
9
24
  end
10
25
  end
@@ -13,6 +13,16 @@ module CirroIOV2
13
13
  response = client.request_client.request(:post, "#{resource_root}/#{id}/accept")
14
14
  Responses::GigInvitationResponse.new(response.body)
15
15
  end
16
+
17
+ def reject(id)
18
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/reject")
19
+ Responses::GigInvitationResponse.new(response.body)
20
+ end
21
+
22
+ def expire(id)
23
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/expire")
24
+ Responses::GigInvitationResponse.new(response.body)
25
+ end
16
26
  end
17
27
  end
18
28
  end
@@ -0,0 +1,15 @@
1
+ module CirroIOV2
2
+ module Resources
3
+ class GigResult < Base
4
+ def list(params = nil)
5
+ response = client.request_client.request(:get, resource_root, params: params)
6
+ Responses::GigResultListResponse.new(response.body)
7
+ end
8
+
9
+ def create(params)
10
+ response = client.request_client.request(:post, resource_root, body: params)
11
+ Responses::GigResultResponse.new(response.body)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ module CirroIOV2
2
+ module Resources
3
+ class GigTimeActivity < Base
4
+ def list(params = nil)
5
+ response = client.request_client.request(:get, resource_root, params: params)
6
+ Responses::GigTimeActivityListResponse.new(response.body)
7
+ end
8
+
9
+ def create(params)
10
+ response = client.request_client.request(:post, resource_root, body: params)
11
+ Responses::GigTimeActivityResponse.new(response.body)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -5,6 +5,11 @@ module CirroIOV2
5
5
  UPDATE_ALLOWED_PARAMS = [:name].freeze
6
6
  CREATE_TEMPLATE_ALLOWED_PARAMS = [:notification_configuration_id, :body].freeze
7
7
 
8
+ def list(params = nil)
9
+ response = client.request_client.request(:get, resource_root, params: params)
10
+ Responses::NotificationLayoutListResponse.new(response.body)
11
+ end
12
+
8
13
  def create(params)
9
14
  params_allowed?(params, CREATE_ALLOWED_PARAMS)
10
15
  response = client.request_client.request(:post, resource_root, body: params)
@@ -0,0 +1,15 @@
1
+ module CirroIOV2
2
+ module Resources
3
+ class Payout < Base
4
+ def list(params = nil)
5
+ response = client.request_client.request(:get, resource_root, params: params)
6
+ Responses::PayoutListResponse.new(response.body)
7
+ end
8
+
9
+ def create(params)
10
+ response = client.request_client.request(:post, resource_root, body: params)
11
+ Responses::PayoutResponse.new(response.body)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -10,6 +10,11 @@ module CirroIOV2
10
10
  response = client.request_client.request(:post, "#{resource_root}/#{id}/notification_preferences", body: params)
11
11
  CirroIOV2::Responses::UserNotificationPreferenceResponse.new(response.body)
12
12
  end
13
+
14
+ def worker(id, params)
15
+ response = client.request_client.request(:post, "#{resource_root}/#{id}/worker", body: params)
16
+ CirroIOV2::Responses::UserResponse.new(response.body)
17
+ end
13
18
  end
14
19
  end
15
20
  end
@@ -2,9 +2,13 @@ module CirroIOV2
2
2
  module Responses
3
3
  LIST_RESPONSES = [
4
4
  :GigTaskListResponse,
5
+ :GigResultListResponse,
5
6
  :GigInvitationListResponse,
7
+ :GigTimeActivityListResponse,
8
+ :PayoutListResponse,
6
9
  :NotificationTopicPreferenceListResponse,
7
10
  :NotificationLocaleListResponse,
11
+ :NotificationLayoutListResponse,
8
12
  :NotificationConfigurationListResponse,
9
13
  :NotificationLayoutTemplateListResponse,
10
14
  :NotificationTopicListResponse,
@@ -27,6 +31,7 @@ module CirroIOV2
27
31
  :url,
28
32
  :start_at,
29
33
  :end_at,
34
+ :archived_at,
30
35
  :total_seats,
31
36
  :invitation_mode,
32
37
  :filter_query,
@@ -45,6 +50,38 @@ module CirroIOV2
45
50
  include Base
46
51
  end
47
52
 
53
+ GigTimeActivityResponse = Struct.new(:id, :object, :gig_id, :user_id, :description, :duration_in_ms, :date) do
54
+ include Base
55
+ end
56
+
57
+ GigResultResponse = Struct.new(:id,
58
+ :object,
59
+ :gig_task_id,
60
+ :user_id,
61
+ :title,
62
+ :description,
63
+ :quantity,
64
+ :multiplier,
65
+ :delivery_date,
66
+ :cost_center_key,
67
+ :cost_center_data) do
68
+ include Base
69
+ end
70
+
71
+ PayoutResponse = Struct.new(:id,
72
+ :object,
73
+ :amount,
74
+ :title,
75
+ :description,
76
+ :billing_date,
77
+ :reference_id,
78
+ :reference_type,
79
+ :user_id,
80
+ :cost_center_key,
81
+ :cost_center_data) do
82
+ include Base
83
+ end
84
+
48
85
  NotificationTopicPreferenceResponse = Struct.new(:id, :object, :preferences, :notification_topic_id, :user_id) do
49
86
  self::NESTED_RESPONSES = { preferences: :NotificationTopicPreferenceListResponse }.freeze
50
87
  include Base
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.1.0
4
+ version: 2.2.1
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: 2022-08-25 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -129,6 +129,8 @@ files:
129
129
  - lib/cirro_io_v2/resources/base.rb
130
130
  - lib/cirro_io_v2/resources/gig.rb
131
131
  - lib/cirro_io_v2/resources/gig_invitation.rb
132
+ - lib/cirro_io_v2/resources/gig_result.rb
133
+ - lib/cirro_io_v2/resources/gig_time_activity.rb
132
134
  - lib/cirro_io_v2/resources/notification_broadcast.rb
133
135
  - lib/cirro_io_v2/resources/notification_configuration.rb
134
136
  - lib/cirro_io_v2/resources/notification_layout.rb
@@ -137,6 +139,7 @@ files:
137
139
  - lib/cirro_io_v2/resources/notification_template.rb
138
140
  - lib/cirro_io_v2/resources/notification_topic.rb
139
141
  - lib/cirro_io_v2/resources/notification_topic_preference.rb
142
+ - lib/cirro_io_v2/resources/payout.rb
140
143
  - lib/cirro_io_v2/resources/user.rb
141
144
  - lib/cirro_io_v2/responses/base.rb
142
145
  - lib/cirro_io_v2/responses/responses.rb