pingram 1.0.25 → 1.0.27

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.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/pingram/api/environments_api.rb +0 -66
  4. data/lib/pingram/api/registrations_api.rb +121 -0
  5. data/lib/pingram/api_client.rb +1 -1
  6. data/lib/pingram/models/ten_dlc_brand_admin_update_request.rb +1 -1
  7. data/lib/pingram/models/ten_dlc_brand_registration.rb +2 -2
  8. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +2 -2
  9. data/lib/pingram/models/ten_dlc_campaign_admin_update_request.rb +363 -0
  10. data/lib/pingram/models/ten_dlc_campaign_registration.rb +448 -0
  11. data/lib/pingram/models/ten_dlc_campaign_registration_details.rb +14 -14
  12. data/lib/pingram/models/ten_dlc_campaign_update_request.rb +5 -49
  13. data/lib/pingram/version.rb +1 -1
  14. data/lib/pingram.rb +2 -1
  15. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  16. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  17. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/gem_make.out +5 -5
  18. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
  19. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  20. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  21. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  22. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  23. metadata +4 -3
  24. data/lib/pingram/models/environment_create_request.rb +0 -164
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a40e934d6c76c61dfd991994caec21cc77a45770b6a455e9bc3d965ade02506c
4
- data.tar.gz: 378e5208e84f02153580d9fc28b0e292462e29939bf177ee13c458205010a5d5
3
+ metadata.gz: 9c682a7732ba9868e586369b82a719570baf9f9fe029e13a8ef895e0fc451042
4
+ data.tar.gz: c54f21943d81cabf01873ba3086f2d64efb6339d45f285bd7d521039c20697ca
5
5
  SHA512:
6
- metadata.gz: fb6b0d51d15a26a466b00db189a14edc559994e1bb398f1df861f9c5d38995240237bb8cefd6bcc3758f73953f71ed62f70134c0087bfdd7789c7bb6d46915c2
7
- data.tar.gz: 969b719b60bf55ff43cebde3a696ad2a93e40b799b276f0fb0f67da99cea62322ad1937286301e29d1112bf5186a745f608c5cc3a59868c0ca0b22d88d3ce879
6
+ metadata.gz: 2b5b66b2b13533f553ea0e01922c293c33d5706f53791011965e5af6e9951312aeb7478f6eb7943781fa9fc9ade4a69a5ca6a4d7808cc2d010b0a0d3728b84d8
7
+ data.tar.gz: d1b588e8de8d3d6683022be600a650bfae370dbc518fa7b7169aa8ee43965d153b596abdb5378b3ba619cf8a74d6a3cd020163de3ef9845fead0985fc15b904f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pingram (1.0.25)
4
+ pingram (1.0.27)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -19,72 +19,6 @@ module Pingram
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create a new environment for the account
23
- # @param environment_create_request [EnvironmentCreateRequest]
24
- # @param [Hash] opts the optional parameters
25
- # @return [Environment]
26
- def environments_create_environment(environment_create_request, opts = {})
27
- data, _status_code, _headers = environments_create_environment_with_http_info(environment_create_request, opts)
28
- data
29
- end
30
-
31
- # Create a new environment for the account
32
- # @param environment_create_request [EnvironmentCreateRequest]
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(Environment, Integer, Hash)>] Environment data, response status code and response headers
35
- def environments_create_environment_with_http_info(environment_create_request, opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: EnvironmentsApi.environments_create_environment ...'
38
- end
39
- # verify the required parameter 'environment_create_request' is set
40
- if @api_client.config.client_side_validation && environment_create_request.nil?
41
- fail ArgumentError, "Missing the required parameter 'environment_create_request' when calling EnvironmentsApi.environments_create_environment"
42
- end
43
- # resource path
44
- local_var_path = '/environments'
45
-
46
- # query parameters
47
- query_params = opts[:query_params] || {}
48
-
49
- # header parameters
50
- header_params = opts[:header_params] || {}
51
- # HTTP header 'Accept' (if needed)
52
- header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
- # HTTP header 'Content-Type'
54
- content_type = @api_client.select_header_content_type(['application/json'])
55
- if !content_type.nil?
56
- header_params['Content-Type'] = content_type
57
- end
58
-
59
- # form parameters
60
- form_params = opts[:form_params] || {}
61
-
62
- # http body (model)
63
- post_body = opts[:debug_body] || @api_client.object_to_http_body(environment_create_request)
64
-
65
- # return_type
66
- return_type = opts[:debug_return_type] || 'Environment'
67
-
68
- # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
69
- auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
70
-
71
- new_options = opts.merge(
72
- :operation => :"EnvironmentsApi.environments_create_environment",
73
- :header_params => header_params,
74
- :query_params => query_params,
75
- :form_params => form_params,
76
- :body => post_body,
77
- :auth_names => auth_names,
78
- :return_type => return_type
79
- )
80
-
81
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
- if @api_client.config.debugging
83
- @api_client.config.logger.debug "API called: EnvironmentsApi#environments_create_environment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
- end
85
- return data, status_code, headers
86
- end
87
-
88
22
  # Get all environments for the authenticated account
89
23
  # @param [Hash] opts the optional parameters
90
24
  # @return [Array<GetEnvironmentsResponseInner>]
@@ -140,6 +140,61 @@ module Pingram
140
140
  return data, status_code, headers
141
141
  end
142
142
 
143
+ # Get the 10DLC campaign registration for the authenticated account. Returns null when no brand registration exists yet.
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [TenDlcCampaignRegistration]
146
+ def registrations_get_us10dlc_campaign(opts = {})
147
+ data, _status_code, _headers = registrations_get_us10dlc_campaign_with_http_info(opts)
148
+ data
149
+ end
150
+
151
+ # Get the 10DLC campaign registration for the authenticated account. Returns null when no brand registration exists yet.
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [Array<(TenDlcCampaignRegistration, Integer, Hash)>] TenDlcCampaignRegistration data, response status code and response headers
154
+ def registrations_get_us10dlc_campaign_with_http_info(opts = {})
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug 'Calling API: RegistrationsApi.registrations_get_us10dlc_campaign ...'
157
+ end
158
+ # resource path
159
+ local_var_path = '/registrations/us/10dlc/campaign'
160
+
161
+ # query parameters
162
+ query_params = opts[:query_params] || {}
163
+
164
+ # header parameters
165
+ header_params = opts[:header_params] || {}
166
+ # HTTP header 'Accept' (if needed)
167
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
168
+
169
+ # form parameters
170
+ form_params = opts[:form_params] || {}
171
+
172
+ # http body (model)
173
+ post_body = opts[:debug_body]
174
+
175
+ # return_type
176
+ return_type = opts[:debug_return_type] || 'TenDlcCampaignRegistration'
177
+
178
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
179
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
180
+
181
+ new_options = opts.merge(
182
+ :operation => :"RegistrationsApi.registrations_get_us10dlc_campaign",
183
+ :header_params => header_params,
184
+ :query_params => query_params,
185
+ :form_params => form_params,
186
+ :body => post_body,
187
+ :auth_names => auth_names,
188
+ :return_type => return_type
189
+ )
190
+
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug "API called: RegistrationsApi#registrations_get_us10dlc_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
194
+ end
195
+ return data, status_code, headers
196
+ end
197
+
143
198
  # Update an existing 10DLC brand registration. Business fields are editable before carrier submission; workflow status is managed by Pingram.
144
199
  # @param ten_dlc_brand_update_request [TenDlcBrandUpdateRequest]
145
200
  # @param [Hash] opts the optional parameters
@@ -205,5 +260,71 @@ module Pingram
205
260
  end
206
261
  return data, status_code, headers
207
262
  end
263
+
264
+ # Update an existing 10DLC campaign registration. Campaign fields are editable before carrier submission; workflow status is managed by Pingram.
265
+ # @param ten_dlc_campaign_update_request [TenDlcCampaignUpdateRequest]
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [TenDlcCampaignRegistration]
268
+ def registrations_update_us10dlc_campaign(ten_dlc_campaign_update_request, opts = {})
269
+ data, _status_code, _headers = registrations_update_us10dlc_campaign_with_http_info(ten_dlc_campaign_update_request, opts)
270
+ data
271
+ end
272
+
273
+ # Update an existing 10DLC campaign registration. Campaign fields are editable before carrier submission; workflow status is managed by Pingram.
274
+ # @param ten_dlc_campaign_update_request [TenDlcCampaignUpdateRequest]
275
+ # @param [Hash] opts the optional parameters
276
+ # @return [Array<(TenDlcCampaignRegistration, Integer, Hash)>] TenDlcCampaignRegistration data, response status code and response headers
277
+ def registrations_update_us10dlc_campaign_with_http_info(ten_dlc_campaign_update_request, opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug 'Calling API: RegistrationsApi.registrations_update_us10dlc_campaign ...'
280
+ end
281
+ # verify the required parameter 'ten_dlc_campaign_update_request' is set
282
+ if @api_client.config.client_side_validation && ten_dlc_campaign_update_request.nil?
283
+ fail ArgumentError, "Missing the required parameter 'ten_dlc_campaign_update_request' when calling RegistrationsApi.registrations_update_us10dlc_campaign"
284
+ end
285
+ # resource path
286
+ local_var_path = '/registrations/us/10dlc/campaign'
287
+
288
+ # query parameters
289
+ query_params = opts[:query_params] || {}
290
+
291
+ # header parameters
292
+ header_params = opts[:header_params] || {}
293
+ # HTTP header 'Accept' (if needed)
294
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
295
+ # HTTP header 'Content-Type'
296
+ content_type = @api_client.select_header_content_type(['application/json'])
297
+ if !content_type.nil?
298
+ header_params['Content-Type'] = content_type
299
+ end
300
+
301
+ # form parameters
302
+ form_params = opts[:form_params] || {}
303
+
304
+ # http body (model)
305
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ten_dlc_campaign_update_request)
306
+
307
+ # return_type
308
+ return_type = opts[:debug_return_type] || 'TenDlcCampaignRegistration'
309
+
310
+ # auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
311
+ auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
312
+
313
+ new_options = opts.merge(
314
+ :operation => :"RegistrationsApi.registrations_update_us10dlc_campaign",
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :form_params => form_params,
318
+ :body => post_body,
319
+ :auth_names => auth_names,
320
+ :return_type => return_type
321
+ )
322
+
323
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: RegistrationsApi#registrations_update_us10dlc_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
208
329
  end
209
330
  end
@@ -32,7 +32,7 @@ module Pingram
32
32
  # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
33
33
  def initialize(config = Configuration.default)
34
34
  @config = config
35
- @user_agent = "pingram-ruby/1.0.25"
35
+ @user_agent = "pingram-ruby/1.0.27"
36
36
  @default_headers = {
37
37
  'Content-Type' => 'application/json',
38
38
  'User-Agent' => @user_agent
@@ -56,7 +56,7 @@ module Pingram
56
56
  # Legacy only when businessType is Other.
57
57
  attr_accessor :entity_type
58
58
 
59
- # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
59
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
60
60
  attr_accessor :brand_status
61
61
 
62
62
  class EnumAttributeValidator
@@ -52,10 +52,10 @@ module Pingram
52
52
 
53
53
  attr_accessor :compliance_contact_phone
54
54
 
55
- # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
55
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
56
56
  attr_accessor :brand_status
57
57
 
58
- # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
58
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
59
59
  attr_accessor :campaign_status
60
60
 
61
61
  attr_accessor :created_at
@@ -52,10 +52,10 @@ module Pingram
52
52
 
53
53
  attr_accessor :compliance_contact_phone
54
54
 
55
- # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
55
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
56
56
  attr_accessor :brand_status
57
57
 
58
- # Pingram-side brand registration workflow status. - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
58
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
59
59
  attr_accessor :campaign_status
60
60
 
61
61
  attr_accessor :created_at
@@ -0,0 +1,363 @@
1
+ =begin
2
+ #Pingram
3
+
4
+ #Internal API for notification delivery and management
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Pingram
17
+ # Request body for PATCH /registrations/us/10dlc/campaign/admin
18
+ class TenDlcCampaignAdminUpdateRequest < ApiModelBase
19
+ attr_accessor :campaign_description
20
+
21
+ attr_accessor :campaign_sample1
22
+
23
+ attr_accessor :campaign_sample2
24
+
25
+ attr_accessor :campaign_sample3
26
+
27
+ attr_accessor :campaign_sample4
28
+
29
+ attr_accessor :campaign_message_flow
30
+
31
+ attr_accessor :campaign_optin_keywords
32
+
33
+ attr_accessor :campaign_optin_message
34
+
35
+ attr_accessor :campaign_optout_keywords
36
+
37
+ attr_accessor :campaign_optout_message
38
+
39
+ attr_accessor :campaign_help_keywords
40
+
41
+ attr_accessor :campaign_help_message
42
+
43
+ attr_accessor :campaign_embedded_link
44
+
45
+ attr_accessor :campaign_embedded_link_url
46
+
47
+ attr_accessor :campaign_embedded_phone
48
+
49
+ attr_accessor :campaign_age_gated
50
+
51
+ attr_accessor :campaign_direct_lending
52
+
53
+ attr_accessor :campaign_privacy_policy_link
54
+
55
+ attr_accessor :campaign_terms_and_conditions_link
56
+
57
+ attr_accessor :campaign_usecase
58
+
59
+ # Pingram-side 10DLC registration workflow status (brand or campaign). - not_started: no customer submission yet - pending_review: customer submitted; Pingram has not submitted to carriers - in_progress: submitted for carrier review - approved | rejected | info_needed: review outcome
60
+ attr_accessor :campaign_status
61
+
62
+ class EnumAttributeValidator
63
+ attr_reader :datatype
64
+ attr_reader :allowable_values
65
+
66
+ def initialize(datatype, allowable_values)
67
+ @allowable_values = allowable_values.map do |value|
68
+ case datatype.to_s
69
+ when /Integer/i
70
+ value.to_i
71
+ when /Float/i
72
+ value.to_f
73
+ else
74
+ value
75
+ end
76
+ end
77
+ end
78
+
79
+ def valid?(value)
80
+ !value || allowable_values.include?(value)
81
+ end
82
+ end
83
+
84
+ # Attribute mapping from ruby-style variable name to JSON key.
85
+ def self.attribute_map
86
+ {
87
+ :'campaign_description' => :'campaignDescription',
88
+ :'campaign_sample1' => :'campaignSample1',
89
+ :'campaign_sample2' => :'campaignSample2',
90
+ :'campaign_sample3' => :'campaignSample3',
91
+ :'campaign_sample4' => :'campaignSample4',
92
+ :'campaign_message_flow' => :'campaignMessageFlow',
93
+ :'campaign_optin_keywords' => :'campaignOptinKeywords',
94
+ :'campaign_optin_message' => :'campaignOptinMessage',
95
+ :'campaign_optout_keywords' => :'campaignOptoutKeywords',
96
+ :'campaign_optout_message' => :'campaignOptoutMessage',
97
+ :'campaign_help_keywords' => :'campaignHelpKeywords',
98
+ :'campaign_help_message' => :'campaignHelpMessage',
99
+ :'campaign_embedded_link' => :'campaignEmbeddedLink',
100
+ :'campaign_embedded_link_url' => :'campaignEmbeddedLinkUrl',
101
+ :'campaign_embedded_phone' => :'campaignEmbeddedPhone',
102
+ :'campaign_age_gated' => :'campaignAgeGated',
103
+ :'campaign_direct_lending' => :'campaignDirectLending',
104
+ :'campaign_privacy_policy_link' => :'campaignPrivacyPolicyLink',
105
+ :'campaign_terms_and_conditions_link' => :'campaignTermsAndConditionsLink',
106
+ :'campaign_usecase' => :'campaignUsecase',
107
+ :'campaign_status' => :'campaignStatus'
108
+ }
109
+ end
110
+
111
+ # Returns attribute mapping this model knows about
112
+ def self.acceptable_attribute_map
113
+ attribute_map
114
+ end
115
+
116
+ # Returns all the JSON keys this model knows about
117
+ def self.acceptable_attributes
118
+ acceptable_attribute_map.values
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.openapi_types
123
+ {
124
+ :'campaign_description' => :'String',
125
+ :'campaign_sample1' => :'String',
126
+ :'campaign_sample2' => :'String',
127
+ :'campaign_sample3' => :'String',
128
+ :'campaign_sample4' => :'String',
129
+ :'campaign_message_flow' => :'String',
130
+ :'campaign_optin_keywords' => :'String',
131
+ :'campaign_optin_message' => :'String',
132
+ :'campaign_optout_keywords' => :'String',
133
+ :'campaign_optout_message' => :'String',
134
+ :'campaign_help_keywords' => :'String',
135
+ :'campaign_help_message' => :'String',
136
+ :'campaign_embedded_link' => :'Boolean',
137
+ :'campaign_embedded_link_url' => :'String',
138
+ :'campaign_embedded_phone' => :'Boolean',
139
+ :'campaign_age_gated' => :'Boolean',
140
+ :'campaign_direct_lending' => :'Boolean',
141
+ :'campaign_privacy_policy_link' => :'String',
142
+ :'campaign_terms_and_conditions_link' => :'String',
143
+ :'campaign_usecase' => :'String',
144
+ :'campaign_status' => :'String'
145
+ }
146
+ end
147
+
148
+ # List of attributes with nullable: true
149
+ def self.openapi_nullable
150
+ Set.new([
151
+ ])
152
+ end
153
+
154
+ # Initializes the object
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ def initialize(attributes = {})
157
+ if (!attributes.is_a?(Hash))
158
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TenDlcCampaignAdminUpdateRequest` initialize method"
159
+ end
160
+
161
+ # check to see if the attribute exists and convert string to symbol for hash key
162
+ acceptable_attribute_map = self.class.acceptable_attribute_map
163
+ attributes = attributes.each_with_object({}) { |(k, v), h|
164
+ if (!acceptable_attribute_map.key?(k.to_sym))
165
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TenDlcCampaignAdminUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
166
+ end
167
+ h[k.to_sym] = v
168
+ }
169
+
170
+ if attributes.key?(:'campaign_description')
171
+ self.campaign_description = attributes[:'campaign_description']
172
+ end
173
+
174
+ if attributes.key?(:'campaign_sample1')
175
+ self.campaign_sample1 = attributes[:'campaign_sample1']
176
+ end
177
+
178
+ if attributes.key?(:'campaign_sample2')
179
+ self.campaign_sample2 = attributes[:'campaign_sample2']
180
+ end
181
+
182
+ if attributes.key?(:'campaign_sample3')
183
+ self.campaign_sample3 = attributes[:'campaign_sample3']
184
+ end
185
+
186
+ if attributes.key?(:'campaign_sample4')
187
+ self.campaign_sample4 = attributes[:'campaign_sample4']
188
+ end
189
+
190
+ if attributes.key?(:'campaign_message_flow')
191
+ self.campaign_message_flow = attributes[:'campaign_message_flow']
192
+ end
193
+
194
+ if attributes.key?(:'campaign_optin_keywords')
195
+ self.campaign_optin_keywords = attributes[:'campaign_optin_keywords']
196
+ end
197
+
198
+ if attributes.key?(:'campaign_optin_message')
199
+ self.campaign_optin_message = attributes[:'campaign_optin_message']
200
+ end
201
+
202
+ if attributes.key?(:'campaign_optout_keywords')
203
+ self.campaign_optout_keywords = attributes[:'campaign_optout_keywords']
204
+ end
205
+
206
+ if attributes.key?(:'campaign_optout_message')
207
+ self.campaign_optout_message = attributes[:'campaign_optout_message']
208
+ end
209
+
210
+ if attributes.key?(:'campaign_help_keywords')
211
+ self.campaign_help_keywords = attributes[:'campaign_help_keywords']
212
+ end
213
+
214
+ if attributes.key?(:'campaign_help_message')
215
+ self.campaign_help_message = attributes[:'campaign_help_message']
216
+ end
217
+
218
+ if attributes.key?(:'campaign_embedded_link')
219
+ self.campaign_embedded_link = attributes[:'campaign_embedded_link']
220
+ end
221
+
222
+ if attributes.key?(:'campaign_embedded_link_url')
223
+ self.campaign_embedded_link_url = attributes[:'campaign_embedded_link_url']
224
+ end
225
+
226
+ if attributes.key?(:'campaign_embedded_phone')
227
+ self.campaign_embedded_phone = attributes[:'campaign_embedded_phone']
228
+ end
229
+
230
+ if attributes.key?(:'campaign_age_gated')
231
+ self.campaign_age_gated = attributes[:'campaign_age_gated']
232
+ end
233
+
234
+ if attributes.key?(:'campaign_direct_lending')
235
+ self.campaign_direct_lending = attributes[:'campaign_direct_lending']
236
+ end
237
+
238
+ if attributes.key?(:'campaign_privacy_policy_link')
239
+ self.campaign_privacy_policy_link = attributes[:'campaign_privacy_policy_link']
240
+ end
241
+
242
+ if attributes.key?(:'campaign_terms_and_conditions_link')
243
+ self.campaign_terms_and_conditions_link = attributes[:'campaign_terms_and_conditions_link']
244
+ end
245
+
246
+ if attributes.key?(:'campaign_usecase')
247
+ self.campaign_usecase = attributes[:'campaign_usecase']
248
+ end
249
+
250
+ if attributes.key?(:'campaign_status')
251
+ self.campaign_status = attributes[:'campaign_status']
252
+ end
253
+ end
254
+
255
+ # Show invalid properties with the reasons. Usually used together with valid?
256
+ # @return Array for valid properties with the reasons
257
+ def list_invalid_properties
258
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
259
+ invalid_properties = Array.new
260
+ invalid_properties
261
+ end
262
+
263
+ # Check to see if the all the properties in the model are valid
264
+ # @return true if the model is valid
265
+ def valid?
266
+ warn '[DEPRECATED] the `valid?` method is obsolete'
267
+ campaign_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
268
+ return false unless campaign_status_validator.valid?(@campaign_status)
269
+ true
270
+ end
271
+
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] campaign_status Object to be assigned
274
+ def campaign_status=(campaign_status)
275
+ validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
276
+ unless validator.valid?(campaign_status)
277
+ fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
278
+ end
279
+ @campaign_status = campaign_status
280
+ end
281
+
282
+ # Checks equality by comparing each attribute.
283
+ # @param [Object] Object to be compared
284
+ def ==(o)
285
+ return true if self.equal?(o)
286
+ self.class == o.class &&
287
+ campaign_description == o.campaign_description &&
288
+ campaign_sample1 == o.campaign_sample1 &&
289
+ campaign_sample2 == o.campaign_sample2 &&
290
+ campaign_sample3 == o.campaign_sample3 &&
291
+ campaign_sample4 == o.campaign_sample4 &&
292
+ campaign_message_flow == o.campaign_message_flow &&
293
+ campaign_optin_keywords == o.campaign_optin_keywords &&
294
+ campaign_optin_message == o.campaign_optin_message &&
295
+ campaign_optout_keywords == o.campaign_optout_keywords &&
296
+ campaign_optout_message == o.campaign_optout_message &&
297
+ campaign_help_keywords == o.campaign_help_keywords &&
298
+ campaign_help_message == o.campaign_help_message &&
299
+ campaign_embedded_link == o.campaign_embedded_link &&
300
+ campaign_embedded_link_url == o.campaign_embedded_link_url &&
301
+ campaign_embedded_phone == o.campaign_embedded_phone &&
302
+ campaign_age_gated == o.campaign_age_gated &&
303
+ campaign_direct_lending == o.campaign_direct_lending &&
304
+ campaign_privacy_policy_link == o.campaign_privacy_policy_link &&
305
+ campaign_terms_and_conditions_link == o.campaign_terms_and_conditions_link &&
306
+ campaign_usecase == o.campaign_usecase &&
307
+ campaign_status == o.campaign_status
308
+ end
309
+
310
+ # @see the `==` method
311
+ # @param [Object] Object to be compared
312
+ def eql?(o)
313
+ self == o
314
+ end
315
+
316
+ # Calculates hash code according to all attributes.
317
+ # @return [Integer] Hash code
318
+ def hash
319
+ [campaign_description, campaign_sample1, campaign_sample2, campaign_sample3, campaign_sample4, campaign_message_flow, campaign_optin_keywords, campaign_optin_message, campaign_optout_keywords, campaign_optout_message, campaign_help_keywords, campaign_help_message, campaign_embedded_link, campaign_embedded_link_url, campaign_embedded_phone, campaign_age_gated, campaign_direct_lending, campaign_privacy_policy_link, campaign_terms_and_conditions_link, campaign_usecase, campaign_status].hash
320
+ end
321
+
322
+ # Builds the object from hash
323
+ # @param [Hash] attributes Model attributes in the form of hash
324
+ # @return [Object] Returns the model itself
325
+ def self.build_from_hash(attributes)
326
+ return nil unless attributes.is_a?(Hash)
327
+ attributes = attributes.transform_keys(&:to_sym)
328
+ transformed_hash = {}
329
+ openapi_types.each_pair do |key, type|
330
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
331
+ transformed_hash["#{key}"] = nil
332
+ elsif type =~ /\AArray<(.*)>/i
333
+ # check to ensure the input is an array given that the attribute
334
+ # is documented as an array but the input is not
335
+ if attributes[attribute_map[key]].is_a?(Array)
336
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
337
+ end
338
+ elsif !attributes[attribute_map[key]].nil?
339
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
340
+ end
341
+ end
342
+ new(transformed_hash)
343
+ end
344
+
345
+ # Returns the object in the form of hash
346
+ # @return [Hash] Returns the object in the form of hash
347
+ def to_hash
348
+ hash = {}
349
+ self.class.attribute_map.each_pair do |attr, param|
350
+ value = self.send(attr)
351
+ if value.nil?
352
+ is_nullable = self.class.openapi_nullable.include?(attr)
353
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
354
+ end
355
+
356
+ hash[param] = _to_hash(value)
357
+ end
358
+ hash
359
+ end
360
+
361
+ end
362
+
363
+ end