rcs 2.0.1 → 2.0.3
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/audiences/client.rb +347 -0
- data/lib/rcs/audiences/contacts/client.rb +173 -0
- data/lib/rcs/audiences/types/audiences_get_response.rb +58 -0
- data/lib/rcs/brands/client.rb +19 -6
- 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/audience_count_only.rb +87 -0
- data/lib/rcs/types/audience_with_pagination.rb +114 -0
- 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/delete_audience_response.rb +57 -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/pagination.rb +81 -0
- 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/{options.rb → send_rich_message_options.rb} +5 -5
- data/lib/rcs/types/sent_mms_details.rb +18 -4
- 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/rcs.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +71 -32
- metadata +77 -34
- data/lib/rcs/campaigns/rcs/types/upsert_rcs_opt_in.rb +0 -75
- data/lib/rcs/types/rcs_base_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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
class AudienceCountOnly
|
|
9
|
+
# @return [String] Audience public ID. This identifier is a string that always begins with the
|
|
10
|
+
# prefix `aud_`, for example: `aud_abc123`.
|
|
11
|
+
attr_reader :id
|
|
12
|
+
# @return [String] Audience name.
|
|
13
|
+
attr_reader :name
|
|
14
|
+
# @return [String] Audience description.
|
|
15
|
+
attr_reader :description
|
|
16
|
+
# @return [Integer] Total number of contacts in audience.
|
|
17
|
+
# Use the [Get Audience](/api-reference/audiences/get) endpoint with the
|
|
18
|
+
# pagination parameters to get the audience with its contacts.
|
|
19
|
+
attr_reader :contact_count
|
|
20
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
|
+
attr_reader :additional_properties
|
|
22
|
+
# @return [Object]
|
|
23
|
+
attr_reader :_field_set
|
|
24
|
+
protected :_field_set
|
|
25
|
+
|
|
26
|
+
OMIT = Object.new
|
|
27
|
+
|
|
28
|
+
# @param id [String] Audience public ID. This identifier is a string that always begins with the
|
|
29
|
+
# prefix `aud_`, for example: `aud_abc123`.
|
|
30
|
+
# @param name [String] Audience name.
|
|
31
|
+
# @param description [String] Audience description.
|
|
32
|
+
# @param contact_count [Integer] Total number of contacts in audience.
|
|
33
|
+
# Use the [Get Audience](/api-reference/audiences/get) endpoint with the
|
|
34
|
+
# pagination parameters to get the audience with its contacts.
|
|
35
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
36
|
+
# @return [Pinnacle::Types::AudienceCountOnly]
|
|
37
|
+
def initialize(id:, name:, description:, contact_count:, additional_properties: nil)
|
|
38
|
+
@id = id
|
|
39
|
+
@name = name
|
|
40
|
+
@description = description
|
|
41
|
+
@contact_count = contact_count
|
|
42
|
+
@additional_properties = additional_properties
|
|
43
|
+
@_field_set = { "id": id, "name": name, "description": description, "contactCount": contact_count }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Deserialize a JSON object to an instance of AudienceCountOnly
|
|
47
|
+
#
|
|
48
|
+
# @param json_object [String]
|
|
49
|
+
# @return [Pinnacle::Types::AudienceCountOnly]
|
|
50
|
+
def self.from_json(json_object:)
|
|
51
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
52
|
+
parsed_json = JSON.parse(json_object)
|
|
53
|
+
id = parsed_json["id"]
|
|
54
|
+
name = parsed_json["name"]
|
|
55
|
+
description = parsed_json["description"]
|
|
56
|
+
contact_count = parsed_json["contactCount"]
|
|
57
|
+
new(
|
|
58
|
+
id: id,
|
|
59
|
+
name: name,
|
|
60
|
+
description: description,
|
|
61
|
+
contact_count: contact_count,
|
|
62
|
+
additional_properties: struct
|
|
63
|
+
)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Serialize an instance of AudienceCountOnly to a JSON object
|
|
67
|
+
#
|
|
68
|
+
# @return [String]
|
|
69
|
+
def to_json(*_args)
|
|
70
|
+
@_field_set&.to_json
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
74
|
+
# hash and check each fields type against the current object's property
|
|
75
|
+
# definitions.
|
|
76
|
+
#
|
|
77
|
+
# @param obj [Object]
|
|
78
|
+
# @return [Void]
|
|
79
|
+
def self.validate_raw(obj:)
|
|
80
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
81
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
82
|
+
obj.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
|
83
|
+
obj.contact_count.is_a?(Integer) != false || raise("Passed value for field obj.contact_count is not the expected type, validation failed.")
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "contact"
|
|
4
|
+
require_relative "pagination"
|
|
5
|
+
require "ostruct"
|
|
6
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
module Pinnacle
|
|
9
|
+
module Types
|
|
10
|
+
class AudienceWithPagination
|
|
11
|
+
# @return [String] Audience public ID. This identifier is a string that always begins with the
|
|
12
|
+
# prefix `aud_`, for example: `aud_abc123`.
|
|
13
|
+
attr_reader :id
|
|
14
|
+
# @return [String] Audience name.
|
|
15
|
+
attr_reader :name
|
|
16
|
+
# @return [String] Audience description.
|
|
17
|
+
attr_reader :description
|
|
18
|
+
# @return [Array<Pinnacle::Types::Contact>] Array of contact objects (paginated).
|
|
19
|
+
attr_reader :contacts
|
|
20
|
+
# @return [Integer] Total number of contacts in audience.
|
|
21
|
+
attr_reader :contact_count
|
|
22
|
+
# @return [Pinnacle::Types::Pagination]
|
|
23
|
+
attr_reader :pagination
|
|
24
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
25
|
+
attr_reader :additional_properties
|
|
26
|
+
# @return [Object]
|
|
27
|
+
attr_reader :_field_set
|
|
28
|
+
protected :_field_set
|
|
29
|
+
|
|
30
|
+
OMIT = Object.new
|
|
31
|
+
|
|
32
|
+
# @param id [String] Audience public ID. This identifier is a string that always begins with the
|
|
33
|
+
# prefix `aud_`, for example: `aud_abc123`.
|
|
34
|
+
# @param name [String] Audience name.
|
|
35
|
+
# @param description [String] Audience description.
|
|
36
|
+
# @param contacts [Array<Pinnacle::Types::Contact>] Array of contact objects (paginated).
|
|
37
|
+
# @param contact_count [Integer] Total number of contacts in audience.
|
|
38
|
+
# @param pagination [Pinnacle::Types::Pagination]
|
|
39
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
40
|
+
# @return [Pinnacle::Types::AudienceWithPagination]
|
|
41
|
+
def initialize(id:, name:, description:, contacts:, contact_count:, pagination:, additional_properties: nil)
|
|
42
|
+
@id = id
|
|
43
|
+
@name = name
|
|
44
|
+
@description = description
|
|
45
|
+
@contacts = contacts
|
|
46
|
+
@contact_count = contact_count
|
|
47
|
+
@pagination = pagination
|
|
48
|
+
@additional_properties = additional_properties
|
|
49
|
+
@_field_set = {
|
|
50
|
+
"id": id,
|
|
51
|
+
"name": name,
|
|
52
|
+
"description": description,
|
|
53
|
+
"contacts": contacts,
|
|
54
|
+
"contactCount": contact_count,
|
|
55
|
+
"pagination": pagination
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Deserialize a JSON object to an instance of AudienceWithPagination
|
|
60
|
+
#
|
|
61
|
+
# @param json_object [String]
|
|
62
|
+
# @return [Pinnacle::Types::AudienceWithPagination]
|
|
63
|
+
def self.from_json(json_object:)
|
|
64
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
65
|
+
parsed_json = JSON.parse(json_object)
|
|
66
|
+
id = parsed_json["id"]
|
|
67
|
+
name = parsed_json["name"]
|
|
68
|
+
description = parsed_json["description"]
|
|
69
|
+
contacts = parsed_json["contacts"]&.map do |item|
|
|
70
|
+
item = item.to_json
|
|
71
|
+
Pinnacle::Types::Contact.from_json(json_object: item)
|
|
72
|
+
end
|
|
73
|
+
contact_count = parsed_json["contactCount"]
|
|
74
|
+
if parsed_json["pagination"].nil?
|
|
75
|
+
pagination = nil
|
|
76
|
+
else
|
|
77
|
+
pagination = parsed_json["pagination"].to_json
|
|
78
|
+
pagination = Pinnacle::Types::Pagination.from_json(json_object: pagination)
|
|
79
|
+
end
|
|
80
|
+
new(
|
|
81
|
+
id: id,
|
|
82
|
+
name: name,
|
|
83
|
+
description: description,
|
|
84
|
+
contacts: contacts,
|
|
85
|
+
contact_count: contact_count,
|
|
86
|
+
pagination: pagination,
|
|
87
|
+
additional_properties: struct
|
|
88
|
+
)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Serialize an instance of AudienceWithPagination to a JSON object
|
|
92
|
+
#
|
|
93
|
+
# @return [String]
|
|
94
|
+
def to_json(*_args)
|
|
95
|
+
@_field_set&.to_json
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
99
|
+
# hash and check each fields type against the current object's property
|
|
100
|
+
# definitions.
|
|
101
|
+
#
|
|
102
|
+
# @param obj [Object]
|
|
103
|
+
# @return [Void]
|
|
104
|
+
def self.validate_raw(obj:)
|
|
105
|
+
obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.")
|
|
106
|
+
obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
107
|
+
obj.description.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
|
108
|
+
obj.contacts.is_a?(Array) != false || raise("Passed value for field obj.contacts is not the expected type, validation failed.")
|
|
109
|
+
obj.contact_count.is_a?(Integer) != false || raise("Passed value for field obj.contact_count is not the expected type, validation failed.")
|
|
110
|
+
Pinnacle::Types::Pagination.validate_raw(obj: obj.pagination)
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require_relative "
|
|
3
|
+
require_relative "send_rich_message_options"
|
|
4
4
|
require "ostruct"
|
|
5
5
|
require "json"
|
|
6
6
|
|
|
7
7
|
module Pinnacle
|
|
8
8
|
module Types
|
|
9
|
-
class
|
|
9
|
+
class BaseRichMessage
|
|
10
10
|
# @return [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
|
11
11
|
attr_reader :from
|
|
12
|
-
# @return [Pinnacle::Types::
|
|
12
|
+
# @return [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
|
|
13
13
|
attr_reader :options
|
|
14
14
|
# @return [String] Recipient's phone number in E.164 format.
|
|
15
15
|
attr_reader :to
|
|
@@ -22,10 +22,10 @@ module Pinnacle
|
|
|
22
22
|
OMIT = Object.new
|
|
23
23
|
|
|
24
24
|
# @param from [String] Your RCS agent ID which must be prefixed with 'agent_'.
|
|
25
|
-
# @param options [Pinnacle::Types::
|
|
25
|
+
# @param options [Pinnacle::Types::SendRichMessageOptions] Configure how your RCS message is sent and tracked.
|
|
26
26
|
# @param to [String] Recipient's phone number in E.164 format.
|
|
27
27
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
28
|
-
# @return [Pinnacle::Types::
|
|
28
|
+
# @return [Pinnacle::Types::BaseRichMessage]
|
|
29
29
|
def initialize(from:, to:, options: OMIT, additional_properties: nil)
|
|
30
30
|
@from = from
|
|
31
31
|
@options = options if options != OMIT
|
|
@@ -36,10 +36,10 @@ module Pinnacle
|
|
|
36
36
|
end
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
-
# Deserialize a JSON object to an instance of
|
|
39
|
+
# Deserialize a JSON object to an instance of BaseRichMessage
|
|
40
40
|
#
|
|
41
41
|
# @param json_object [String]
|
|
42
|
-
# @return [Pinnacle::Types::
|
|
42
|
+
# @return [Pinnacle::Types::BaseRichMessage]
|
|
43
43
|
def self.from_json(json_object:)
|
|
44
44
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
45
45
|
parsed_json = JSON.parse(json_object)
|
|
@@ -48,7 +48,7 @@ module Pinnacle
|
|
|
48
48
|
options = nil
|
|
49
49
|
else
|
|
50
50
|
options = parsed_json["options"].to_json
|
|
51
|
-
options = Pinnacle::Types::
|
|
51
|
+
options = Pinnacle::Types::SendRichMessageOptions.from_json(json_object: options)
|
|
52
52
|
end
|
|
53
53
|
to = parsed_json["to"]
|
|
54
54
|
new(
|
|
@@ -59,7 +59,7 @@ module Pinnacle
|
|
|
59
59
|
)
|
|
60
60
|
end
|
|
61
61
|
|
|
62
|
-
# Serialize an instance of
|
|
62
|
+
# Serialize an instance of BaseRichMessage to a JSON object
|
|
63
63
|
#
|
|
64
64
|
# @return [String]
|
|
65
65
|
def to_json(*_args)
|
|
@@ -74,7 +74,7 @@ module Pinnacle
|
|
|
74
74
|
# @return [Void]
|
|
75
75
|
def self.validate_raw(obj:)
|
|
76
76
|
obj.from.is_a?(String) != false || raise("Passed value for field obj.from is not the expected type, validation failed.")
|
|
77
|
-
obj.options.nil? || Pinnacle::Types::
|
|
77
|
+
obj.options.nil? || Pinnacle::Types::SendRichMessageOptions.validate_raw(obj: obj.options)
|
|
78
78
|
obj.to.is_a?(String) != false || raise("Passed value for field obj.to is not the expected type, validation failed.")
|
|
79
79
|
end
|
|
80
80
|
end
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
# Response containing details about the scheduled blast.
|
|
9
|
+
class BlastDetails
|
|
10
|
+
# @return [String] Unique identifier for the blast. This identifier is a string that always begins
|
|
11
|
+
# with the prefix `blast_`, for example: `blast_1234567890`.
|
|
12
|
+
attr_reader :blast_id
|
|
13
|
+
# @return [String] The audience ID the blast was sent to. This identifier is a string that always
|
|
14
|
+
# begins with the prefix `aud_`, for example: `aud_abc123`.
|
|
15
|
+
attr_reader :audience_id
|
|
16
|
+
# @return [Integer] Total number of recipients in the audience.
|
|
17
|
+
attr_reader :total_recipients
|
|
18
|
+
# @return [Integer] Total number of messages to be sent.
|
|
19
|
+
attr_reader :total_messages
|
|
20
|
+
# @return [Integer] Total number of message segments across all messages.
|
|
21
|
+
attr_reader :total_segments
|
|
22
|
+
# @return [Float] Total estimated cost of the blast. Calculated by multiplying the number of
|
|
23
|
+
# segments by the number of messages by the unit cost.
|
|
24
|
+
attr_reader :total_cost
|
|
25
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
26
|
+
attr_reader :additional_properties
|
|
27
|
+
# @return [Object]
|
|
28
|
+
attr_reader :_field_set
|
|
29
|
+
protected :_field_set
|
|
30
|
+
|
|
31
|
+
OMIT = Object.new
|
|
32
|
+
|
|
33
|
+
# @param blast_id [String] Unique identifier for the blast. This identifier is a string that always begins
|
|
34
|
+
# with the prefix `blast_`, for example: `blast_1234567890`.
|
|
35
|
+
# @param audience_id [String] The audience ID the blast was sent to. This identifier is a string that always
|
|
36
|
+
# begins with the prefix `aud_`, for example: `aud_abc123`.
|
|
37
|
+
# @param total_recipients [Integer] Total number of recipients in the audience.
|
|
38
|
+
# @param total_messages [Integer] Total number of messages to be sent.
|
|
39
|
+
# @param total_segments [Integer] Total number of message segments across all messages.
|
|
40
|
+
# @param total_cost [Float] Total estimated cost of the blast. Calculated by multiplying the number of
|
|
41
|
+
# segments by the number of messages by the unit cost.
|
|
42
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
43
|
+
# @return [Pinnacle::Types::BlastDetails]
|
|
44
|
+
def initialize(blast_id:, audience_id:, total_recipients:, total_messages:, total_segments:, total_cost:,
|
|
45
|
+
additional_properties: nil)
|
|
46
|
+
@blast_id = blast_id
|
|
47
|
+
@audience_id = audience_id
|
|
48
|
+
@total_recipients = total_recipients
|
|
49
|
+
@total_messages = total_messages
|
|
50
|
+
@total_segments = total_segments
|
|
51
|
+
@total_cost = total_cost
|
|
52
|
+
@additional_properties = additional_properties
|
|
53
|
+
@_field_set = {
|
|
54
|
+
"blastId": blast_id,
|
|
55
|
+
"audienceId": audience_id,
|
|
56
|
+
"totalRecipients": total_recipients,
|
|
57
|
+
"totalMessages": total_messages,
|
|
58
|
+
"totalSegments": total_segments,
|
|
59
|
+
"totalCost": total_cost
|
|
60
|
+
}
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Deserialize a JSON object to an instance of BlastDetails
|
|
64
|
+
#
|
|
65
|
+
# @param json_object [String]
|
|
66
|
+
# @return [Pinnacle::Types::BlastDetails]
|
|
67
|
+
def self.from_json(json_object:)
|
|
68
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
69
|
+
parsed_json = JSON.parse(json_object)
|
|
70
|
+
blast_id = parsed_json["blastId"]
|
|
71
|
+
audience_id = parsed_json["audienceId"]
|
|
72
|
+
total_recipients = parsed_json["totalRecipients"]
|
|
73
|
+
total_messages = parsed_json["totalMessages"]
|
|
74
|
+
total_segments = parsed_json["totalSegments"]
|
|
75
|
+
total_cost = parsed_json["totalCost"]
|
|
76
|
+
new(
|
|
77
|
+
blast_id: blast_id,
|
|
78
|
+
audience_id: audience_id,
|
|
79
|
+
total_recipients: total_recipients,
|
|
80
|
+
total_messages: total_messages,
|
|
81
|
+
total_segments: total_segments,
|
|
82
|
+
total_cost: total_cost,
|
|
83
|
+
additional_properties: struct
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Serialize an instance of BlastDetails to a JSON object
|
|
88
|
+
#
|
|
89
|
+
# @return [String]
|
|
90
|
+
def to_json(*_args)
|
|
91
|
+
@_field_set&.to_json
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
95
|
+
# hash and check each fields type against the current object's property
|
|
96
|
+
# definitions.
|
|
97
|
+
#
|
|
98
|
+
# @param obj [Object]
|
|
99
|
+
# @return [Void]
|
|
100
|
+
def self.validate_raw(obj:)
|
|
101
|
+
obj.blast_id.is_a?(String) != false || raise("Passed value for field obj.blast_id is not the expected type, validation failed.")
|
|
102
|
+
obj.audience_id.is_a?(String) != false || raise("Passed value for field obj.audience_id is not the expected type, validation failed.")
|
|
103
|
+
obj.total_recipients.is_a?(Integer) != false || raise("Passed value for field obj.total_recipients is not the expected type, validation failed.")
|
|
104
|
+
obj.total_messages.is_a?(Integer) != false || raise("Passed value for field obj.total_messages is not the expected type, validation failed.")
|
|
105
|
+
obj.total_segments.is_a?(Integer) != false || raise("Passed value for field obj.total_segments is not the expected type, validation failed.")
|
|
106
|
+
obj.total_cost.is_a?(Float) != false || raise("Passed value for field obj.total_cost is not the expected type, validation failed.")
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# Legal entity type of the brand.
|
|
6
|
+
class CompanyEntityTypeEnum
|
|
7
|
+
LLC = "LLC"
|
|
8
|
+
SOLE_PROPRIETORSHIP = "SOLE_PROPRIETORSHIP"
|
|
9
|
+
PARTNERSHIP = "PARTNERSHIP"
|
|
10
|
+
CORP = "CORP"
|
|
11
|
+
S_CORP = "S_CORP"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "ostruct"
|
|
4
|
+
require "json"
|
|
5
|
+
|
|
6
|
+
module Pinnacle
|
|
7
|
+
module Types
|
|
8
|
+
class DeleteAudienceResponse
|
|
9
|
+
# @return [Boolean] Indicates successful deletion.
|
|
10
|
+
attr_reader :success
|
|
11
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
12
|
+
attr_reader :additional_properties
|
|
13
|
+
# @return [Object]
|
|
14
|
+
attr_reader :_field_set
|
|
15
|
+
protected :_field_set
|
|
16
|
+
|
|
17
|
+
OMIT = Object.new
|
|
18
|
+
|
|
19
|
+
# @param success [Boolean] Indicates successful deletion.
|
|
20
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
21
|
+
# @return [Pinnacle::Types::DeleteAudienceResponse]
|
|
22
|
+
def initialize(success:, additional_properties: nil)
|
|
23
|
+
@success = success
|
|
24
|
+
@additional_properties = additional_properties
|
|
25
|
+
@_field_set = { "success": success }
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Deserialize a JSON object to an instance of DeleteAudienceResponse
|
|
29
|
+
#
|
|
30
|
+
# @param json_object [String]
|
|
31
|
+
# @return [Pinnacle::Types::DeleteAudienceResponse]
|
|
32
|
+
def self.from_json(json_object:)
|
|
33
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
|
34
|
+
parsed_json = JSON.parse(json_object)
|
|
35
|
+
success = parsed_json["success"]
|
|
36
|
+
new(success: success, additional_properties: struct)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Serialize an instance of DeleteAudienceResponse to a JSON object
|
|
40
|
+
#
|
|
41
|
+
# @return [String]
|
|
42
|
+
def to_json(*_args)
|
|
43
|
+
@_field_set&.to_json
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
|
47
|
+
# hash and check each fields type against the current object's property
|
|
48
|
+
# definitions.
|
|
49
|
+
#
|
|
50
|
+
# @param obj [Object]
|
|
51
|
+
# @return [Void]
|
|
52
|
+
def self.validate_raw(obj:)
|
|
53
|
+
obj.success.is_a?(Boolean) != false || raise("Passed value for field obj.success is not the expected type, validation failed.")
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -6,6 +6,8 @@ require_relative "dlc_with_extended_brand_and_status_links"
|
|
|
6
6
|
require_relative "dlc_with_extended_brand_and_status_options"
|
|
7
7
|
require_relative "profile_status_enum"
|
|
8
8
|
require_relative "dlc_with_extended_brand_and_status_use_case"
|
|
9
|
+
require_relative "dlc_with_extended_brand_and_status_mno_brand_tier"
|
|
10
|
+
require_relative "dlc_with_extended_brand_and_status_mno_tcr_tier"
|
|
9
11
|
require "ostruct"
|
|
10
12
|
require "json"
|
|
11
13
|
|
|
@@ -42,6 +44,15 @@ module Pinnacle
|
|
|
42
44
|
attr_reader :status
|
|
43
45
|
# @return [Pinnacle::Types::DlcWithExtendedBrandAndStatusUseCase] Use case for the campaign.
|
|
44
46
|
attr_reader :use_case
|
|
47
|
+
# @return [Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoBrandTier] The MNO brand tier for T-Mobile rate limits. Tiers range from `TOP` (highest) to
|
|
48
|
+
# `LOW` (lowest), based on your brand's vetting score.
|
|
49
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
50
|
+
attr_reader :mno_brand_tier
|
|
51
|
+
# @return [Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoTcrTier] The MNO TCR message class for AT&T, Verizon, and other carriers. Classes `A`-`G`
|
|
52
|
+
# are standard (based on vetting score), while `T`, `N`, and `S` are for special
|
|
53
|
+
# use cases.
|
|
54
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
55
|
+
attr_reader :mno_tcr_tier
|
|
45
56
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
46
57
|
attr_reader :additional_properties
|
|
47
58
|
# @return [Object]
|
|
@@ -67,10 +78,17 @@ module Pinnacle
|
|
|
67
78
|
# `VERIFIED`: Approved and ready to send messages. <br>
|
|
68
79
|
# `FAILED`: Issues and errors related to the campaign's details.
|
|
69
80
|
# @param use_case [Pinnacle::Types::DlcWithExtendedBrandAndStatusUseCase] Use case for the campaign.
|
|
81
|
+
# @param mno_brand_tier [Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoBrandTier] The MNO brand tier for T-Mobile rate limits. Tiers range from `TOP` (highest) to
|
|
82
|
+
# `LOW` (lowest), based on your brand's vetting score.
|
|
83
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
84
|
+
# @param mno_tcr_tier [Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoTcrTier] The MNO TCR message class for AT&T, Verizon, and other carriers. Classes `A`-`G`
|
|
85
|
+
# are standard (based on vetting score), while `T`, `N`, and `S` are for special
|
|
86
|
+
# use cases.
|
|
87
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
70
88
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
71
89
|
# @return [Pinnacle::Types::DlcCampaignWithExtendedBrandAndStatus]
|
|
72
90
|
def initialize(auto_renew:, brand:, keywords:, options:, status:, campaign_id: OMIT, description: OMIT, links: OMIT,
|
|
73
|
-
message_flow: OMIT, name: OMIT, sample_messages: OMIT, use_case: OMIT, additional_properties: nil)
|
|
91
|
+
message_flow: OMIT, name: OMIT, sample_messages: OMIT, use_case: OMIT, mno_brand_tier: OMIT, mno_tcr_tier: OMIT, additional_properties: nil)
|
|
74
92
|
@auto_renew = auto_renew
|
|
75
93
|
@brand = brand
|
|
76
94
|
@campaign_id = campaign_id if campaign_id != OMIT
|
|
@@ -83,6 +101,8 @@ module Pinnacle
|
|
|
83
101
|
@sample_messages = sample_messages if sample_messages != OMIT
|
|
84
102
|
@status = status
|
|
85
103
|
@use_case = use_case if use_case != OMIT
|
|
104
|
+
@mno_brand_tier = mno_brand_tier if mno_brand_tier != OMIT
|
|
105
|
+
@mno_tcr_tier = mno_tcr_tier if mno_tcr_tier != OMIT
|
|
86
106
|
@additional_properties = additional_properties
|
|
87
107
|
@_field_set = {
|
|
88
108
|
"autoRenew": auto_renew,
|
|
@@ -96,7 +116,9 @@ module Pinnacle
|
|
|
96
116
|
"options": options,
|
|
97
117
|
"sampleMessages": sample_messages,
|
|
98
118
|
"status": status,
|
|
99
|
-
"useCase": use_case
|
|
119
|
+
"useCase": use_case,
|
|
120
|
+
"mnoBrandTier": mno_brand_tier,
|
|
121
|
+
"mnoTcrTier": mno_tcr_tier
|
|
100
122
|
}.reject do |_k, v|
|
|
101
123
|
v == OMIT
|
|
102
124
|
end
|
|
@@ -147,6 +169,8 @@ module Pinnacle
|
|
|
147
169
|
use_case = parsed_json["useCase"].to_json
|
|
148
170
|
use_case = Pinnacle::Types::DlcWithExtendedBrandAndStatusUseCase.from_json(json_object: use_case)
|
|
149
171
|
end
|
|
172
|
+
mno_brand_tier = parsed_json["mnoBrandTier"]
|
|
173
|
+
mno_tcr_tier = parsed_json["mnoTcrTier"]
|
|
150
174
|
new(
|
|
151
175
|
auto_renew: auto_renew,
|
|
152
176
|
brand: brand,
|
|
@@ -160,6 +184,8 @@ module Pinnacle
|
|
|
160
184
|
sample_messages: sample_messages,
|
|
161
185
|
status: status,
|
|
162
186
|
use_case: use_case,
|
|
187
|
+
mno_brand_tier: mno_brand_tier,
|
|
188
|
+
mno_tcr_tier: mno_tcr_tier,
|
|
163
189
|
additional_properties: struct
|
|
164
190
|
)
|
|
165
191
|
end
|
|
@@ -190,6 +216,8 @@ module Pinnacle
|
|
|
190
216
|
obj.sample_messages&.is_a?(Array) != false || raise("Passed value for field obj.sample_messages is not the expected type, validation failed.")
|
|
191
217
|
obj.status.is_a?(Pinnacle::Types::ProfileStatusEnum) != false || raise("Passed value for field obj.status is not the expected type, validation failed.")
|
|
192
218
|
obj.use_case.nil? || Pinnacle::Types::DlcWithExtendedBrandAndStatusUseCase.validate_raw(obj: obj.use_case)
|
|
219
|
+
obj.mno_brand_tier&.is_a?(Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoBrandTier) != false || raise("Passed value for field obj.mno_brand_tier is not the expected type, validation failed.")
|
|
220
|
+
obj.mno_tcr_tier&.is_a?(Pinnacle::Types::DlcWithExtendedBrandAndStatusMnoTcrTier) != false || raise("Passed value for field obj.mno_tcr_tier is not the expected type, validation failed.")
|
|
193
221
|
end
|
|
194
222
|
end
|
|
195
223
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# The MNO brand tier for T-Mobile rate limits. Tiers range from `TOP` (highest) to
|
|
6
|
+
# `LOW` (lowest), based on your brand's vetting score.
|
|
7
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
8
|
+
class DlcWithExtendedBrandAndStatusMnoBrandTier
|
|
9
|
+
TOP = "TOP"
|
|
10
|
+
HIGH_MID = "HIGH_MID"
|
|
11
|
+
LOW_MID = "LOW_MID"
|
|
12
|
+
LOW = "LOW"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Pinnacle
|
|
4
|
+
module Types
|
|
5
|
+
# The MNO TCR message class for AT&T, Verizon, and other carriers. Classes `A`-`G`
|
|
6
|
+
# are standard (based on vetting score), while `T`, `N`, and `S` are for special
|
|
7
|
+
# use cases.
|
|
8
|
+
# See [SMS Rate Limits](/guides/messages/rate-limits) for details.
|
|
9
|
+
class DlcWithExtendedBrandAndStatusMnoTcrTier
|
|
10
|
+
A = "A"
|
|
11
|
+
B = "B"
|
|
12
|
+
C = "C"
|
|
13
|
+
D = "D"
|
|
14
|
+
E = "E"
|
|
15
|
+
F = "F"
|
|
16
|
+
G = "G"
|
|
17
|
+
N = "N"
|
|
18
|
+
T = "T"
|
|
19
|
+
S = "S"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -4,6 +4,7 @@ require_relative "brand_status_enum"
|
|
|
4
4
|
require_relative "optional_contacts"
|
|
5
5
|
require_relative "company_sector_enum"
|
|
6
6
|
require_relative "company_type_enum"
|
|
7
|
+
require_relative "company_entity_type_enum"
|
|
7
8
|
require "ostruct"
|
|
8
9
|
require "json"
|
|
9
10
|
|
|
@@ -48,6 +49,8 @@ module Pinnacle
|
|
|
48
49
|
attr_reader :sector
|
|
49
50
|
# @return [Pinnacle::Types::CompanyTypeEnum]
|
|
50
51
|
attr_reader :type
|
|
52
|
+
# @return [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
|
|
53
|
+
attr_reader :entity_type
|
|
51
54
|
# @return [String] Brand website URL.
|
|
52
55
|
attr_reader :website
|
|
53
56
|
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
|
@@ -82,11 +85,12 @@ module Pinnacle
|
|
|
82
85
|
# @param name [String] Legal name of the brand as registered.
|
|
83
86
|
# @param sector [Pinnacle::Types::CompanySectorEnum]
|
|
84
87
|
# @param type [Pinnacle::Types::CompanyTypeEnum]
|
|
88
|
+
# @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
|
|
85
89
|
# @param website [String] Brand website URL.
|
|
86
90
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
|
87
91
|
# @return [Pinnacle::Types::ExtendedBrand]
|
|
88
92
|
def initialize(created_at:, id:, is_archived:, status:, updated_at:, address: OMIT, contact: OMIT, dba: OMIT,
|
|
89
|
-
description: OMIT, ein: OMIT, email: OMIT, name: OMIT, sector: OMIT, type: OMIT, website: OMIT, additional_properties: nil)
|
|
93
|
+
description: OMIT, ein: OMIT, email: OMIT, name: OMIT, sector: OMIT, type: OMIT, entity_type: OMIT, website: OMIT, additional_properties: nil)
|
|
90
94
|
@created_at = created_at
|
|
91
95
|
@id = id
|
|
92
96
|
@is_archived = is_archived
|
|
@@ -101,6 +105,7 @@ module Pinnacle
|
|
|
101
105
|
@name = name if name != OMIT
|
|
102
106
|
@sector = sector if sector != OMIT
|
|
103
107
|
@type = type if type != OMIT
|
|
108
|
+
@entity_type = entity_type if entity_type != OMIT
|
|
104
109
|
@website = website if website != OMIT
|
|
105
110
|
@additional_properties = additional_properties
|
|
106
111
|
@_field_set = {
|
|
@@ -118,6 +123,7 @@ module Pinnacle
|
|
|
118
123
|
"name": name,
|
|
119
124
|
"sector": sector,
|
|
120
125
|
"type": type,
|
|
126
|
+
"entityType": entity_type,
|
|
121
127
|
"website": website
|
|
122
128
|
}.reject do |_k, v|
|
|
123
129
|
v == OMIT
|
|
@@ -150,6 +156,7 @@ module Pinnacle
|
|
|
150
156
|
name = parsed_json["name"]
|
|
151
157
|
sector = parsed_json["sector"]
|
|
152
158
|
type = parsed_json["type"]
|
|
159
|
+
entity_type = parsed_json["entityType"]
|
|
153
160
|
website = parsed_json["website"]
|
|
154
161
|
new(
|
|
155
162
|
created_at: created_at,
|
|
@@ -166,6 +173,7 @@ module Pinnacle
|
|
|
166
173
|
name: name,
|
|
167
174
|
sector: sector,
|
|
168
175
|
type: type,
|
|
176
|
+
entity_type: entity_type,
|
|
169
177
|
website: website,
|
|
170
178
|
additional_properties: struct
|
|
171
179
|
)
|
|
@@ -199,6 +207,7 @@ module Pinnacle
|
|
|
199
207
|
obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
|
|
200
208
|
obj.sector&.is_a?(Pinnacle::Types::CompanySectorEnum) != false || raise("Passed value for field obj.sector is not the expected type, validation failed.")
|
|
201
209
|
obj.type&.is_a?(Pinnacle::Types::CompanyTypeEnum) != false || raise("Passed value for field obj.type is not the expected type, validation failed.")
|
|
210
|
+
obj.entity_type&.is_a?(Pinnacle::Types::CompanyEntityTypeEnum) != false || raise("Passed value for field obj.entity_type is not the expected type, validation failed.")
|
|
202
211
|
obj.website&.is_a?(String) != false || raise("Passed value for field obj.website is not the expected type, validation failed.")
|
|
203
212
|
end
|
|
204
213
|
end
|