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,67 @@
|
|
|
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
|
+
# What the registration declared about the content. `null` means not known.
|
|
10
|
+
class GetCampaignDeclared
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# The campaign sends links.
|
|
15
|
+
field(
|
|
16
|
+
:links,
|
|
17
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
18
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("links"), required: true}}
|
|
19
|
+
)
|
|
20
|
+
# The campaign sends phone numbers.
|
|
21
|
+
field(
|
|
22
|
+
:phone_numbers,
|
|
23
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
24
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("phoneNumbers"), required: true}}
|
|
25
|
+
)
|
|
26
|
+
# The campaign sends loan offers.
|
|
27
|
+
field(
|
|
28
|
+
:lending,
|
|
29
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
30
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("lending"), required: true}}
|
|
31
|
+
)
|
|
32
|
+
# The campaign sends age-gated content.
|
|
33
|
+
field(
|
|
34
|
+
:age_gated,
|
|
35
|
+
Crystalline::Nilable.new(Crystalline::Boolean.new),
|
|
36
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("ageGated"), required: true}}
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
sig {
|
|
40
|
+
params(
|
|
41
|
+
links: T.nilable(T::Boolean),
|
|
42
|
+
phone_numbers: T.nilable(T::Boolean),
|
|
43
|
+
lending: T.nilable(T::Boolean),
|
|
44
|
+
age_gated: T.nilable(T::Boolean)
|
|
45
|
+
)
|
|
46
|
+
.void
|
|
47
|
+
}
|
|
48
|
+
def initialize(links: nil, phone_numbers: nil, lending: nil, age_gated: nil)
|
|
49
|
+
@links = links
|
|
50
|
+
@phone_numbers = phone_numbers
|
|
51
|
+
@lending = lending
|
|
52
|
+
@age_gated = age_gated
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
56
|
+
def ==(other)
|
|
57
|
+
return false unless other.is_a?(self.class)
|
|
58
|
+
return false unless @links == other.links
|
|
59
|
+
return false unless @phone_numbers == other.phone_numbers
|
|
60
|
+
return false unless @lending == other.lending
|
|
61
|
+
return false unless @age_gated == other.age_gated
|
|
62
|
+
true
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetCampaignDeclared
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetCampaignDeclared
|
|
9
|
+
def links
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def links=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def phone_numbers
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def phone_numbers=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def lending
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def lending=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def age_gated
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def age_gated=(str_)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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 GetCampaignRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the campaign.
|
|
15
|
+
field :id, ::String, {'path_param': {'field_name': "id", 'style': "simple", 'explode': false}}
|
|
16
|
+
# 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.
|
|
17
|
+
field(
|
|
18
|
+
:project_id,
|
|
19
|
+
Crystalline::Nilable.new(::String),
|
|
20
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
sig { params(id: ::String, project_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, project_id: nil)
|
|
25
|
+
@id = id
|
|
26
|
+
@project_id = project_id
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
30
|
+
def ==(other)
|
|
31
|
+
return false unless other.is_a?(self.class)
|
|
32
|
+
return false unless @id == other.id
|
|
33
|
+
return false unless @project_id == other.project_id
|
|
34
|
+
true
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetCampaignRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetCampaignRequest
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
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 GetCampaignResponse
|
|
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
|
+
# Campaign retrieved successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::GetCampaignResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::GetCampaignResponseBody)
|
|
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::GetCampaignResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetCampaignResponse
|
|
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,174 @@
|
|
|
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
|
+
# Campaign retrieved successfully
|
|
10
|
+
class GetCampaignResponseBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the campaign.
|
|
15
|
+
field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}}
|
|
16
|
+
# The registered use cases, as TCR codes.
|
|
17
|
+
field(
|
|
18
|
+
:use_cases,
|
|
19
|
+
Crystalline::Array.new(::String),
|
|
20
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("useCases"), required: true}}
|
|
21
|
+
)
|
|
22
|
+
# The brand names in the registration.
|
|
23
|
+
field(
|
|
24
|
+
:registered_brand_names,
|
|
25
|
+
Crystalline::Array.new(::String),
|
|
26
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("registeredBrandNames"), required: true}}
|
|
27
|
+
)
|
|
28
|
+
# The websites in the registration.
|
|
29
|
+
field(
|
|
30
|
+
:websites,
|
|
31
|
+
Crystalline::Array.new(::String),
|
|
32
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("websites"), required: true}}
|
|
33
|
+
)
|
|
34
|
+
# The sample messages in the registration.
|
|
35
|
+
field(
|
|
36
|
+
:sample_messages,
|
|
37
|
+
Crystalline::Array.new(::String),
|
|
38
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sampleMessages"), required: true}}
|
|
39
|
+
)
|
|
40
|
+
# What the registration declared about the content. `null` means not known.
|
|
41
|
+
field(
|
|
42
|
+
:declared,
|
|
43
|
+
Models::Operations::GetCampaignDeclared,
|
|
44
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("declared"), required: true}}
|
|
45
|
+
)
|
|
46
|
+
# Whether the campaign is paused.
|
|
47
|
+
field(
|
|
48
|
+
:status,
|
|
49
|
+
Models::Operations::GetCampaignStatus,
|
|
50
|
+
{
|
|
51
|
+
'format_json': {
|
|
52
|
+
'letter_case': ::ModerationApi::Utils.field_name("status"),
|
|
53
|
+
required: true,
|
|
54
|
+
'decoder': ::ModerationApi::Utils.open_enum_from_string(Models::Operations::GetCampaignStatus, false)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
# When the campaign was created.
|
|
59
|
+
field(
|
|
60
|
+
:created_at,
|
|
61
|
+
::String,
|
|
62
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("createdAt"), required: true}}
|
|
63
|
+
)
|
|
64
|
+
# When the campaign was last changed.
|
|
65
|
+
field(
|
|
66
|
+
:updated_at,
|
|
67
|
+
::String,
|
|
68
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("updatedAt"), required: true}}
|
|
69
|
+
)
|
|
70
|
+
# Your ID for the brand that owns the campaign.
|
|
71
|
+
field(
|
|
72
|
+
:brand_id,
|
|
73
|
+
Crystalline::Nilable.new(::String),
|
|
74
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("brandId"), required: true}}
|
|
75
|
+
)
|
|
76
|
+
# The ID of the account.
|
|
77
|
+
field(
|
|
78
|
+
:account_id,
|
|
79
|
+
Crystalline::Nilable.new(::String),
|
|
80
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("accountId"), required: true}}
|
|
81
|
+
)
|
|
82
|
+
# The ID of the sub-account.
|
|
83
|
+
field(
|
|
84
|
+
:sub_account_id,
|
|
85
|
+
Crystalline::Nilable.new(::String),
|
|
86
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("subAccountId"), required: true}}
|
|
87
|
+
)
|
|
88
|
+
# The name of the campaign.
|
|
89
|
+
field(
|
|
90
|
+
:name,
|
|
91
|
+
Crystalline::Nilable.new(::String),
|
|
92
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name"), required: true}}
|
|
93
|
+
)
|
|
94
|
+
# What the campaign is for, as registered.
|
|
95
|
+
field(
|
|
96
|
+
:description,
|
|
97
|
+
Crystalline::Nilable.new(::String),
|
|
98
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description"), required: true}}
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
sig {
|
|
102
|
+
params(
|
|
103
|
+
id: ::String,
|
|
104
|
+
use_cases: T::Array[::String],
|
|
105
|
+
registered_brand_names: T::Array[::String],
|
|
106
|
+
websites: T::Array[::String],
|
|
107
|
+
sample_messages: T::Array[::String],
|
|
108
|
+
declared: Models::Operations::GetCampaignDeclared,
|
|
109
|
+
status: Models::Operations::GetCampaignStatus,
|
|
110
|
+
created_at: ::String,
|
|
111
|
+
updated_at: ::String,
|
|
112
|
+
brand_id: T.nilable(::String),
|
|
113
|
+
account_id: T.nilable(::String),
|
|
114
|
+
sub_account_id: T.nilable(::String),
|
|
115
|
+
name: T.nilable(::String),
|
|
116
|
+
description: T.nilable(::String)
|
|
117
|
+
)
|
|
118
|
+
.void
|
|
119
|
+
}
|
|
120
|
+
def initialize(
|
|
121
|
+
id:,
|
|
122
|
+
use_cases:,
|
|
123
|
+
registered_brand_names:,
|
|
124
|
+
websites:,
|
|
125
|
+
sample_messages:,
|
|
126
|
+
declared:,
|
|
127
|
+
status:,
|
|
128
|
+
created_at:,
|
|
129
|
+
updated_at:,
|
|
130
|
+
brand_id: nil,
|
|
131
|
+
account_id: nil,
|
|
132
|
+
sub_account_id: nil,
|
|
133
|
+
name: nil,
|
|
134
|
+
description: nil
|
|
135
|
+
)
|
|
136
|
+
@id = id
|
|
137
|
+
@use_cases = use_cases
|
|
138
|
+
@registered_brand_names = registered_brand_names
|
|
139
|
+
@websites = websites
|
|
140
|
+
@sample_messages = sample_messages
|
|
141
|
+
@declared = declared
|
|
142
|
+
@status = status
|
|
143
|
+
@created_at = created_at
|
|
144
|
+
@updated_at = updated_at
|
|
145
|
+
@brand_id = brand_id
|
|
146
|
+
@account_id = account_id
|
|
147
|
+
@sub_account_id = sub_account_id
|
|
148
|
+
@name = name
|
|
149
|
+
@description = description
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
153
|
+
def ==(other)
|
|
154
|
+
return false unless other.is_a?(self.class)
|
|
155
|
+
return false unless @id == other.id
|
|
156
|
+
return false unless @use_cases == other.use_cases
|
|
157
|
+
return false unless @registered_brand_names == other.registered_brand_names
|
|
158
|
+
return false unless @websites == other.websites
|
|
159
|
+
return false unless @sample_messages == other.sample_messages
|
|
160
|
+
return false unless @declared == other.declared
|
|
161
|
+
return false unless @status == other.status
|
|
162
|
+
return false unless @created_at == other.created_at
|
|
163
|
+
return false unless @updated_at == other.updated_at
|
|
164
|
+
return false unless @brand_id == other.brand_id
|
|
165
|
+
return false unless @account_id == other.account_id
|
|
166
|
+
return false unless @sub_account_id == other.sub_account_id
|
|
167
|
+
return false unless @name == other.name
|
|
168
|
+
return false unless @description == other.description
|
|
169
|
+
true
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
174
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::GetCampaignResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::GetCampaignResponseBody
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def use_cases
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def use_cases=(str_)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def registered_brand_names
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def registered_brand_names=(str_)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def websites
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def websites=(str_)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def sample_messages
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def sample_messages=(str_)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def declared
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def declared=(str_)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def status
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def status=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def created_at
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def created_at=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def updated_at
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def updated_at=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def brand_id
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def brand_id=(str_)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def account_id
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def account_id=(str_)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def sub_account_id
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def sub_account_id=(str_)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def name
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def name=(str_)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def description
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def description=(str_)
|
|
91
|
+
end
|
|
92
|
+
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
|
+
# GetCampaignStatus - Whether the campaign is paused.
|
|
10
|
+
class GetCampaignStatus
|
|
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
|
|
@@ -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
|
+
|
|
10
|
+
class ListBrandsData
|
|
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::ListBrandsStatus,
|
|
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::ListBrandsStatus, 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::ListBrandsStatus,
|
|
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::ListBrandsData
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::ListBrandsData
|
|
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
|