cirro-ruby-client 2.1.0 → 2.2.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: cb241151c08978a8fea7a2b594440dd63ea330620c3e2e75c392bf78c4e85a9a
4
- data.tar.gz: 32028d6fd708791bb8ef147a6149d3eb8ee54739ee01d384c5929a2c56b6ba11
3
+ metadata.gz: 3a120d9a51454b845c16158501e4ef77ac0cc24e6e64533e9c4d36222e8d6b96
4
+ data.tar.gz: 5e710de314860b7e51321e15a8280054a95aa11965aeea426aff74c73481a0d0
5
5
  SHA512:
6
- metadata.gz: afd6cc918fda461905fe9ffd2a91492c40fa7feaa7ae82f7fc6c216b8448e04fad95f510bc7da0e4fe33f90ec1bf27b73270d21f6027f02cd2e8154033d41c21
7
- data.tar.gz: 53e4c74b781b0d695d9f85d08e9524bca54aa2a4c59c3bf7875e23051468df25320ff271df34c7af0985da9ea755ef180f94ff49deed44745b672c83cef0f490
6
+ metadata.gz: e2aecfa0f10747956ad0cf2970a50ae4256b5abff46934af65287a7a03e782b699e751413e89eaee7c9657717940905b6752be6d54b35a8043b9e47ca231b680
7
+ data.tar.gz: 19ed5dae962259b8246e38f97e92142bfd3334049079140ed3052771c384b5c5170335196d00f04a89fd754ad310b1805cc594ec7f470d6fe55c521734b1df34
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.0)
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.0'
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
@@ -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,7 +2,10 @@ 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,
8
11
  :NotificationConfigurationListResponse,
@@ -27,6 +30,7 @@ module CirroIOV2
27
30
  :url,
28
31
  :start_at,
29
32
  :end_at,
33
+ :archived_at,
30
34
  :total_seats,
31
35
  :invitation_mode,
32
36
  :filter_query,
@@ -45,6 +49,38 @@ module CirroIOV2
45
49
  include Base
46
50
  end
47
51
 
52
+ GigTimeActivityResponse = Struct.new(:id, :object, :gig_id, :user_id, :description, :duration_in_ms, :date) do
53
+ include Base
54
+ end
55
+
56
+ GigResultResponse = Struct.new(:id,
57
+ :object,
58
+ :gig_task_id,
59
+ :user_id,
60
+ :title,
61
+ :description,
62
+ :quantity,
63
+ :multiplier,
64
+ :delivery_date,
65
+ :cost_center_key,
66
+ :cost_center_data) do
67
+ include Base
68
+ end
69
+
70
+ PayoutResponse = Struct.new(:id,
71
+ :object,
72
+ :amount,
73
+ :title,
74
+ :description,
75
+ :billing_date,
76
+ :reference_id,
77
+ :reference_type,
78
+ :user_id,
79
+ :cost_center_key,
80
+ :cost_center_data) do
81
+ include Base
82
+ end
83
+
48
84
  NotificationTopicPreferenceResponse = Struct.new(:id, :object, :preferences, :notification_topic_id, :user_id) do
49
85
  self::NESTED_RESPONSES = { preferences: :NotificationTopicPreferenceListResponse }.freeze
50
86
  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.0
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-26 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