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
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
module ModerationApi
|
|
7
7
|
module Models
|
|
8
8
|
module Operations
|
|
9
|
-
# The messaging campaign (10DLC) that sends this message. Requires the campaign add-on.
|
|
9
|
+
# 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.
|
|
10
10
|
class CampaignRequest
|
|
11
11
|
extend T::Sig
|
|
12
12
|
include Crystalline::MetadataFields
|
|
13
13
|
|
|
14
|
-
# Your ID for the campaign, for example the TCR campaign ID.
|
|
14
|
+
# Your ID for the campaign, for example the TCR campaign ID. Create the campaign with `POST /campaigns` before its first message. An unknown ID creates a campaign with no registration.
|
|
15
15
|
field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}}
|
|
16
16
|
# Your ID for the brand that owns the campaign, for example the TCR brand ID.
|
|
17
17
|
field(
|
|
@@ -25,7 +25,7 @@ module ModerationApi
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
|
-
# The campaign signals of the message: off_purpose (the message is in a group that does not fit the
|
|
28
|
+
# The campaign signals of the message: off_purpose (the message is in a group that does not fit the registered description of the campaign), sender_missing, sender_similar, sender_mismatch (the sender name), url_not_declared, url_mismatch (the links). They are also the labels of the `campaign` policy in `policies`.
|
|
29
29
|
field(
|
|
30
30
|
:signals,
|
|
31
31
|
Crystalline::Array.new(Models::Operations::Signal),
|
|
@@ -25,7 +25,7 @@ module ModerationApi
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
|
-
# The group does not fit the
|
|
28
|
+
# The group does not fit the registered description of the campaign. Always false when the campaign has no registered description.
|
|
29
29
|
field(
|
|
30
30
|
:off_purpose,
|
|
31
31
|
Crystalline::Boolean.new,
|
|
@@ -0,0 +1,38 @@
|
|
|
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 CreateBrandRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
field :body, Models::Operations::CreateBrandRequestBody, {'request': {'media_type': "application/json"}}
|
|
15
|
+
# 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.
|
|
16
|
+
field(
|
|
17
|
+
:project_id,
|
|
18
|
+
Crystalline::Nilable.new(::String),
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
sig { params(body: Models::Operations::CreateBrandRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
29
|
+
def ==(other)
|
|
30
|
+
return false unless other.is_a?(self.class)
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
33
|
+
true
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::CreateBrandRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateBrandRequest
|
|
9
|
+
def body
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def body=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
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 CreateBrandRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the brand, for example the TCR brand ID.
|
|
15
|
+
field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}}
|
|
16
|
+
# The name of the brand.
|
|
17
|
+
field(
|
|
18
|
+
:name,
|
|
19
|
+
Crystalline::Nilable.new(::String),
|
|
20
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
sig { params(id: ::String, name: T.nilable(::String)).void }
|
|
24
|
+
def initialize(id:, name: nil)
|
|
25
|
+
@id = id
|
|
26
|
+
@name = name
|
|
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 @name == other.name
|
|
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::CreateBrandRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateBrandRequestBody
|
|
9
|
+
def id
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def id=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def name
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def name=(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 CreateBrandResponse
|
|
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 created successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::CreateBrandResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::CreateBrandResponseBody)
|
|
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::CreateBrandResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateBrandResponse
|
|
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 created successfully
|
|
10
|
+
class CreateBrandResponseBody
|
|
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::CreateBrandStatus,
|
|
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::CreateBrandStatus, 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::CreateBrandStatus,
|
|
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::CreateBrandResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateBrandResponseBody
|
|
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
|
+
# CreateBrandStatus - Whether the brand is blocked.
|
|
10
|
+
class CreateBrandStatus
|
|
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
|
|
@@ -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. Use `null` for a value that you do not know.
|
|
10
|
+
class CreateCampaignDeclaredRequest
|
|
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")}}
|
|
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")}}
|
|
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")}}
|
|
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")}}
|
|
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::CreateCampaignDeclaredRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignDeclaredRequest
|
|
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,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 CreateCampaignDeclaredResponse
|
|
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::CreateCampaignDeclaredResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignDeclaredResponse
|
|
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,38 @@
|
|
|
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 CreateCampaignRequest
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
field :body, Models::Operations::CreateCampaignRequestBody, {'request': {'media_type': "application/json"}}
|
|
15
|
+
# 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.
|
|
16
|
+
field(
|
|
17
|
+
:project_id,
|
|
18
|
+
Crystalline::Nilable.new(::String),
|
|
19
|
+
{'header': {'field_name': "Project-Id", 'style': "simple", 'explode': false}}
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
sig { params(body: Models::Operations::CreateCampaignRequestBody, project_id: T.nilable(::String)).void }
|
|
23
|
+
def initialize(body:, project_id: nil)
|
|
24
|
+
@body = body
|
|
25
|
+
@project_id = project_id
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
29
|
+
def ==(other)
|
|
30
|
+
return false unless other.is_a?(self.class)
|
|
31
|
+
return false unless @body == other.body
|
|
32
|
+
return false unless @project_id == other.project_id
|
|
33
|
+
true
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::CreateCampaignRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignRequest
|
|
9
|
+
def body
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def body=(str_)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def project_id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def project_id=(str_)
|
|
19
|
+
end
|
|
20
|
+
end
|