rcs 2.0.2 → 2.0.4
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/rcs/brands/client.rb +52 -90
- data/lib/rcs/brands/types/{brand_contact.rb → upsert_brand_schema_contact.rb} +20 -18
- data/lib/rcs/brands/types/upsert_brand_schema_entity_type.rb +16 -0
- data/lib/rcs/brands/types/upsert_brand_schema_sector.rb +28 -0
- data/lib/rcs/brands/types/upsert_brand_schema_type.rb +16 -0
- data/lib/rcs/campaigns/dlc/client.rb +12 -12
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_help_keywords.rb → dlc_campaign_help_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_keywords.rb → dlc_campaign_keywords.rb} +20 -20
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_links.rb → dlc_campaign_links.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_in_keywords.rb → dlc_campaign_opt_in_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_opt_out_keywords.rb → dlc_campaign_opt_out_keywords.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_options.rb → dlc_campaign_options.rb} +5 -5
- data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_use_case.rb → dlc_campaign_use_case.rb} +5 -5
- data/lib/rcs/campaigns/rcs/client.rb +144 -51
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_agent.rb → rcs_agent.rb} +15 -9
- data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +122 -43
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_opt_out.rb → rcs_campaign_help_keywords.rb} +20 -19
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_keywords.rb +98 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_in_keywords.rb +87 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_opt_out_keywords.rb +83 -0
- data/lib/rcs/campaigns/rcs/types/rcs_campaign_traffic.rb +76 -0
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_links.rb → rcs_links.rb} +5 -5
- data/lib/rcs/campaigns/rcs/types/{upsert_rcs_use_case.rb → rcs_use_case.rb} +7 -7
- data/lib/rcs/campaigns/toll_free/client.rb +53 -10
- data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +54 -12
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_help_keywords.rb +66 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_keywords.rb +86 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_links.rb +74 -0
- data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_opt_in.rb → toll_free_campaign_opt_in.rb} +5 -5
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_opt_in_keywords.rb +78 -0
- data/lib/rcs/campaigns/toll_free/types/toll_free_campaign_options.rb +64 -0
- data/lib/rcs/campaigns/toll_free/types/{upsert_toll_free_schema_use_case.rb → toll_free_campaign_use_case.rb} +5 -5
- data/lib/rcs/messages/blast/client.rb +419 -0
- data/lib/rcs/messages/blast/types/blast_mms_options.rb +82 -0
- data/lib/rcs/messages/blast/types/blast_mms_response.rb +60 -0
- data/lib/rcs/messages/blast/types/blast_rcs_options.rb +118 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card.rb +82 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_image_alignment.rb +16 -0
- data/lib/rcs/messages/blast/types/blast_rcs_request_options_standalone_card_orientation.rb +15 -0
- data/lib/rcs/messages/blast/types/blast_rcs_response.rb +60 -0
- data/lib/rcs/messages/blast/types/blast_sms_options.rb +70 -0
- data/lib/rcs/messages/blast/types/blast_sms_response.rb +60 -0
- data/lib/rcs/messages/mms/client.rb +6 -6
- data/lib/rcs/messages/mms/types/mms_send_response.rb +4 -4
- data/lib/rcs/messages/rcs/client.rb +7 -7
- data/lib/rcs/messages/rcs/types/{rcs_send_response.rb → send_rich_message_response.rb} +11 -11
- data/lib/rcs/messages/schedule/client.rb +103 -0
- data/lib/rcs/messages/sms/client.rb +6 -6
- data/lib/rcs/messages/sms/types/sms_send_response.rb +4 -4
- data/lib/rcs/types/{rcs_base.rb → base_rich_message.rb} +10 -10
- data/lib/rcs/types/blast_details.rb +110 -0
- data/lib/rcs/types/company_entity_type_enum.rb +14 -0
- data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +30 -2
- data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_brand_tier.rb +15 -0
- data/lib/rcs/types/dlc_with_extended_brand_and_status_mno_tcr_tier.rb +22 -0
- data/lib/rcs/types/extended_brand.rb +10 -1
- data/lib/rcs/types/extended_brand_with_vetting.rb +10 -1
- data/lib/rcs/types/extended_rcs_campaign.rb +122 -51
- data/lib/rcs/types/message_schedule.rb +52 -24
- data/lib/rcs/types/message_status_enum.rb +1 -0
- data/lib/rcs/types/optional_brand_info.rb +10 -1
- data/lib/rcs/types/rcs_campaign.rb +122 -43
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords.rb +94 -0
- data/lib/rcs/types/{rcs_campaign_schema_extra_opt_out.rb → rcs_campaign_schema_extra_keywords_help.rb} +18 -17
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_in.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_keywords_opt_out.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_traffic.rb +72 -0
- data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +2 -2
- data/lib/rcs/types/rcs_campaign_schema_keywords.rb +94 -0
- data/lib/rcs/types/{rcs_campaign_schema_opt_out.rb → rcs_campaign_schema_keywords_help.rb} +18 -17
- data/lib/rcs/types/rcs_campaign_schema_keywords_opt_in.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_keywords_opt_out.rb +73 -0
- data/lib/rcs/types/rcs_campaign_schema_traffic.rb +72 -0
- data/lib/rcs/types/rcs_campaign_schema_use_case.rb +2 -2
- data/lib/rcs/types/rcs_cards_content_cards_item.rb +4 -2
- data/lib/rcs/types/rcs_content.rb +4 -4
- data/lib/rcs/types/rcs_messaging_type_enum.rb +17 -0
- data/lib/rcs/types/rcs_validate_content.rb +8 -8
- data/lib/rcs/types/rcs_validation_result.rb +9 -2
- data/lib/rcs/types/{rcs_cards_cards_item.rb → rich_card.rb} +9 -7
- data/lib/rcs/types/{rcs_cards.rb → rich_cards.rb} +9 -9
- data/lib/rcs/types/rich_cards_message.rb +9 -9
- data/lib/rcs/types/rich_media_message.rb +5 -5
- data/lib/rcs/types/{send_rcs_card_options_standalone_card.rb → rich_standalone_card_options.rb} +9 -7
- data/lib/rcs/types/{rcs_text_content.rb → rich_text.rb} +5 -5
- data/lib/rcs/types/rich_text_message.rb +5 -5
- data/lib/rcs/types/schedule_cancel_result.rb +58 -0
- data/lib/rcs/types/scheduled_blast_details.rb +76 -0
- data/lib/rcs/types/scheduled_blast_response_config.rb +89 -0
- data/lib/rcs/types/{scheduled_messaage.rb → scheduled_message.rb} +5 -5
- data/lib/rcs/types/{send_rcs_card_options.rb → send_rich_cards_options.rb} +18 -14
- data/lib/rcs/types/{rcs_base_options.rb → send_rich_message_options.rb} +5 -5
- data/lib/rcs/types/{sent_rcs_details.rb → sent_rich_message.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign.rb +54 -12
- data/lib/rcs/types/toll_free_campaign_schema_keywords.rb +82 -0
- data/lib/rcs/types/toll_free_campaign_schema_keywords_help.rb +62 -0
- data/lib/rcs/types/toll_free_campaign_schema_keywords_opt_in.rb +74 -0
- data/lib/rcs/types/toll_free_campaign_schema_links.rb +70 -0
- data/lib/rcs/types/{upsert_toll_free_campaign_opt_in.rb → toll_free_campaign_schema_opt_in.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign_schema_options.rb +60 -0
- data/lib/rcs/types/{upsert_toll_free_campaign_use_case.rb → toll_free_campaign_schema_use_case.rb} +5 -5
- data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +54 -12
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +70 -34
- metadata +74 -36
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
- data/lib/rcs/types/options.rb +0 -111
- data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +0 -15
- data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +0 -71
- data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +0 -71
- data/lib/rcs/types/upsert_contact.rb +0 -84
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a7dcae7f7b5ad0cbee5a661c6f8e35b33c39bac653f860f469e5427a06282cef
|
|
4
|
+
data.tar.gz: 6ea895970d6229ff913d99c4a3526312a983481dbc6ea4134319814718675736
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3eb05938cd8048c002a1dcfbf043a98add809d60658ceee49c5a57757d7f24135fbdcb780514a1ce1e5f0762b50664a468a079ea2d3b360ca045d783fa17dd9b
|
|
7
|
+
data.tar.gz: 392ea41576c9eddaee42db97b378df70d0fae4b1d4f2516239881361d50f016ba2b5a4af0e4ba2fec4a8236d432fec65c23f609a63303209ef4a373028e2dec3
|
data/lib/rcs/brands/client.rb
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
require_relative "../../requests"
|
|
4
4
|
require_relative "types/autofill_brand_options"
|
|
5
5
|
require_relative "../types/optional_brand_info"
|
|
6
|
-
require_relative "
|
|
7
|
-
require_relative "
|
|
8
|
-
require_relative "
|
|
6
|
+
require_relative "types/upsert_brand_schema_contact"
|
|
7
|
+
require_relative "types/upsert_brand_schema_sector"
|
|
8
|
+
require_relative "types/upsert_brand_schema_type"
|
|
9
|
+
require_relative "types/upsert_brand_schema_entity_type"
|
|
9
10
|
require_relative "../types/extended_brand"
|
|
10
11
|
require_relative "../types/extended_brand_with_vetting"
|
|
11
12
|
require_relative "../types/submission_results"
|
|
12
|
-
require_relative "types/brand_contact"
|
|
13
13
|
require_relative "../types/validation_results"
|
|
14
14
|
require_relative "../types/vetting_results"
|
|
15
15
|
require "async"
|
|
@@ -74,7 +74,7 @@ module Pinnacle
|
|
|
74
74
|
# Create a new brand or update an existing brand by with the provided information.
|
|
75
75
|
#
|
|
76
76
|
# @param address [String] Primary brand address where the company is located.
|
|
77
|
-
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::
|
|
77
|
+
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Brands::Types::UpsertBrandSchemaContact, as a Hash
|
|
78
78
|
# * :email (String)
|
|
79
79
|
# * :name (String)
|
|
80
80
|
# * :phone (String)
|
|
@@ -87,8 +87,9 @@ module Pinnacle
|
|
|
87
87
|
# <br><br> This identifier is a string that always begins with the prefix `b_`,
|
|
88
88
|
# for example: `b_1234567890`.
|
|
89
89
|
# @param name [String] Legal name of the brand as registered.
|
|
90
|
-
# @param sector [Pinnacle::Types::
|
|
91
|
-
# @param type [Pinnacle::Types::
|
|
90
|
+
# @param sector [Pinnacle::Brands::Types::UpsertBrandSchemaSector] Industry the brand operates in.
|
|
91
|
+
# @param type [Pinnacle::Brands::Types::UpsertBrandSchemaType] Legal structure of the brand.
|
|
92
|
+
# @param entity_type [Pinnacle::Brands::Types::UpsertBrandSchemaEntityType] Legal entity type of the brand.
|
|
92
93
|
# @param website [String] Brand website URL.
|
|
93
94
|
# @param request_options [Pinnacle::RequestOptions]
|
|
94
95
|
# @return [Pinnacle::Types::ExtendedBrand]
|
|
@@ -109,10 +110,11 @@ module Pinnacle
|
|
|
109
110
|
# name: "Pinnacle",
|
|
110
111
|
# sector: TECHNOLOGY,
|
|
111
112
|
# type: PRIVATE_PROFIT,
|
|
113
|
+
# entity_type: LLC,
|
|
112
114
|
# website: "https://www.pinnacle.sh"
|
|
113
115
|
# )
|
|
114
116
|
def upsert(address: nil, contact: nil, dba: nil, description: nil, ein: nil, email: nil, id: nil, name: nil,
|
|
115
|
-
sector: nil, type: nil, website: nil, request_options: nil)
|
|
117
|
+
sector: nil, type: nil, entity_type: nil, website: nil, request_options: nil)
|
|
116
118
|
response = @request_client.conn.post do |req|
|
|
117
119
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
118
120
|
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
@@ -136,6 +138,7 @@ module Pinnacle
|
|
|
136
138
|
name: name,
|
|
137
139
|
sector: sector,
|
|
138
140
|
type: type,
|
|
141
|
+
entityType: entity_type,
|
|
139
142
|
website: website
|
|
140
143
|
}.compact
|
|
141
144
|
req.url "#{@request_client.get_url(request_options: request_options)}/brands"
|
|
@@ -217,20 +220,22 @@ module Pinnacle
|
|
|
217
220
|
# Validate your brand information for compliance and correctness before submission
|
|
218
221
|
# or storage.
|
|
219
222
|
#
|
|
220
|
-
# @param
|
|
221
|
-
#
|
|
223
|
+
# @param request [Hash] Request of type Pinnacle::Types::OptionalBrandInfo, as a Hash
|
|
224
|
+
# * :address (String)
|
|
225
|
+
# * :contact (Hash)
|
|
226
|
+
# * :email (String)
|
|
227
|
+
# * :name (String)
|
|
228
|
+
# * :phone (String)
|
|
229
|
+
# * :title (String)
|
|
230
|
+
# * :dba (String)
|
|
231
|
+
# * :description (String)
|
|
232
|
+
# * :ein (String)
|
|
222
233
|
# * :email (String)
|
|
223
234
|
# * :name (String)
|
|
224
|
-
# * :
|
|
225
|
-
# * :
|
|
226
|
-
#
|
|
227
|
-
#
|
|
228
|
-
# @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
|
|
229
|
-
# @param email [String] Main contact email address for the brand.
|
|
230
|
-
# @param name [String] Legal name of the brand as registered.
|
|
231
|
-
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
|
232
|
-
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
|
233
|
-
# @param website [String] Brand website URL.
|
|
235
|
+
# * :sector (Pinnacle::Types::CompanySectorEnum)
|
|
236
|
+
# * :type (Pinnacle::Types::CompanyTypeEnum)
|
|
237
|
+
# * :entity_type (Pinnacle::Types::CompanyEntityTypeEnum)
|
|
238
|
+
# * :website (String)
|
|
234
239
|
# @param request_options [Pinnacle::RequestOptions]
|
|
235
240
|
# @return [Pinnacle::Types::ValidationResults]
|
|
236
241
|
# @example
|
|
@@ -239,20 +244,8 @@ module Pinnacle
|
|
|
239
244
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
240
245
|
# api_key: "YOUR_API_KEY"
|
|
241
246
|
# )
|
|
242
|
-
# api.brands.validate(
|
|
243
|
-
|
|
244
|
-
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
|
245
|
-
# dba: "Pinnacle Messaging",
|
|
246
|
-
# description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
|
|
247
|
-
# ein: "88-1234567",
|
|
248
|
-
# email: "founders@trypinnacle.app",
|
|
249
|
-
# name: "Pinnacle",
|
|
250
|
-
# sector: TECHNOLOGY,
|
|
251
|
-
# type: PRIVATE_PROFIT,
|
|
252
|
-
# website: "https://www.pinnacle.sh"
|
|
253
|
-
# )
|
|
254
|
-
def validate(address:, contact:, description:, email:, name:, sector:, type:, website:, dba: nil, ein: nil,
|
|
255
|
-
request_options: nil)
|
|
247
|
+
# api.brands.validate(request: { })
|
|
248
|
+
def validate(request:, request_options: nil)
|
|
256
249
|
response = @request_client.conn.post do |req|
|
|
257
250
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
258
251
|
req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
|
|
@@ -264,19 +257,7 @@ module Pinnacle
|
|
|
264
257
|
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
265
258
|
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
266
259
|
end
|
|
267
|
-
req.body = {
|
|
268
|
-
**(request_options&.additional_body_parameters || {}),
|
|
269
|
-
address: address,
|
|
270
|
-
contact: contact,
|
|
271
|
-
dba: dba,
|
|
272
|
-
description: description,
|
|
273
|
-
ein: ein,
|
|
274
|
-
email: email,
|
|
275
|
-
name: name,
|
|
276
|
-
sector: sector,
|
|
277
|
-
type: type,
|
|
278
|
-
website: website
|
|
279
|
-
}.compact
|
|
260
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
|
280
261
|
req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
|
|
281
262
|
end
|
|
282
263
|
Pinnacle::Types::ValidationResults.from_json(json_object: response.body)
|
|
@@ -383,7 +364,7 @@ module Pinnacle
|
|
|
383
364
|
# Create a new brand or update an existing brand by with the provided information.
|
|
384
365
|
#
|
|
385
366
|
# @param address [String] Primary brand address where the company is located.
|
|
386
|
-
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::
|
|
367
|
+
# @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Brands::Types::UpsertBrandSchemaContact, as a Hash
|
|
387
368
|
# * :email (String)
|
|
388
369
|
# * :name (String)
|
|
389
370
|
# * :phone (String)
|
|
@@ -396,8 +377,9 @@ module Pinnacle
|
|
|
396
377
|
# <br><br> This identifier is a string that always begins with the prefix `b_`,
|
|
397
378
|
# for example: `b_1234567890`.
|
|
398
379
|
# @param name [String] Legal name of the brand as registered.
|
|
399
|
-
# @param sector [Pinnacle::Types::
|
|
400
|
-
# @param type [Pinnacle::Types::
|
|
380
|
+
# @param sector [Pinnacle::Brands::Types::UpsertBrandSchemaSector] Industry the brand operates in.
|
|
381
|
+
# @param type [Pinnacle::Brands::Types::UpsertBrandSchemaType] Legal structure of the brand.
|
|
382
|
+
# @param entity_type [Pinnacle::Brands::Types::UpsertBrandSchemaEntityType] Legal entity type of the brand.
|
|
401
383
|
# @param website [String] Brand website URL.
|
|
402
384
|
# @param request_options [Pinnacle::RequestOptions]
|
|
403
385
|
# @return [Pinnacle::Types::ExtendedBrand]
|
|
@@ -418,10 +400,11 @@ module Pinnacle
|
|
|
418
400
|
# name: "Pinnacle",
|
|
419
401
|
# sector: TECHNOLOGY,
|
|
420
402
|
# type: PRIVATE_PROFIT,
|
|
403
|
+
# entity_type: LLC,
|
|
421
404
|
# website: "https://www.pinnacle.sh"
|
|
422
405
|
# )
|
|
423
406
|
def upsert(address: nil, contact: nil, dba: nil, description: nil, ein: nil, email: nil, id: nil, name: nil,
|
|
424
|
-
sector: nil, type: nil, website: nil, request_options: nil)
|
|
407
|
+
sector: nil, type: nil, entity_type: nil, website: nil, request_options: nil)
|
|
425
408
|
Async do
|
|
426
409
|
response = @request_client.conn.post do |req|
|
|
427
410
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -446,6 +429,7 @@ module Pinnacle
|
|
|
446
429
|
name: name,
|
|
447
430
|
sector: sector,
|
|
448
431
|
type: type,
|
|
432
|
+
entityType: entity_type,
|
|
449
433
|
website: website
|
|
450
434
|
}.compact
|
|
451
435
|
req.url "#{@request_client.get_url(request_options: request_options)}/brands"
|
|
@@ -532,20 +516,22 @@ module Pinnacle
|
|
|
532
516
|
# Validate your brand information for compliance and correctness before submission
|
|
533
517
|
# or storage.
|
|
534
518
|
#
|
|
535
|
-
# @param
|
|
536
|
-
#
|
|
519
|
+
# @param request [Hash] Request of type Pinnacle::Types::OptionalBrandInfo, as a Hash
|
|
520
|
+
# * :address (String)
|
|
521
|
+
# * :contact (Hash)
|
|
522
|
+
# * :email (String)
|
|
523
|
+
# * :name (String)
|
|
524
|
+
# * :phone (String)
|
|
525
|
+
# * :title (String)
|
|
526
|
+
# * :dba (String)
|
|
527
|
+
# * :description (String)
|
|
528
|
+
# * :ein (String)
|
|
537
529
|
# * :email (String)
|
|
538
530
|
# * :name (String)
|
|
539
|
-
# * :
|
|
540
|
-
# * :
|
|
541
|
-
#
|
|
542
|
-
#
|
|
543
|
-
# @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
|
|
544
|
-
# @param email [String] Main contact email address for the brand.
|
|
545
|
-
# @param name [String] Legal name of the brand as registered.
|
|
546
|
-
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
|
547
|
-
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
|
548
|
-
# @param website [String] Brand website URL.
|
|
531
|
+
# * :sector (Pinnacle::Types::CompanySectorEnum)
|
|
532
|
+
# * :type (Pinnacle::Types::CompanyTypeEnum)
|
|
533
|
+
# * :entity_type (Pinnacle::Types::CompanyEntityTypeEnum)
|
|
534
|
+
# * :website (String)
|
|
549
535
|
# @param request_options [Pinnacle::RequestOptions]
|
|
550
536
|
# @return [Pinnacle::Types::ValidationResults]
|
|
551
537
|
# @example
|
|
@@ -554,20 +540,8 @@ module Pinnacle
|
|
|
554
540
|
# environment: Pinnacle::Environment::DEFAULT,
|
|
555
541
|
# api_key: "YOUR_API_KEY"
|
|
556
542
|
# )
|
|
557
|
-
# api.brands.validate(
|
|
558
|
-
|
|
559
|
-
# contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
|
|
560
|
-
# dba: "Pinnacle Messaging",
|
|
561
|
-
# description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
|
|
562
|
-
# ein: "88-1234567",
|
|
563
|
-
# email: "founders@trypinnacle.app",
|
|
564
|
-
# name: "Pinnacle",
|
|
565
|
-
# sector: TECHNOLOGY,
|
|
566
|
-
# type: PRIVATE_PROFIT,
|
|
567
|
-
# website: "https://www.pinnacle.sh"
|
|
568
|
-
# )
|
|
569
|
-
def validate(address:, contact:, description:, email:, name:, sector:, type:, website:, dba: nil, ein: nil,
|
|
570
|
-
request_options: nil)
|
|
543
|
+
# api.brands.validate(request: { })
|
|
544
|
+
def validate(request:, request_options: nil)
|
|
571
545
|
Async do
|
|
572
546
|
response = @request_client.conn.post do |req|
|
|
573
547
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
|
@@ -580,19 +554,7 @@ module Pinnacle
|
|
|
580
554
|
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
|
581
555
|
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
|
582
556
|
end
|
|
583
|
-
req.body = {
|
|
584
|
-
**(request_options&.additional_body_parameters || {}),
|
|
585
|
-
address: address,
|
|
586
|
-
contact: contact,
|
|
587
|
-
dba: dba,
|
|
588
|
-
description: description,
|
|
589
|
-
ein: ein,
|
|
590
|
-
email: email,
|
|
591
|
-
name: name,
|
|
592
|
-
sector: sector,
|
|
593
|
-
type: type,
|
|
594
|
-
website: website
|
|
595
|
-
}.compact
|
|
557
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
|
596
558
|
req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
|
|
597
559
|
end
|
|
598
560
|
Pinnacle::Types::ValidationResults.from_json(json_object: response.body)
|
|
@@ -6,15 +6,15 @@ require "json"
|
|
|
6
6
|
module Pinnacle
|
|
7
7
|
module Brands
|
|
8
8
|
module Types
|
|
9
|
-
# Contact information for the
|
|
10
|
-
class
|
|
9
|
+
# Contact information for the brand.
|
|
10
|
+
class UpsertBrandSchemaContact
|
|
11
11
|
# @return [String] Email address of the contact person.
|
|
12
12
|
attr_reader :email
|
|
13
13
|
# @return [String] Full name of the contact person.
|
|
14
14
|
attr_reader :name
|
|
15
15
|
# @return [String] Phone number of the contact person in E.164 format.
|
|
16
16
|
attr_reader :phone
|
|
17
|
-
# @return [String] Job title
|
|
17
|
+
# @return [String] Job title of the contact person.
|
|
18
18
|
attr_reader :title
|
|
19
19
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
20
20
|
attr_reader :additional_properties
|
|
@@ -27,22 +27,24 @@ module Pinnacle
|
|
|
27
27
|
# @param email [String] Email address of the contact person.
|
|
28
28
|
# @param name [String] Full name of the contact person.
|
|
29
29
|
# @param phone [String] Phone number of the contact person in E.164 format.
|
|
30
|
-
# @param title [String] Job title
|
|
30
|
+
# @param title [String] Job title of the contact person.
|
|
31
31
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
32
|
-
# @return [Pinnacle::Brands::Types::
|
|
33
|
-
def initialize(email
|
|
34
|
-
@email = email
|
|
35
|
-
@name = name
|
|
36
|
-
@phone = phone
|
|
37
|
-
@title = title
|
|
32
|
+
# @return [Pinnacle::Brands::Types::UpsertBrandSchemaContact]
|
|
33
|
+
def initialize(email: OMIT, name: OMIT, phone: OMIT, title: OMIT, additional_properties: nil)
|
|
34
|
+
@email = email if email != OMIT
|
|
35
|
+
@name = name if name != OMIT
|
|
36
|
+
@phone = phone if phone != OMIT
|
|
37
|
+
@title = title if title != OMIT
|
|
38
38
|
@additional_properties = additional_properties
|
|
39
|
-
@_field_set = { "email": email, "name": name, "phone": phone, "title": title }
|
|
39
|
+
@_field_set = { "email": email, "name": name, "phone": phone, "title": title }.reject do |_k, v|
|
|
40
|
+
v == OMIT
|
|
41
|
+
end
|
|
40
42
|
end
|
|
41
43
|
|
|
42
|
-
# Deserialize a JSON object to an instance of
|
|
44
|
+
# Deserialize a JSON object to an instance of UpsertBrandSchemaContact
|
|
43
45
|
#
|
|
44
46
|
# @param json_object [String]
|
|
45
|
-
# @return [Pinnacle::Brands::Types::
|
|
47
|
+
# @return [Pinnacle::Brands::Types::UpsertBrandSchemaContact]
|
|
46
48
|
def self.from_json(json_object:)
|
|
47
49
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
48
50
|
parsed_json = JSON.parse(json_object)
|
|
@@ -59,7 +61,7 @@ module Pinnacle
|
|
|
59
61
|
)
|
|
60
62
|
end
|
|
61
63
|
|
|
62
|
-
# Serialize an instance of
|
|
64
|
+
# Serialize an instance of UpsertBrandSchemaContact to a JSON object
|
|
63
65
|
#
|
|
64
66
|
# @return [String]
|
|
65
67
|
def to_json(*_args)
|
|
@@ -73,10 +75,10 @@ module Pinnacle
|
|
|
73
75
|
# @param obj [Object]
|
|
74
76
|
# @return [Void]
|
|
75
77
|
def self.validate_raw(obj:)
|
|
76
|
-
obj.email
|
|
77
|
-
obj.name
|
|
78
|
-
obj.phone
|
|
79
|
-
obj.title
|
|
78
|
+
obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
|
|
79
|
+
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
80
|
+
obj.phone&.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.")
|
|
81
|
+
obj.title&.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
|
|
80
82
|
end
|
|
81
83
|
end
|
|
82
84
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Brands
|
|
5
|
+
module Types
|
|
6
|
+
# Legal entity type of the brand.
|
|
7
|
+
class UpsertBrandSchemaEntityType
|
|
8
|
+
LLC = "LLC"
|
|
9
|
+
SOLE_PROPRIETORSHIP = "SOLE_PROPRIETORSHIP"
|
|
10
|
+
PARTNERSHIP = "PARTNERSHIP"
|
|
11
|
+
CORP = "CORP"
|
|
12
|
+
S_CORP = "S_CORP"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Brands
|
|
5
|
+
module Types
|
|
6
|
+
# Industry the brand operates in.
|
|
7
|
+
class UpsertBrandSchemaSector
|
|
8
|
+
AGRICULTURE = "AGRICULTURE"
|
|
9
|
+
COMMUNICATION = "COMMUNICATION"
|
|
10
|
+
CONSTRUCTION = "CONSTRUCTION"
|
|
11
|
+
EDUCATION = "EDUCATION"
|
|
12
|
+
ENERGY = "ENERGY"
|
|
13
|
+
ENTERTAINMENT = "ENTERTAINMENT"
|
|
14
|
+
FINANCIAL = "FINANCIAL"
|
|
15
|
+
GAMBLING = "GAMBLING"
|
|
16
|
+
GOVERNMENT = "GOVERNMENT"
|
|
17
|
+
HEALTHCARE = "HEALTHCARE"
|
|
18
|
+
HOSPITALITY = "HOSPITALITY"
|
|
19
|
+
INSURANCE = "INSURANCE"
|
|
20
|
+
MANUFACTURING = "MANUFACTURING"
|
|
21
|
+
NGO = "NGO"
|
|
22
|
+
REAL_ESTATE = "REAL_ESTATE"
|
|
23
|
+
RETAIL = "RETAIL"
|
|
24
|
+
TECHNOLOGY = "TECHNOLOGY"
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Brands
|
|
5
|
+
module Types
|
|
6
|
+
# Legal structure of the brand.
|
|
7
|
+
class UpsertBrandSchemaType
|
|
8
|
+
GOVERNMENT = "GOVERNMENT"
|
|
9
|
+
NON_PROFIT = "NON_PROFIT"
|
|
10
|
+
PRIVATE_PROFIT = "PRIVATE_PROFIT"
|
|
11
|
+
PUBLIC_PROFIT = "PUBLIC_PROFIT"
|
|
12
|
+
SOLE_PROPRIETOR = "SOLE_PROPRIETOR"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -5,10 +5,10 @@ require_relative "../../types/autofill_campaign_params"
|
|
|
5
5
|
require_relative "../../types/autofill_dlc_campaign_response"
|
|
6
6
|
require_relative "../../types/dlc_campaign_with_extended_brand_and_status"
|
|
7
7
|
require_relative "../../types/campaign_submission_result"
|
|
8
|
-
require_relative "types/
|
|
9
|
-
require_relative "types/
|
|
10
|
-
require_relative "types/
|
|
11
|
-
require_relative "types/
|
|
8
|
+
require_relative "types/dlc_campaign_keywords"
|
|
9
|
+
require_relative "types/dlc_campaign_links"
|
|
10
|
+
require_relative "types/dlc_campaign_options"
|
|
11
|
+
require_relative "types/dlc_campaign_use_case"
|
|
12
12
|
require_relative "../../types/validate_campaign_params"
|
|
13
13
|
require_relative "../../types/campaign_validation_result"
|
|
14
14
|
require "async"
|
|
@@ -134,7 +134,7 @@ module Pinnacle
|
|
|
134
134
|
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
135
135
|
# begins with the prefix `dlc_`, for example: `dlc_1234567890`.
|
|
136
136
|
# @param description [String] Description of the campaign.
|
|
137
|
-
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
137
|
+
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignKeywords, as a Hash
|
|
138
138
|
# * :help (Hash)
|
|
139
139
|
# * :message (String)
|
|
140
140
|
# * :values (Array<String>)
|
|
@@ -144,12 +144,12 @@ module Pinnacle
|
|
|
144
144
|
# * :opt_out (Hash)
|
|
145
145
|
# * :message (String)
|
|
146
146
|
# * :values (Array<String>)
|
|
147
|
-
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
147
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignLinks, as a Hash
|
|
148
148
|
# * :privacy_policy (String)
|
|
149
149
|
# * :terms_of_service (String)
|
|
150
150
|
# @param message_flow [String] Describe the flow of how users will opt in to this campaign.
|
|
151
151
|
# @param name [String] Display name of the campaign.
|
|
152
|
-
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
152
|
+
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptions, as a Hash
|
|
153
153
|
# * :affiliate_marketing (Boolean)
|
|
154
154
|
# * :age_gated (Boolean)
|
|
155
155
|
# * :direct_lending (Boolean)
|
|
@@ -157,7 +157,7 @@ module Pinnacle
|
|
|
157
157
|
# * :embedded_phone (Boolean)
|
|
158
158
|
# * :number_pooling (Boolean)
|
|
159
159
|
# @param sample_messages [Array<String>] Example messages for the campaign.
|
|
160
|
-
# @param use_case [Hash] Use case for the campaign.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
160
|
+
# @param use_case [Hash] Use case for the campaign.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignUseCase, as a Hash
|
|
161
161
|
# * :sub (Array<Pinnacle::Types::SubUseCaseEnum>)
|
|
162
162
|
# * :value (Pinnacle::Types::DlcCampaignUseCaseEnum)
|
|
163
163
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -371,7 +371,7 @@ module Pinnacle
|
|
|
371
371
|
# @param campaign_id [String] Unique identifier for the campaign. This identifier is a string that always
|
|
372
372
|
# begins with the prefix `dlc_`, for example: `dlc_1234567890`.
|
|
373
373
|
# @param description [String] Description of the campaign.
|
|
374
|
-
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
374
|
+
# @param keywords [Hash] Keyword response configuration.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignKeywords, as a Hash
|
|
375
375
|
# * :help (Hash)
|
|
376
376
|
# * :message (String)
|
|
377
377
|
# * :values (Array<String>)
|
|
@@ -381,12 +381,12 @@ module Pinnacle
|
|
|
381
381
|
# * :opt_out (Hash)
|
|
382
382
|
# * :message (String)
|
|
383
383
|
# * :values (Array<String>)
|
|
384
|
-
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
384
|
+
# @param links [Hash] Legal documentation links.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignLinks, as a Hash
|
|
385
385
|
# * :privacy_policy (String)
|
|
386
386
|
# * :terms_of_service (String)
|
|
387
387
|
# @param message_flow [String] Describe the flow of how users will opt in to this campaign.
|
|
388
388
|
# @param name [String] Display name of the campaign.
|
|
389
|
-
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
389
|
+
# @param options [Hash] Campaign configuration options.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptions, as a Hash
|
|
390
390
|
# * :affiliate_marketing (Boolean)
|
|
391
391
|
# * :age_gated (Boolean)
|
|
392
392
|
# * :direct_lending (Boolean)
|
|
@@ -394,7 +394,7 @@ module Pinnacle
|
|
|
394
394
|
# * :embedded_phone (Boolean)
|
|
395
395
|
# * :number_pooling (Boolean)
|
|
396
396
|
# @param sample_messages [Array<String>] Example messages for the campaign.
|
|
397
|
-
# @param use_case [Hash] Use case for the campaign.Request of type Pinnacle::Campaigns::Dlc::Types::
|
|
397
|
+
# @param use_case [Hash] Use case for the campaign.Request of type Pinnacle::Campaigns::Dlc::Types::DlcCampaignUseCase, as a Hash
|
|
398
398
|
# * :sub (Array<Pinnacle::Types::SubUseCaseEnum>)
|
|
399
399
|
# * :value (Pinnacle::Types::DlcCampaignUseCaseEnum)
|
|
400
400
|
# @param request_options [Pinnacle::RequestOptions]
|
|
@@ -8,7 +8,7 @@ module Pinnacle
|
|
|
8
8
|
module Dlc
|
|
9
9
|
module Types
|
|
10
10
|
# Help keyword settings.
|
|
11
|
-
class
|
|
11
|
+
class DlcCampaignHelpKeywords
|
|
12
12
|
# @return [String] Response message for help keywords.
|
|
13
13
|
attr_reader :message
|
|
14
14
|
# @return [Array<String>] Keywords that trigger help response.
|
|
@@ -24,7 +24,7 @@ module Pinnacle
|
|
|
24
24
|
# @param message [String] Response message for help keywords.
|
|
25
25
|
# @param values [Array<String>] Keywords that trigger help response.
|
|
26
26
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
27
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
27
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords]
|
|
28
28
|
def initialize(message: OMIT, values: OMIT, additional_properties: nil)
|
|
29
29
|
@message = message if message != OMIT
|
|
30
30
|
@values = values if values != OMIT
|
|
@@ -34,10 +34,10 @@ module Pinnacle
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
# Deserialize a JSON object to an instance of
|
|
37
|
+
# Deserialize a JSON object to an instance of DlcCampaignHelpKeywords
|
|
38
38
|
#
|
|
39
39
|
# @param json_object [String]
|
|
40
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
40
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords]
|
|
41
41
|
def self.from_json(json_object:)
|
|
42
42
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
43
43
|
parsed_json = JSON.parse(json_object)
|
|
@@ -50,7 +50,7 @@ module Pinnacle
|
|
|
50
50
|
)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
# Serialize an instance of
|
|
53
|
+
# Serialize an instance of DlcCampaignHelpKeywords to a JSON object
|
|
54
54
|
#
|
|
55
55
|
# @return [String]
|
|
56
56
|
def to_json(*_args)
|
data/lib/rcs/campaigns/dlc/types/{upsert_dlc_campaign_keywords.rb → dlc_campaign_keywords.rb}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "
|
|
4
|
-
require_relative "
|
|
5
|
-
require_relative "
|
|
3
|
+
require_relative "dlc_campaign_help_keywords"
|
|
4
|
+
require_relative "dlc_campaign_opt_in_keywords"
|
|
5
|
+
require_relative "dlc_campaign_opt_out_keywords"
|
|
6
6
|
require "ostruct"
|
|
7
7
|
require "json"
|
|
8
8
|
|
|
@@ -11,12 +11,12 @@ module Pinnacle
|
|
|
11
11
|
module Dlc
|
|
12
12
|
module Types
|
|
13
13
|
# Keyword response configuration.
|
|
14
|
-
class
|
|
15
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
14
|
+
class DlcCampaignKeywords
|
|
15
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords] Help keyword settings.
|
|
16
16
|
attr_reader :help
|
|
17
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
17
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptInKeywords] Opt-in keyword settings.
|
|
18
18
|
attr_reader :opt_in
|
|
19
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
19
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptOutKeywords] Opt-out keyword settings.
|
|
20
20
|
attr_reader :opt_out
|
|
21
21
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
22
22
|
attr_reader :additional_properties
|
|
@@ -26,11 +26,11 @@ module Pinnacle
|
|
|
26
26
|
|
|
27
27
|
OMIT = Object.new
|
|
28
28
|
|
|
29
|
-
# @param help [Pinnacle::Campaigns::Dlc::Types::
|
|
30
|
-
# @param opt_in [Pinnacle::Campaigns::Dlc::Types::
|
|
31
|
-
# @param opt_out [Pinnacle::Campaigns::Dlc::Types::
|
|
29
|
+
# @param help [Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords] Help keyword settings.
|
|
30
|
+
# @param opt_in [Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptInKeywords] Opt-in keyword settings.
|
|
31
|
+
# @param opt_out [Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptOutKeywords] Opt-out keyword settings.
|
|
32
32
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
33
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
33
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignKeywords]
|
|
34
34
|
def initialize(help: OMIT, opt_in: OMIT, opt_out: OMIT, additional_properties: nil)
|
|
35
35
|
@help = help if help != OMIT
|
|
36
36
|
@opt_in = opt_in if opt_in != OMIT
|
|
@@ -41,10 +41,10 @@ module Pinnacle
|
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
# Deserialize a JSON object to an instance of
|
|
44
|
+
# Deserialize a JSON object to an instance of DlcCampaignKeywords
|
|
45
45
|
#
|
|
46
46
|
# @param json_object [String]
|
|
47
|
-
# @return [Pinnacle::Campaigns::Dlc::Types::
|
|
47
|
+
# @return [Pinnacle::Campaigns::Dlc::Types::DlcCampaignKeywords]
|
|
48
48
|
def self.from_json(json_object:)
|
|
49
49
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
50
50
|
parsed_json = JSON.parse(json_object)
|
|
@@ -52,19 +52,19 @@ module Pinnacle
|
|
|
52
52
|
help = nil
|
|
53
53
|
else
|
|
54
54
|
help = parsed_json["HELP"].to_json
|
|
55
|
-
help = Pinnacle::Campaigns::Dlc::Types::
|
|
55
|
+
help = Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords.from_json(json_object: help)
|
|
56
56
|
end
|
|
57
57
|
if parsed_json["OPT_IN"].nil?
|
|
58
58
|
opt_in = nil
|
|
59
59
|
else
|
|
60
60
|
opt_in = parsed_json["OPT_IN"].to_json
|
|
61
|
-
opt_in = Pinnacle::Campaigns::Dlc::Types::
|
|
61
|
+
opt_in = Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptInKeywords.from_json(json_object: opt_in)
|
|
62
62
|
end
|
|
63
63
|
if parsed_json["OPT_OUT"].nil?
|
|
64
64
|
opt_out = nil
|
|
65
65
|
else
|
|
66
66
|
opt_out = parsed_json["OPT_OUT"].to_json
|
|
67
|
-
opt_out = Pinnacle::Campaigns::Dlc::Types::
|
|
67
|
+
opt_out = Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptOutKeywords.from_json(json_object: opt_out)
|
|
68
68
|
end
|
|
69
69
|
new(
|
|
70
70
|
help: help,
|
|
@@ -74,7 +74,7 @@ module Pinnacle
|
|
|
74
74
|
)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
# Serialize an instance of
|
|
77
|
+
# Serialize an instance of DlcCampaignKeywords to a JSON object
|
|
78
78
|
#
|
|
79
79
|
# @return [String]
|
|
80
80
|
def to_json(*_args)
|
|
@@ -88,9 +88,9 @@ module Pinnacle
|
|
|
88
88
|
# @param obj [Object]
|
|
89
89
|
# @return [Void]
|
|
90
90
|
def self.validate_raw(obj:)
|
|
91
|
-
obj.help.nil? || Pinnacle::Campaigns::Dlc::Types::
|
|
92
|
-
obj.opt_in.nil? || Pinnacle::Campaigns::Dlc::Types::
|
|
93
|
-
obj.opt_out.nil? || Pinnacle::Campaigns::Dlc::Types::
|
|
91
|
+
obj.help.nil? || Pinnacle::Campaigns::Dlc::Types::DlcCampaignHelpKeywords.validate_raw(obj: obj.help)
|
|
92
|
+
obj.opt_in.nil? || Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptInKeywords.validate_raw(obj: obj.opt_in)
|
|
93
|
+
obj.opt_out.nil? || Pinnacle::Campaigns::Dlc::Types::DlcCampaignOptOutKeywords.validate_raw(obj: obj.opt_out)
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
end
|