moderation_api 3.6.0 → 3.7.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 +4 -4
- data/lib/moderation_api/brands.rb +1266 -0
- data/lib/moderation_api/campaigns.rb +1269 -0
- data/lib/moderation_api/models/operations/campaign_request.rb +2 -2
- data/lib/moderation_api/models/operations/campaign_response.rb +1 -1
- data/lib/moderation_api/models/operations/cluster.rb +1 -1
- data/lib/moderation_api/models/operations/createbrand_request.rb +38 -0
- data/lib/moderation_api/models/operations/createbrand_request.rbi +20 -0
- data/lib/moderation_api/models/operations/createbrand_requestbody.rb +39 -0
- data/lib/moderation_api/models/operations/createbrand_requestbody.rbi +20 -0
- data/lib/moderation_api/models/operations/createbrand_response.rb +51 -0
- data/lib/moderation_api/models/operations/createbrand_response.rbi +32 -0
- data/lib/moderation_api/models/operations/createbrand_responsebody.rb +78 -0
- data/lib/moderation_api/models/operations/createbrand_responsebody.rbi +38 -0
- data/lib/moderation_api/models/operations/createbrand_status.rb +21 -0
- data/lib/moderation_api/models/operations/createbrand_status.rbi +9 -0
- data/lib/moderation_api/models/operations/createcampaign_declared_request.rb +67 -0
- data/lib/moderation_api/models/operations/createcampaign_declared_request.rbi +32 -0
- data/lib/moderation_api/models/operations/createcampaign_declared_response.rb +67 -0
- data/lib/moderation_api/models/operations/createcampaign_declared_response.rbi +32 -0
- data/lib/moderation_api/models/operations/createcampaign_request.rb +38 -0
- data/lib/moderation_api/models/operations/createcampaign_request.rbi +20 -0
- data/lib/moderation_api/models/operations/createcampaign_requestbody.rb +138 -0
- data/lib/moderation_api/models/operations/createcampaign_requestbody.rbi +74 -0
- data/lib/moderation_api/models/operations/createcampaign_response.rb +51 -0
- data/lib/moderation_api/models/operations/createcampaign_response.rbi +32 -0
- data/lib/moderation_api/models/operations/createcampaign_responsebody.rb +174 -0
- data/lib/moderation_api/models/operations/createcampaign_responsebody.rbi +92 -0
- data/lib/moderation_api/models/operations/createcampaign_status.rb +21 -0
- data/lib/moderation_api/models/operations/createcampaign_status.rbi +9 -0
- data/lib/moderation_api/models/operations/deletebrand_request.rb +39 -0
- data/lib/moderation_api/models/operations/deletebrand_request.rbi +20 -0
- data/lib/moderation_api/models/operations/deletebrand_response.rb +51 -0
- data/lib/moderation_api/models/operations/deletebrand_response.rbi +32 -0
- data/lib/moderation_api/models/operations/deletebrand_responsebody.rb +39 -0
- data/lib/moderation_api/models/operations/deletebrand_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/deletecampaign_request.rb +39 -0
- data/lib/moderation_api/models/operations/deletecampaign_request.rbi +20 -0
- data/lib/moderation_api/models/operations/deletecampaign_response.rb +51 -0
- data/lib/moderation_api/models/operations/deletecampaign_response.rbi +32 -0
- data/lib/moderation_api/models/operations/deletecampaign_responsebody.rb +39 -0
- data/lib/moderation_api/models/operations/deletecampaign_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/getbrand_request.rb +39 -0
- data/lib/moderation_api/models/operations/getbrand_request.rbi +20 -0
- data/lib/moderation_api/models/operations/getbrand_response.rb +51 -0
- data/lib/moderation_api/models/operations/getbrand_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getbrand_responsebody.rb +78 -0
- data/lib/moderation_api/models/operations/getbrand_responsebody.rbi +38 -0
- data/lib/moderation_api/models/operations/getbrand_status.rb +21 -0
- data/lib/moderation_api/models/operations/getbrand_status.rbi +9 -0
- data/lib/moderation_api/models/operations/getcampaign_declared.rb +67 -0
- data/lib/moderation_api/models/operations/getcampaign_declared.rbi +32 -0
- data/lib/moderation_api/models/operations/getcampaign_request.rb +39 -0
- data/lib/moderation_api/models/operations/getcampaign_request.rbi +20 -0
- data/lib/moderation_api/models/operations/getcampaign_response.rb +51 -0
- data/lib/moderation_api/models/operations/getcampaign_response.rbi +32 -0
- data/lib/moderation_api/models/operations/getcampaign_responsebody.rb +174 -0
- data/lib/moderation_api/models/operations/getcampaign_responsebody.rbi +92 -0
- data/lib/moderation_api/models/operations/getcampaign_status.rb +21 -0
- data/lib/moderation_api/models/operations/getcampaign_status.rbi +9 -0
- data/lib/moderation_api/models/operations/listbrands_data.rb +78 -0
- data/lib/moderation_api/models/operations/listbrands_data.rbi +38 -0
- data/lib/moderation_api/models/operations/listbrands_request.rb +53 -0
- data/lib/moderation_api/models/operations/listbrands_request.rbi +26 -0
- data/lib/moderation_api/models/operations/listbrands_response.rb +63 -0
- data/lib/moderation_api/models/operations/listbrands_response.rbi +32 -0
- data/lib/moderation_api/models/operations/listbrands_responsebody.rb +45 -0
- data/lib/moderation_api/models/operations/listbrands_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/listbrands_status.rb +21 -0
- data/lib/moderation_api/models/operations/listbrands_status.rbi +9 -0
- data/lib/moderation_api/models/operations/listcampaigns_data.rb +174 -0
- data/lib/moderation_api/models/operations/listcampaigns_data.rbi +92 -0
- data/lib/moderation_api/models/operations/listcampaigns_declared.rb +67 -0
- data/lib/moderation_api/models/operations/listcampaigns_declared.rbi +32 -0
- data/lib/moderation_api/models/operations/listcampaigns_request.rb +66 -0
- data/lib/moderation_api/models/operations/listcampaigns_request.rbi +32 -0
- data/lib/moderation_api/models/operations/listcampaigns_response.rb +63 -0
- data/lib/moderation_api/models/operations/listcampaigns_response.rbi +32 -0
- data/lib/moderation_api/models/operations/listcampaigns_responsebody.rb +45 -0
- data/lib/moderation_api/models/operations/listcampaigns_responsebody.rbi +20 -0
- data/lib/moderation_api/models/operations/listcampaigns_status.rb +21 -0
- data/lib/moderation_api/models/operations/listcampaigns_status.rbi +9 -0
- data/lib/moderation_api/models/operations/submitcontent_requestbody.rb +1 -1
- data/lib/moderation_api/models/operations/updatebrand_request.rb +45 -0
- data/lib/moderation_api/models/operations/updatebrand_request.rbi +26 -0
- data/lib/moderation_api/models/operations/updatebrand_requestbody.rb +35 -0
- data/lib/moderation_api/models/operations/updatebrand_requestbody.rbi +14 -0
- data/lib/moderation_api/models/operations/updatebrand_response.rb +51 -0
- data/lib/moderation_api/models/operations/updatebrand_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatebrand_responsebody.rb +78 -0
- data/lib/moderation_api/models/operations/updatebrand_responsebody.rbi +38 -0
- data/lib/moderation_api/models/operations/updatebrand_status.rb +21 -0
- data/lib/moderation_api/models/operations/updatebrand_status.rbi +9 -0
- data/lib/moderation_api/models/operations/updatecampaign_declared_request.rb +67 -0
- data/lib/moderation_api/models/operations/updatecampaign_declared_request.rbi +32 -0
- data/lib/moderation_api/models/operations/updatecampaign_declared_response.rb +67 -0
- data/lib/moderation_api/models/operations/updatecampaign_declared_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatecampaign_request.rb +46 -0
- data/lib/moderation_api/models/operations/updatecampaign_request.rbi +26 -0
- data/lib/moderation_api/models/operations/updatecampaign_requestbody.rb +132 -0
- data/lib/moderation_api/models/operations/updatecampaign_requestbody.rbi +68 -0
- data/lib/moderation_api/models/operations/updatecampaign_response.rb +51 -0
- data/lib/moderation_api/models/operations/updatecampaign_response.rbi +32 -0
- data/lib/moderation_api/models/operations/updatecampaign_responsebody.rb +174 -0
- data/lib/moderation_api/models/operations/updatecampaign_responsebody.rbi +92 -0
- data/lib/moderation_api/models/operations/updatecampaign_status.rb +21 -0
- data/lib/moderation_api/models/operations/updatecampaign_status.rbi +9 -0
- data/lib/moderation_api/models/operations.rb +50 -0
- data/lib/moderation_api/moderationapi.rb +5 -1
- data/lib/moderation_api/sdkconfiguration.rb +2 -2
- data/lib/moderation_api.rb +2 -0
- metadata +104 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class ListCampaignsRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
field(
|
|
15
|
+
:brand_id,
|
|
16
|
+
Crystalline::Nilable.new(::String),
|
|
17
|
+
{'query_param': {'field_name': "brandId", 'style': "form", 'explode': true}}
|
|
18
|
+
)
|
|
19
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
20
|
+
field(
|
|
21
|
+
:project_id,
|
|
22
|
+
Crystalline::Nilable.new(::String),
|
|
23
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
field(
|
|
27
|
+
:page,
|
|
28
|
+
Crystalline::Nilable.new(::Integer),
|
|
29
|
+
{'query_param': {'field_name': "page", 'style': "form", 'explode': true}}
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
field(
|
|
33
|
+
:page_size,
|
|
34
|
+
Crystalline::Nilable.new(::Integer),
|
|
35
|
+
{'query_param': {'field_name': "pageSize", 'style': "form", 'explode': true}}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
sig {
|
|
39
|
+
params(
|
|
40
|
+
brand_id: T.nilable(::String),
|
|
41
|
+
project_id: T.nilable(::String),
|
|
42
|
+
page: T.nilable(::Integer),
|
|
43
|
+
page_size: T.nilable(::Integer)
|
|
44
|
+
)
|
|
45
|
+
.void
|
|
46
|
+
}
|
|
47
|
+
def initialize(brand_id: nil, project_id: nil, page: 1, page_size: 20)
|
|
48
|
+
@brand_id = brand_id
|
|
49
|
+
@project_id = project_id
|
|
50
|
+
@page = page
|
|
51
|
+
@page_size = page_size
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
55
|
+
def ==(other)
|
|
56
|
+
return false unless other.is_a?(self.class)
|
|
57
|
+
return false unless @brand_id == other.brand_id
|
|
58
|
+
return false unless @project_id == other.project_id
|
|
59
|
+
return false unless @page == other.page
|
|
60
|
+
return false unless @page_size == other.page_size
|
|
61
|
+
true
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::ListCampaignsRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ListCampaignsRequest
|
|
9
|
+
def brand_id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def brand_id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def page
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def page=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def page_size
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def page_size=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class ListCampaignsResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
sig { returns(T.proc.returns(T.nilable(ListCampaignsResponse))) }
|
|
14
|
+
attr_accessor :next_page
|
|
15
|
+
|
|
16
|
+
# HTTP response content type for this operation
|
|
17
|
+
field :content_type, ::String
|
|
18
|
+
# HTTP response status code for this operation
|
|
19
|
+
field :status_code, ::Integer
|
|
20
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
21
|
+
field :raw_response, ::Faraday::Response
|
|
22
|
+
# Campaigns retrieved successfully
|
|
23
|
+
field :object, Crystalline::Nilable.new(Models::Operations::ListCampaignsResponseBody)
|
|
24
|
+
|
|
25
|
+
sig {
|
|
26
|
+
params(
|
|
27
|
+
content_type: ::String,
|
|
28
|
+
status_code: ::Integer,
|
|
29
|
+
raw_response: ::Faraday::Response,
|
|
30
|
+
object: T.nilable(Models::Operations::ListCampaignsResponseBody)
|
|
31
|
+
)
|
|
32
|
+
.void
|
|
33
|
+
}
|
|
34
|
+
def initialize(content_type:, status_code:, raw_response:, object: nil)
|
|
35
|
+
@content_type = content_type
|
|
36
|
+
@status_code = status_code
|
|
37
|
+
@raw_response = raw_response
|
|
38
|
+
@object = object
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
42
|
+
def ==(other)
|
|
43
|
+
return false unless other.is_a?(self.class)
|
|
44
|
+
return false unless @content_type == other.content_type
|
|
45
|
+
return false unless @status_code == other.status_code
|
|
46
|
+
return false unless @raw_response == other.raw_response
|
|
47
|
+
return false unless @object == other.object
|
|
48
|
+
true
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def each
|
|
52
|
+
page = self
|
|
53
|
+
loop do
|
|
54
|
+
yield page
|
|
55
|
+
next_page = page.next_page.call if page.next_page
|
|
56
|
+
break if next_page.nil?
|
|
57
|
+
page = T.must(next_page)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::ListCampaignsResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ListCampaignsResponse
|
|
9
|
+
def content_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def content_type=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status_code
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status_code=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raw_response
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def raw_response=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def object
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def object=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# Campaigns retrieved successfully
|
|
10
|
+
class ListCampaignsResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The items on this page.
|
|
15
|
+
field(
|
|
16
|
+
:data,
|
|
17
|
+
Crystalline::Array.new(Models::Operations::ListCampaignsData),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("data"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# Where this page is in the full list.
|
|
21
|
+
field(
|
|
22
|
+
:pagination,
|
|
23
|
+
Models::Components::Pagination,
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("pagination"), required: true}}
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
sig {
|
|
28
|
+
params(data: T::Array[Models::Operations::ListCampaignsData], pagination: Models::Components::Pagination).void
|
|
29
|
+
}
|
|
30
|
+
def initialize(data:, pagination:)
|
|
31
|
+
@data = data
|
|
32
|
+
@pagination = pagination
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
36
|
+
def ==(other)
|
|
37
|
+
return false unless other.is_a?(self.class)
|
|
38
|
+
return false unless @data == other.data
|
|
39
|
+
return false unless @pagination == other.pagination
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::ListCampaignsResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ListCampaignsResponseBody
|
|
9
|
+
def data
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def data=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def pagination
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def pagination=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# ListCampaignsStatus - Whether the campaign is paused.
|
|
10
|
+
class ListCampaignsStatus
|
|
11
|
+
include ::Crystalline::Enum
|
|
12
|
+
enums do
|
|
13
|
+
ACTIVE = new("active")
|
|
14
|
+
PAUSED = new("paused")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
open!
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -80,7 +80,7 @@ module ModerationApi
|
|
|
80
80
|
Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)),
|
|
81
81
|
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("metadata")}}
|
|
82
82
|
)
|
|
83
|
-
# The messaging campaign (10DLC) that sends this message. Requires the campaign add-on.
|
|
83
|
+
# The messaging campaign (10DLC) that sends this message. Requires the campaign add-on. Create the campaign with `POST /campaigns` first, so its messages are checked against its registration from the first message.
|
|
84
84
|
field(
|
|
85
85
|
:campaign,
|
|
86
86
|
Crystalline::Nilable.new(Models::Operations::CampaignRequest),
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class UpdateBrandRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the brand.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
|
|
17
|
+
field :body, Models::Operations::UpdateBrandRequestBody, {'request': {'media_type': "application/json"}}
|
|
18
|
+
# The project to act on, by ID or name. Required with an organization key unless the key reaches only one project; list projects with GET /projects. A project key acts on its own project and needs no value: naming another one is an error.
|
|
19
|
+
field(
|
|
20
|
+
:project_id,
|
|
21
|
+
Crystalline::Nilable.new(::String),
|
|
22
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
sig {
|
|
26
|
+
params(id: ::String, body: Models::Operations::UpdateBrandRequestBody, project_id: T.nilable(::String)).void
|
|
27
|
+
}
|
|
28
|
+
def initialize(id:, body:, project_id: nil)
|
|
29
|
+
@id = id
|
|
30
|
+
@body = body
|
|
31
|
+
@project_id = project_id
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
35
|
+
def ==(other)
|
|
36
|
+
return false unless other.is_a?(self.class)
|
|
37
|
+
return false unless @id == other.id
|
|
38
|
+
return false unless @body == other.body
|
|
39
|
+
return false unless @project_id == other.project_id
|
|
40
|
+
true
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::UpdateBrandRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UpdateBrandRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def body
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def body=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def project_id
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def project_id=(str_)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class UpdateBrandRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The name of the brand.
|
|
15
|
+
field(
|
|
16
|
+
:name,
|
|
17
|
+
Crystalline::Nilable.new(::String),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}}
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
sig { params(name: T.nilable(::String)).void }
|
|
22
|
+
def initialize(name: nil)
|
|
23
|
+
@name = name
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
27
|
+
def ==(other)
|
|
28
|
+
return false unless other.is_a?(self.class)
|
|
29
|
+
return false unless @name == other.name
|
|
30
|
+
true
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::UpdateBrandRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UpdateBrandRequestBody
|
|
9
|
+
def name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def name=(str_)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
|
|
10
|
+
class UpdateBrandResponse
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# HTTP response content type for this operation
|
|
15
|
+
field :content_type, ::String
|
|
16
|
+
# HTTP response status code for this operation
|
|
17
|
+
field :status_code, ::Integer
|
|
18
|
+
# Raw HTTP response; suitable for custom response parsing
|
|
19
|
+
field :raw_response, ::Faraday::Response
|
|
20
|
+
# Brand saved successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::UpdateBrandResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::UpdateBrandResponseBody)
|
|
29
|
+
)
|
|
30
|
+
.void
|
|
31
|
+
}
|
|
32
|
+
def initialize(content_type:, status_code:, raw_response:, object: nil)
|
|
33
|
+
@content_type = content_type
|
|
34
|
+
@status_code = status_code
|
|
35
|
+
@raw_response = raw_response
|
|
36
|
+
@object = object
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
40
|
+
def ==(other)
|
|
41
|
+
return false unless other.is_a?(self.class)
|
|
42
|
+
return false unless @content_type == other.content_type
|
|
43
|
+
return false unless @status_code == other.status_code
|
|
44
|
+
return false unless @raw_response == other.raw_response
|
|
45
|
+
return false unless @object == other.object
|
|
46
|
+
true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::UpdateBrandResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UpdateBrandResponse
|
|
9
|
+
def content_type
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def content_type=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status_code
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status_code=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def raw_response
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def raw_response=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def object
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def object=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# Brand saved successfully
|
|
10
|
+
class UpdateBrandResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the brand.
|
|
15
|
+
field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}}
|
|
16
|
+
# Whether the brand is blocked.
|
|
17
|
+
field(
|
|
18
|
+
:status,
|
|
19
|
+
Models::Operations::UpdateBrandStatus,
|
|
20
|
+
{
|
|
21
|
+
'format_json': {
|
|
22
|
+
'letter_case': ::ModerationApi::Utils.field_name("status"),
|
|
23
|
+
required: true,
|
|
24
|
+
'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::UpdateBrandStatus, false)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
# When the brand was created.
|
|
29
|
+
field(
|
|
30
|
+
:created_at,
|
|
31
|
+
::String,
|
|
32
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createdAt"), required: true}}
|
|
33
|
+
)
|
|
34
|
+
# When the brand was last changed.
|
|
35
|
+
field(
|
|
36
|
+
:updated_at,
|
|
37
|
+
::String,
|
|
38
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("updatedAt"), required: true}}
|
|
39
|
+
)
|
|
40
|
+
# The name of the brand.
|
|
41
|
+
field(
|
|
42
|
+
:name,
|
|
43
|
+
Crystalline::Nilable.new(::String),
|
|
44
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
sig {
|
|
48
|
+
params(
|
|
49
|
+
id: ::String,
|
|
50
|
+
status: Models::Operations::UpdateBrandStatus,
|
|
51
|
+
created_at: ::String,
|
|
52
|
+
updated_at: ::String,
|
|
53
|
+
name: T.nilable(::String)
|
|
54
|
+
)
|
|
55
|
+
.void
|
|
56
|
+
}
|
|
57
|
+
def initialize(id:, status:, created_at:, updated_at:, name: nil)
|
|
58
|
+
@id = id
|
|
59
|
+
@status = status
|
|
60
|
+
@created_at = created_at
|
|
61
|
+
@updated_at = updated_at
|
|
62
|
+
@name = name
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
66
|
+
def ==(other)
|
|
67
|
+
return false unless other.is_a?(self.class)
|
|
68
|
+
return false unless @id == other.id
|
|
69
|
+
return false unless @status == other.status
|
|
70
|
+
return false unless @created_at == other.created_at
|
|
71
|
+
return false unless @updated_at == other.updated_at
|
|
72
|
+
return false unless @name == other.name
|
|
73
|
+
true
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::UpdateBrandResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::UpdateBrandResponseBody
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def status
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def status=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def created_at
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def created_at=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def updated_at
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def updated_at=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def name
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def name=(str_)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
module ModerationApi
|
|
7
|
+
module Models
|
|
8
|
+
module Operations
|
|
9
|
+
# UpdateBrandStatus - Whether the brand is blocked.
|
|
10
|
+
class UpdateBrandStatus
|
|
11
|
+
include ::Crystalline::Enum
|
|
12
|
+
enums do
|
|
13
|
+
ENABLED = new("enabled")
|
|
14
|
+
BLOCKED = new("blocked")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
open!
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|