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,138 @@
|
|
|
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 CreateCampaignRequestBody
|
|
11
|
+
extend T::Sig
|
|
12
|
+
include Crystalline::MetadataFields
|
|
13
|
+
|
|
14
|
+
# Your ID for the campaign, for example the TCR campaign ID.
|
|
15
|
+
field :id, ::String, {'format_json': {'letter_case': ::ModerationApi::Utils.field_name("id"), required: true}}
|
|
16
|
+
# The registered use cases, as TCR codes, for example `["CUSTOMER_CARE"]`. For a MIXED or LOW_VOLUME campaign, send its sub-use cases, for example `["ACCOUNT_NOTIFICATION", "CUSTOMER_CARE", "MARKETING"]`. Each new group of similar messages is compared with them. Known codes: 2FA, ACCOUNT_NOTIFICATION, CUSTOMER_CARE, DELIVERY_NOTIFICATION, FRAUD_ALERT, HIGHER_EDUCATION, MARKETING, POLLING_VOTING, PUBLIC_SERVICE_ANNOUNCEMENT, SECURITY_ALERT, MIXED, LOW_VOLUME, AGENTS_FRANCHISES, CHARITY, EMERGENCY, K12_EDUCATION, POLITICAL, PROXY, PUBLIC_SAFETY_RESTRICTED, SOCIAL, SWEEPSTAKE. A code that is not in this list is also accepted. Maximum 10.
|
|
17
|
+
field(
|
|
18
|
+
:use_cases,
|
|
19
|
+
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
20
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("useCases")}}
|
|
21
|
+
)
|
|
22
|
+
# The brand names in the registration. Messages are expected to use one of them as the sender name. Maximum 20.
|
|
23
|
+
field(
|
|
24
|
+
:registered_brand_names,
|
|
25
|
+
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
26
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("registeredBrandNames")}}
|
|
27
|
+
)
|
|
28
|
+
# The websites in the registration. Links in messages are expected to go to one of them. Maximum 20.
|
|
29
|
+
field(
|
|
30
|
+
:websites,
|
|
31
|
+
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
32
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("websites")}}
|
|
33
|
+
)
|
|
34
|
+
# The sample messages in the registration. Maximum 20. They are the baseline that later messages are compared with.
|
|
35
|
+
field(
|
|
36
|
+
:sample_messages,
|
|
37
|
+
Crystalline::Nilable.new(Crystalline::Array.new(::String)),
|
|
38
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("sampleMessages")}}
|
|
39
|
+
)
|
|
40
|
+
# What the registration declared about the content. Use `null` for a value that you do not know.
|
|
41
|
+
field(
|
|
42
|
+
:declared,
|
|
43
|
+
Crystalline::Nilable.new(Models::Operations::CreateCampaignDeclaredRequest),
|
|
44
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("declared")}}
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
field(
|
|
48
|
+
:brand_id,
|
|
49
|
+
Crystalline::Nilable.new(::String),
|
|
50
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("brandId")}}
|
|
51
|
+
)
|
|
52
|
+
# The ID of the account in your system that sends for this campaign.
|
|
53
|
+
field(
|
|
54
|
+
:account_id,
|
|
55
|
+
Crystalline::Nilable.new(::String),
|
|
56
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("accountId")}}
|
|
57
|
+
)
|
|
58
|
+
# The ID of the sub-account in your system that sends for this campaign.
|
|
59
|
+
field(
|
|
60
|
+
:sub_account_id,
|
|
61
|
+
Crystalline::Nilable.new(::String),
|
|
62
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("subAccountId")}}
|
|
63
|
+
)
|
|
64
|
+
# The name of the campaign.
|
|
65
|
+
field(
|
|
66
|
+
:name,
|
|
67
|
+
Crystalline::Nilable.new(::String),
|
|
68
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("name")}}
|
|
69
|
+
)
|
|
70
|
+
# What the campaign is for, as registered (for example the TCR campaign description). Each new group of similar messages is compared with it.
|
|
71
|
+
field(
|
|
72
|
+
:description,
|
|
73
|
+
Crystalline::Nilable.new(::String),
|
|
74
|
+
{'format_json': {'letter_case': ::ModerationApi::Utils.field_name("description")}}
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
sig {
|
|
78
|
+
params(
|
|
79
|
+
id: ::String,
|
|
80
|
+
use_cases: T.nilable(T::Array[::String]),
|
|
81
|
+
registered_brand_names: T.nilable(T::Array[::String]),
|
|
82
|
+
websites: T.nilable(T::Array[::String]),
|
|
83
|
+
sample_messages: T.nilable(T::Array[::String]),
|
|
84
|
+
declared: T.nilable(Models::Operations::CreateCampaignDeclaredRequest),
|
|
85
|
+
brand_id: T.nilable(::String),
|
|
86
|
+
account_id: T.nilable(::String),
|
|
87
|
+
sub_account_id: T.nilable(::String),
|
|
88
|
+
name: T.nilable(::String),
|
|
89
|
+
description: T.nilable(::String)
|
|
90
|
+
)
|
|
91
|
+
.void
|
|
92
|
+
}
|
|
93
|
+
def initialize(
|
|
94
|
+
id:,
|
|
95
|
+
use_cases: nil,
|
|
96
|
+
registered_brand_names: nil,
|
|
97
|
+
websites: nil,
|
|
98
|
+
sample_messages: nil,
|
|
99
|
+
declared: nil,
|
|
100
|
+
brand_id: nil,
|
|
101
|
+
account_id: nil,
|
|
102
|
+
sub_account_id: nil,
|
|
103
|
+
name: nil,
|
|
104
|
+
description: nil
|
|
105
|
+
)
|
|
106
|
+
@id = id
|
|
107
|
+
@use_cases = use_cases
|
|
108
|
+
@registered_brand_names = registered_brand_names
|
|
109
|
+
@websites = websites
|
|
110
|
+
@sample_messages = sample_messages
|
|
111
|
+
@declared = declared
|
|
112
|
+
@brand_id = brand_id
|
|
113
|
+
@account_id = account_id
|
|
114
|
+
@sub_account_id = sub_account_id
|
|
115
|
+
@name = name
|
|
116
|
+
@description = description
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
120
|
+
def ==(other)
|
|
121
|
+
return false unless other.is_a?(self.class)
|
|
122
|
+
return false unless @id == other.id
|
|
123
|
+
return false unless @use_cases == other.use_cases
|
|
124
|
+
return false unless @registered_brand_names == other.registered_brand_names
|
|
125
|
+
return false unless @websites == other.websites
|
|
126
|
+
return false unless @sample_messages == other.sample_messages
|
|
127
|
+
return false unless @declared == other.declared
|
|
128
|
+
return false unless @brand_id == other.brand_id
|
|
129
|
+
return false unless @account_id == other.account_id
|
|
130
|
+
return false unless @sub_account_id == other.sub_account_id
|
|
131
|
+
return false unless @name == other.name
|
|
132
|
+
return false unless @description == other.description
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
class ModerationApi::Models::Operations::CreateCampaignRequestBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignRequestBody
|
|
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 brand_id
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def brand_id=(str_)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def account_id
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def account_id=(str_)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def sub_account_id
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def sub_account_id=(str_)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def name
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def name=(str_)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def description
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def description=(str_)
|
|
73
|
+
end
|
|
74
|
+
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 CreateCampaignResponse
|
|
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 created successfully
|
|
21
|
+
field :object, Crystalline::Nilable.new(Models::Operations::CreateCampaignResponseBody)
|
|
22
|
+
|
|
23
|
+
sig {
|
|
24
|
+
params(
|
|
25
|
+
content_type: ::String,
|
|
26
|
+
status_code: ::Integer,
|
|
27
|
+
raw_response: ::Faraday::Response,
|
|
28
|
+
object: T.nilable(Models::Operations::CreateCampaignResponseBody)
|
|
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::CreateCampaignResponse
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignResponse
|
|
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 created successfully
|
|
10
|
+
class CreateCampaignResponseBody
|
|
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::CreateCampaignDeclaredResponse,
|
|
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::CreateCampaignStatus,
|
|
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::CreateCampaignStatus, 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::CreateCampaignDeclaredResponse,
|
|
109
|
+
status: Models::Operations::CreateCampaignStatus,
|
|
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::CreateCampaignResponseBody
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::CreateCampaignResponseBody
|
|
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
|
+
# CreateCampaignStatus - Whether the campaign is paused.
|
|
10
|
+
class CreateCampaignStatus
|
|
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,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 DeleteBrandRequest
|
|
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
|
+
# 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::DeleteBrandRequest
|
|
5
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class ModerationApi::Models::Operations::DeleteBrandRequest
|
|
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
|