pingram 1.0.25 → 1.0.28

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 (25) 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/create_account_response.rb +32 -5
  7. data/lib/pingram/models/ten_dlc_brand_admin_update_request.rb +1 -1
  8. data/lib/pingram/models/ten_dlc_brand_registration.rb +2 -2
  9. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +2 -2
  10. data/lib/pingram/models/ten_dlc_campaign_admin_update_request.rb +363 -0
  11. data/lib/pingram/models/ten_dlc_campaign_registration.rb +448 -0
  12. data/lib/pingram/models/ten_dlc_campaign_registration_details.rb +14 -14
  13. data/lib/pingram/models/ten_dlc_campaign_update_request.rb +5 -49
  14. data/lib/pingram/version.rb +1 -1
  15. data/lib/pingram.rb +2 -1
  16. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  17. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/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/gem_make.out +5 -5
  19. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.2/mkmf.log +3 -3
  20. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  21. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
  22. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  23. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  24. metadata +4 -3
  25. 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: 0f540ef8b53152ed4f6ecd3308f797e0374b539c96bfd6c23f437f4c939ca8d9
4
+ data.tar.gz: ef7b88a8438baee017236e05065a974321658e45dc07efe52665a3bdbfa97d5e
5
5
  SHA512:
6
- metadata.gz: fb6b0d51d15a26a466b00db189a14edc559994e1bb398f1df861f9c5d38995240237bb8cefd6bcc3758f73953f71ed62f70134c0087bfdd7789c7bb6d46915c2
7
- data.tar.gz: 969b719b60bf55ff43cebde3a696ad2a93e40b799b276f0fb0f67da99cea62322ad1937286301e29d1112bf5186a745f608c5cc3a59868c0ca0b22d88d3ce879
6
+ metadata.gz: 5da3ff704b8ed13a71b3a3d1a0c1a690006e46ff495c4661649e5a8f2cca1c96e596f14587f3020e53e0c98174270fd6b7b5b6134403ebe0e92402a640f69730
7
+ data.tar.gz: 8c5b60183fc0c0cf58f4b3895a7ebb0665e70ffb4d000a3b694c0a3085cbd537e623727ddd4033e58774b15b921db3b5862084821ca195856890b2ab7bf54b1f
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.28)
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.28"
36
36
  @default_headers = {
37
37
  'Content-Type' => 'application/json',
38
38
  'User-Agent' => @user_agent
@@ -24,6 +24,9 @@ module Pingram
24
24
 
25
25
  attr_accessor :subscription_status
26
26
 
27
+ # Default secret API key for the new account (`pingram_sk_…`).
28
+ attr_accessor :api_key
29
+
27
30
  class EnumAttributeValidator
28
31
  attr_reader :datatype
29
32
  attr_reader :allowable_values
@@ -52,7 +55,8 @@ module Pingram
52
55
  :'account_id' => :'accountId',
53
56
  :'name' => :'name',
54
57
  :'status' => :'status',
55
- :'subscription_status' => :'subscriptionStatus'
58
+ :'subscription_status' => :'subscriptionStatus',
59
+ :'api_key' => :'apiKey'
56
60
  }
57
61
  end
58
62
 
@@ -72,14 +76,15 @@ module Pingram
72
76
  :'account_id' => :'String',
73
77
  :'name' => :'String',
74
78
  :'status' => :'String',
75
- :'subscription_status' => :'String'
79
+ :'subscription_status' => :'String',
80
+ :'api_key' => :'String'
76
81
  }
77
82
  end
78
83
 
79
84
  # List of attributes with nullable: true
80
85
  def self.openapi_nullable
81
86
  Set.new([
82
- :'subscription_status'
87
+ :'subscription_status',
83
88
  ])
84
89
  end
85
90
 
@@ -120,6 +125,12 @@ module Pingram
120
125
  if attributes.key?(:'subscription_status')
121
126
  self.subscription_status = attributes[:'subscription_status']
122
127
  end
128
+
129
+ if attributes.key?(:'api_key')
130
+ self.api_key = attributes[:'api_key']
131
+ else
132
+ self.api_key = nil
133
+ end
123
134
  end
124
135
 
125
136
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -139,6 +150,10 @@ module Pingram
139
150
  invalid_properties.push('invalid value for "status", status cannot be nil.')
140
151
  end
141
152
 
153
+ if @api_key.nil?
154
+ invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
155
+ end
156
+
142
157
  invalid_properties
143
158
  end
144
159
 
@@ -153,6 +168,7 @@ module Pingram
153
168
  return false unless status_validator.valid?(@status)
154
169
  subscription_status_validator = EnumAttributeValidator.new('String', ["active", "canceled", "past_due", "paused"])
155
170
  return false unless subscription_status_validator.valid?(@subscription_status)
171
+ return false if @api_key.nil?
156
172
  true
157
173
  end
158
174
 
@@ -196,6 +212,16 @@ module Pingram
196
212
  @subscription_status = subscription_status
197
213
  end
198
214
 
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] api_key Value to be assigned
217
+ def api_key=(api_key)
218
+ if api_key.nil?
219
+ fail ArgumentError, 'api_key cannot be nil'
220
+ end
221
+
222
+ @api_key = api_key
223
+ end
224
+
199
225
  # Checks equality by comparing each attribute.
200
226
  # @param [Object] Object to be compared
201
227
  def ==(o)
@@ -204,7 +230,8 @@ module Pingram
204
230
  account_id == o.account_id &&
205
231
  name == o.name &&
206
232
  status == o.status &&
207
- subscription_status == o.subscription_status
233
+ subscription_status == o.subscription_status &&
234
+ api_key == o.api_key
208
235
  end
209
236
 
210
237
  # @see the `==` method
@@ -216,7 +243,7 @@ module Pingram
216
243
  # Calculates hash code according to all attributes.
217
244
  # @return [Integer] Hash code
218
245
  def hash
219
- [account_id, name, status, subscription_status].hash
246
+ [account_id, name, status, subscription_status, api_key].hash
220
247
  end
221
248
 
222
249
  # Builds the object from hash
@@ -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