rcs 2.0.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d33fa0a50da18cb437a65a93a1a37d88d062b0fc765eb69e06f1980e2d24b51
4
- data.tar.gz: 6b68bc5631e0cda0a9a43666d8abac3d52f6afced3dd9adf632d96eba6397c65
3
+ metadata.gz: a7dcae7f7b5ad0cbee5a661c6f8e35b33c39bac653f860f469e5427a06282cef
4
+ data.tar.gz: 6ea895970d6229ff913d99c4a3526312a983481dbc6ea4134319814718675736
5
5
  SHA512:
6
- metadata.gz: 8a56b32692c36e49aaa4487e471ddff250e618ddd85a70090aef52789d902697528f5f57d73d44cc4832d38c745546eee47398a0854cf1d81f41c6b53b5aa3e8
7
- data.tar.gz: f4ae09b1d760883ac4c908a537d7da488e4e32f29547b458aa8a14f9752469048dea84fc3d5a50244f7de2e77cded1ee8d0e02c8f5cb5998db9be70765021167
6
+ metadata.gz: 3eb05938cd8048c002a1dcfbf043a98add809d60658ceee49c5a57757d7f24135fbdcb780514a1ce1e5f0762b50664a468a079ea2d3b360ca045d783fa17dd9b
7
+ data.tar.gz: 392ea41576c9eddaee42db97b378df70d0fae4b1d4f2516239881361d50f016ba2b5a4af0e4ba2fec4a8236d432fec65c23f609a63303209ef4a373028e2dec3
@@ -3,14 +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 "../types/upsert_contact"
7
- require_relative "../types/company_sector_enum"
8
- require_relative "../types/company_type_enum"
9
- require_relative "../types/company_entity_type_enum"
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"
10
10
  require_relative "../types/extended_brand"
11
11
  require_relative "../types/extended_brand_with_vetting"
12
12
  require_relative "../types/submission_results"
13
- require_relative "types/brand_contact"
14
13
  require_relative "../types/validation_results"
15
14
  require_relative "../types/vetting_results"
16
15
  require "async"
@@ -75,7 +74,7 @@ module Pinnacle
75
74
  # Create a new brand or update an existing brand by with the provided information.
76
75
  #
77
76
  # @param address [String] Primary brand address where the company is located.
78
- # @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::UpsertContact, as a Hash
77
+ # @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Brands::Types::UpsertBrandSchemaContact, as a Hash
79
78
  # * :email (String)
80
79
  # * :name (String)
81
80
  # * :phone (String)
@@ -88,9 +87,9 @@ module Pinnacle
88
87
  # <br><br> This identifier is a string that always begins with the prefix `b_`,
89
88
  # for example: `b_1234567890`.
90
89
  # @param name [String] Legal name of the brand as registered.
91
- # @param sector [Pinnacle::Types::CompanySectorEnum] Industry the brand operates in.
92
- # @param type [Pinnacle::Types::CompanyTypeEnum] Legal structure of the brand.
93
- # @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
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.
94
93
  # @param website [String] Brand website URL.
95
94
  # @param request_options [Pinnacle::RequestOptions]
96
95
  # @return [Pinnacle::Types::ExtendedBrand]
@@ -221,21 +220,22 @@ module Pinnacle
221
220
  # Validate your brand information for compliance and correctness before submission
222
221
  # or storage.
223
222
  #
224
- # @param address [String] Primary brand address where the brand is located.
225
- # @param contact [Hash] Contact information for the primary brand representative.Request of type Pinnacle::Brands::Types::BrandContact, as a Hash
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)
226
233
  # * :email (String)
227
234
  # * :name (String)
228
- # * :phone (String)
229
- # * :title (String)
230
- # @param dba [String] "Doing Business As" name - the public name the brand operates under.
231
- # @param description [String] Brief description of what the brand does.
232
- # @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
233
- # @param email [String] Main contact email address for the brand.
234
- # @param name [String] Legal name of the brand as registered.
235
- # @param sector [Pinnacle::Types::CompanySectorEnum]
236
- # @param type [Pinnacle::Types::CompanyTypeEnum]
237
- # @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
238
- # @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)
239
239
  # @param request_options [Pinnacle::RequestOptions]
240
240
  # @return [Pinnacle::Types::ValidationResults]
241
241
  # @example
@@ -244,21 +244,8 @@ module Pinnacle
244
244
  # environment: Pinnacle::Environment::DEFAULT,
245
245
  # api_key: "YOUR_API_KEY"
246
246
  # )
247
- # api.brands.validate(
248
- # address: "500 Folsom St, San Francisco, CA 94105",
249
- # contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
250
- # dba: "Pinnacle Messaging",
251
- # description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
252
- # ein: "88-1234567",
253
- # email: "founders@trypinnacle.app",
254
- # name: "Pinnacle",
255
- # sector: TECHNOLOGY,
256
- # type: PRIVATE_PROFIT,
257
- # entity_type: LLC,
258
- # website: "https://www.pinnacle.sh"
259
- # )
260
- def validate(address:, contact:, description:, email:, name:, sector:, type:, entity_type:, website:, dba: nil,
261
- ein: nil, request_options: nil)
247
+ # api.brands.validate(request: { })
248
+ def validate(request:, request_options: nil)
262
249
  response = @request_client.conn.post do |req|
263
250
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
264
251
  req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
@@ -270,20 +257,7 @@ module Pinnacle
270
257
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
271
258
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
272
259
  end
273
- req.body = {
274
- **(request_options&.additional_body_parameters || {}),
275
- address: address,
276
- contact: contact,
277
- dba: dba,
278
- description: description,
279
- ein: ein,
280
- email: email,
281
- name: name,
282
- sector: sector,
283
- type: type,
284
- entityType: entity_type,
285
- website: website
286
- }.compact
260
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
287
261
  req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
288
262
  end
289
263
  Pinnacle::Types::ValidationResults.from_json(json_object: response.body)
@@ -390,7 +364,7 @@ module Pinnacle
390
364
  # Create a new brand or update an existing brand by with the provided information.
391
365
  #
392
366
  # @param address [String] Primary brand address where the company is located.
393
- # @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Types::UpsertContact, as a Hash
367
+ # @param contact [Hash] Contact information for the brand.Request of type Pinnacle::Brands::Types::UpsertBrandSchemaContact, as a Hash
394
368
  # * :email (String)
395
369
  # * :name (String)
396
370
  # * :phone (String)
@@ -403,9 +377,9 @@ module Pinnacle
403
377
  # <br><br> This identifier is a string that always begins with the prefix `b_`,
404
378
  # for example: `b_1234567890`.
405
379
  # @param name [String] Legal name of the brand as registered.
406
- # @param sector [Pinnacle::Types::CompanySectorEnum] Industry the brand operates in.
407
- # @param type [Pinnacle::Types::CompanyTypeEnum] Legal structure of the brand.
408
- # @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
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.
409
383
  # @param website [String] Brand website URL.
410
384
  # @param request_options [Pinnacle::RequestOptions]
411
385
  # @return [Pinnacle::Types::ExtendedBrand]
@@ -542,21 +516,22 @@ module Pinnacle
542
516
  # Validate your brand information for compliance and correctness before submission
543
517
  # or storage.
544
518
  #
545
- # @param address [String] Primary brand address where the brand is located.
546
- # @param contact [Hash] Contact information for the primary brand representative.Request of type Pinnacle::Brands::Types::BrandContact, as a Hash
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)
547
529
  # * :email (String)
548
530
  # * :name (String)
549
- # * :phone (String)
550
- # * :title (String)
551
- # @param dba [String] "Doing Business As" name - the public name the brand operates under.
552
- # @param description [String] Brief description of what the brand does.
553
- # @param ein [String] Employer Identification Number (EIN) assigned by the IRS.
554
- # @param email [String] Main contact email address for the brand.
555
- # @param name [String] Legal name of the brand as registered.
556
- # @param sector [Pinnacle::Types::CompanySectorEnum]
557
- # @param type [Pinnacle::Types::CompanyTypeEnum]
558
- # @param entity_type [Pinnacle::Types::CompanyEntityTypeEnum] Legal entity type of the brand.
559
- # @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)
560
535
  # @param request_options [Pinnacle::RequestOptions]
561
536
  # @return [Pinnacle::Types::ValidationResults]
562
537
  # @example
@@ -565,21 +540,8 @@ module Pinnacle
565
540
  # environment: Pinnacle::Environment::DEFAULT,
566
541
  # api_key: "YOUR_API_KEY"
567
542
  # )
568
- # api.brands.validate(
569
- # address: "500 Folsom St, San Francisco, CA 94105",
570
- # contact: { email: "michael.chen@trypinnacle.app", name: "Michael Chen", phone: "+14155551234", title: "Customer Support Representative" },
571
- # dba: "Pinnacle Messaging",
572
- # description: "Pinnacle is an SMS, MMS, and RCS API for scaling conversations with customers you value.",
573
- # ein: "88-1234567",
574
- # email: "founders@trypinnacle.app",
575
- # name: "Pinnacle",
576
- # sector: TECHNOLOGY,
577
- # type: PRIVATE_PROFIT,
578
- # entity_type: LLC,
579
- # website: "https://www.pinnacle.sh"
580
- # )
581
- def validate(address:, contact:, description:, email:, name:, sector:, type:, entity_type:, website:, dba: nil,
582
- ein: nil, request_options: nil)
543
+ # api.brands.validate(request: { })
544
+ def validate(request:, request_options: nil)
583
545
  Async do
584
546
  response = @request_client.conn.post do |req|
585
547
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
@@ -592,20 +554,7 @@ module Pinnacle
592
554
  unless request_options.nil? || request_options&.additional_query_parameters.nil?
593
555
  req.params = { **(request_options&.additional_query_parameters || {}) }.compact
594
556
  end
595
- req.body = {
596
- **(request_options&.additional_body_parameters || {}),
597
- address: address,
598
- contact: contact,
599
- dba: dba,
600
- description: description,
601
- ein: ein,
602
- email: email,
603
- name: name,
604
- sector: sector,
605
- type: type,
606
- entityType: entity_type,
607
- website: website
608
- }.compact
557
+ req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
609
558
  req.url "#{@request_client.get_url(request_options: request_options)}/brands/validate"
610
559
  end
611
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 primary brand representative.
10
- class BrandContact
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 or position of the contact person.
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 or position of the contact person.
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::BrandContact]
33
- def initialize(email:, name:, phone:, title:, additional_properties: nil)
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 BrandContact
44
+ # Deserialize a JSON object to an instance of UpsertBrandSchemaContact
43
45
  #
44
46
  # @param json_object [String]
45
- # @return [Pinnacle::Brands::Types::BrandContact]
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 BrandContact to a JSON object
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.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
77
- obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
78
- obj.phone.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.")
79
- obj.title.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
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
data/lib/requests.rb CHANGED
@@ -43,7 +43,7 @@ module Pinnacle
43
43
 
44
44
  # @return [Hash{String => String}]
45
45
  def get_headers
46
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.3" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.4" }
47
47
  headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
48
48
  headers
49
49
  end
@@ -87,7 +87,7 @@ module Pinnacle
87
87
 
88
88
  # @return [Hash{String => String}]
89
89
  def get_headers
90
- headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.3" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "2.0.4" }
91
91
  headers["PINNACLE-API-KEY"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
92
92
  headers
93
93
  end
data/lib/types_export.rb CHANGED
@@ -1,7 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "rcs/brands/types/autofill_brand_options"
4
- require_relative "rcs/brands/types/brand_contact"
4
+ require_relative "rcs/brands/types/upsert_brand_schema_contact"
5
+ require_relative "rcs/brands/types/upsert_brand_schema_sector"
6
+ require_relative "rcs/brands/types/upsert_brand_schema_type"
7
+ require_relative "rcs/brands/types/upsert_brand_schema_entity_type"
5
8
  require_relative "rcs/types/audience_with_pagination"
6
9
  require_relative "rcs/types/audience_count_only"
7
10
  require_relative "rcs/audiences/types/audiences_get_response"
@@ -79,7 +82,6 @@ require_relative "rcs/types/company_sector_enum"
79
82
  require_relative "rcs/types/company_type_enum"
80
83
  require_relative "rcs/types/company_entity_type_enum"
81
84
  require_relative "rcs/types/optional_brand_info"
82
- require_relative "rcs/types/upsert_contact"
83
85
  require_relative "rcs/types/brand_status_enum"
84
86
  require_relative "rcs/types/extended_brand"
85
87
  require_relative "rcs/types/vetting_feedback"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-12-23 00:00:00.000000000 Z
11
+ date: 2026-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -104,7 +104,10 @@ files:
104
104
  - lib/rcs/audiences/types/audiences_get_response.rb
105
105
  - lib/rcs/brands/client.rb
106
106
  - lib/rcs/brands/types/autofill_brand_options.rb
107
- - lib/rcs/brands/types/brand_contact.rb
107
+ - lib/rcs/brands/types/upsert_brand_schema_contact.rb
108
+ - lib/rcs/brands/types/upsert_brand_schema_entity_type.rb
109
+ - lib/rcs/brands/types/upsert_brand_schema_sector.rb
110
+ - lib/rcs/brands/types/upsert_brand_schema_type.rb
108
111
  - lib/rcs/campaigns/client.rb
109
112
  - lib/rcs/campaigns/dlc/client.rb
110
113
  - lib/rcs/campaigns/dlc/types/dlc_campaign_help_keywords.rb
@@ -425,7 +428,6 @@ files:
425
428
  - lib/rcs/types/tracking.rb
426
429
  - lib/rcs/types/updated_contact_id.rb
427
430
  - lib/rcs/types/upload_results.rb
428
- - lib/rcs/types/upsert_contact.rb
429
431
  - lib/rcs/types/user_event.rb
430
432
  - lib/rcs/types/user_event_conversation.rb
431
433
  - lib/rcs/types/v_card_address_schema_type_item.rb
@@ -1,84 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "ostruct"
4
- require "json"
5
-
6
- module Pinnacle
7
- module Types
8
- # Contact information for the brand.
9
- class UpsertContact
10
- # @return [String] Email address of the contact person.
11
- attr_reader :email
12
- # @return [String] Full name of the contact person.
13
- attr_reader :name
14
- # @return [String] Phone number of the contact person in E.164 format.
15
- attr_reader :phone
16
- # @return [String] Job title of the contact person.
17
- attr_reader :title
18
- # @return [OpenStruct] Additional properties unmapped to the current class definition
19
- attr_reader :additional_properties
20
- # @return [Object]
21
- attr_reader :_field_set
22
- protected :_field_set
23
-
24
- OMIT = Object.new
25
-
26
- # @param email [String] Email address of the contact person.
27
- # @param name [String] Full name of the contact person.
28
- # @param phone [String] Phone number of the contact person in E.164 format.
29
- # @param title [String] Job title of the contact person.
30
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
31
- # @return [Pinnacle::Types::UpsertContact]
32
- def initialize(email: OMIT, name: OMIT, phone: OMIT, title: OMIT, additional_properties: nil)
33
- @email = email if email != OMIT
34
- @name = name if name != OMIT
35
- @phone = phone if phone != OMIT
36
- @title = title if title != OMIT
37
- @additional_properties = additional_properties
38
- @_field_set = { "email": email, "name": name, "phone": phone, "title": title }.reject do |_k, v|
39
- v == OMIT
40
- end
41
- end
42
-
43
- # Deserialize a JSON object to an instance of UpsertContact
44
- #
45
- # @param json_object [String]
46
- # @return [Pinnacle::Types::UpsertContact]
47
- def self.from_json(json_object:)
48
- struct = JSON.parse(json_object, object_class: OpenStruct)
49
- parsed_json = JSON.parse(json_object)
50
- email = parsed_json["email"]
51
- name = parsed_json["name"]
52
- phone = parsed_json["phone"]
53
- title = parsed_json["title"]
54
- new(
55
- email: email,
56
- name: name,
57
- phone: phone,
58
- title: title,
59
- additional_properties: struct
60
- )
61
- end
62
-
63
- # Serialize an instance of UpsertContact to a JSON object
64
- #
65
- # @return [String]
66
- def to_json(*_args)
67
- @_field_set&.to_json
68
- end
69
-
70
- # Leveraged for Union-type generation, validate_raw attempts to parse the given
71
- # hash and check each fields type against the current object's property
72
- # definitions.
73
- #
74
- # @param obj [Object]
75
- # @return [Void]
76
- def self.validate_raw(obj:)
77
- obj.email&.is_a?(String) != false || raise("Passed value for field obj.email is not the expected type, validation failed.")
78
- obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
79
- obj.phone&.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.")
80
- obj.title&.is_a?(String) != false || raise("Passed value for field obj.title is not the expected type, validation failed.")
81
- end
82
- end
83
- end
84
- end