pingram 1.0.17 → 1.0.18
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/Gemfile.lock +1 -1
- data/lib/pingram/api/account_api.rb +95 -26
- data/lib/pingram/api/members_api.rb +10 -10
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/client_wrapper.rb +0 -10
- data/lib/pingram/models/account_get_response.rb +216 -29
- data/lib/pingram/models/auto_join_get_response.rb +16 -16
- data/lib/pingram/models/auto_join_post_response.rb +16 -16
- data/lib/pingram/models/billing_post_response_body.rb +35 -68
- data/lib/pingram/models/{create_organization_request.rb → brand_webhook_response.rb} +28 -13
- data/lib/pingram/models/get_members_response_inner.rb +1 -27
- data/lib/pingram/models/get_usage_history_query.rb +1 -1
- data/lib/pingram/models/{organization_usage_history.rb → get_usage_history_response.rb} +5 -5
- data/lib/pingram/models/{organization_usage_history_items_inner.rb → get_usage_history_response_items_inner.rb} +4 -4
- data/lib/pingram/models/{organization_usage_history_items_inner_counts.rb → get_usage_history_response_items_inner_counts.rb} +3 -3
- data/lib/pingram/models/{organization_usage.rb → get_usage_response.rb} +6 -6
- data/lib/pingram/models/{organization_usage_costs.rb → get_usage_response_costs.rb} +3 -3
- data/lib/pingram/models/{organization_usage_counts.rb → get_usage_response_counts.rb} +3 -3
- data/lib/pingram/models/sender_post_body_options_email.rb +4 -14
- data/lib/pingram/models/ten_dlc_brand_create_request.rb +19 -1
- data/lib/pingram/models/ten_dlc_brand_registration.rb +19 -1
- data/lib/pingram/models/ten_dlc_brand_registration_details.rb +599 -0
- data/lib/pingram/models/ten_dlc_brand_update_request.rb +92 -1
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +8 -10
- metadata +10 -12
- data/lib/pingram/api/organization_api.rb +0 -212
- data/lib/pingram/models/create_organization_response.rb +0 -216
- data/lib/pingram/models/organization.rb +0 -463
|
@@ -22,6 +22,21 @@ module Pingram
|
|
|
22
22
|
|
|
23
23
|
attr_accessor :legal_name
|
|
24
24
|
|
|
25
|
+
# Brand display name (marketing/DBA); defaults to legalName when omitted on legalName-only updates.
|
|
26
|
+
attr_accessor :display_name
|
|
27
|
+
|
|
28
|
+
attr_accessor :first_name
|
|
29
|
+
|
|
30
|
+
attr_accessor :last_name
|
|
31
|
+
|
|
32
|
+
attr_accessor :vertical
|
|
33
|
+
|
|
34
|
+
# Admin-only; legacy Other records. Ignored on customer PATCH.
|
|
35
|
+
attr_accessor :entity_type
|
|
36
|
+
|
|
37
|
+
# 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
|
|
38
|
+
attr_accessor :brand_status
|
|
39
|
+
|
|
25
40
|
attr_accessor :tax_id
|
|
26
41
|
|
|
27
42
|
attr_accessor :website
|
|
@@ -40,12 +55,40 @@ module Pingram
|
|
|
40
55
|
|
|
41
56
|
attr_accessor :compliance_contact_phone
|
|
42
57
|
|
|
58
|
+
class EnumAttributeValidator
|
|
59
|
+
attr_reader :datatype
|
|
60
|
+
attr_reader :allowable_values
|
|
61
|
+
|
|
62
|
+
def initialize(datatype, allowable_values)
|
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
|
64
|
+
case datatype.to_s
|
|
65
|
+
when /Integer/i
|
|
66
|
+
value.to_i
|
|
67
|
+
when /Float/i
|
|
68
|
+
value.to_f
|
|
69
|
+
else
|
|
70
|
+
value
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def valid?(value)
|
|
76
|
+
!value || allowable_values.include?(value)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
43
80
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
44
81
|
def self.attribute_map
|
|
45
82
|
{
|
|
46
83
|
:'scenario_id' => :'scenarioId',
|
|
47
84
|
:'business_type' => :'businessType',
|
|
48
85
|
:'legal_name' => :'legalName',
|
|
86
|
+
:'display_name' => :'displayName',
|
|
87
|
+
:'first_name' => :'firstName',
|
|
88
|
+
:'last_name' => :'lastName',
|
|
89
|
+
:'vertical' => :'vertical',
|
|
90
|
+
:'entity_type' => :'entityType',
|
|
91
|
+
:'brand_status' => :'brandStatus',
|
|
49
92
|
:'tax_id' => :'taxId',
|
|
50
93
|
:'website' => :'website',
|
|
51
94
|
:'country' => :'country',
|
|
@@ -74,6 +117,12 @@ module Pingram
|
|
|
74
117
|
:'scenario_id' => :'String',
|
|
75
118
|
:'business_type' => :'String',
|
|
76
119
|
:'legal_name' => :'String',
|
|
120
|
+
:'display_name' => :'String',
|
|
121
|
+
:'first_name' => :'String',
|
|
122
|
+
:'last_name' => :'String',
|
|
123
|
+
:'vertical' => :'String',
|
|
124
|
+
:'entity_type' => :'String',
|
|
125
|
+
:'brand_status' => :'String',
|
|
77
126
|
:'tax_id' => :'String',
|
|
78
127
|
:'website' => :'String',
|
|
79
128
|
:'country' => :'String',
|
|
@@ -120,6 +169,30 @@ module Pingram
|
|
|
120
169
|
self.legal_name = attributes[:'legal_name']
|
|
121
170
|
end
|
|
122
171
|
|
|
172
|
+
if attributes.key?(:'display_name')
|
|
173
|
+
self.display_name = attributes[:'display_name']
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'first_name')
|
|
177
|
+
self.first_name = attributes[:'first_name']
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'last_name')
|
|
181
|
+
self.last_name = attributes[:'last_name']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'vertical')
|
|
185
|
+
self.vertical = attributes[:'vertical']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'entity_type')
|
|
189
|
+
self.entity_type = attributes[:'entity_type']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'brand_status')
|
|
193
|
+
self.brand_status = attributes[:'brand_status']
|
|
194
|
+
end
|
|
195
|
+
|
|
123
196
|
if attributes.key?(:'tax_id')
|
|
124
197
|
self.tax_id = attributes[:'tax_id']
|
|
125
198
|
end
|
|
@@ -169,9 +242,21 @@ module Pingram
|
|
|
169
242
|
# @return true if the model is valid
|
|
170
243
|
def valid?
|
|
171
244
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
245
|
+
brand_status_validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
|
|
246
|
+
return false unless brand_status_validator.valid?(@brand_status)
|
|
172
247
|
true
|
|
173
248
|
end
|
|
174
249
|
|
|
250
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
251
|
+
# @param [Object] brand_status Object to be assigned
|
|
252
|
+
def brand_status=(brand_status)
|
|
253
|
+
validator = EnumAttributeValidator.new('String', ["not_started", "in_progress", "pending_review", "approved", "rejected", "info_needed"])
|
|
254
|
+
unless validator.valid?(brand_status)
|
|
255
|
+
fail ArgumentError, "invalid value for \"brand_status\", must be one of #{validator.allowable_values}."
|
|
256
|
+
end
|
|
257
|
+
@brand_status = brand_status
|
|
258
|
+
end
|
|
259
|
+
|
|
175
260
|
# Checks equality by comparing each attribute.
|
|
176
261
|
# @param [Object] Object to be compared
|
|
177
262
|
def ==(o)
|
|
@@ -180,6 +265,12 @@ module Pingram
|
|
|
180
265
|
scenario_id == o.scenario_id &&
|
|
181
266
|
business_type == o.business_type &&
|
|
182
267
|
legal_name == o.legal_name &&
|
|
268
|
+
display_name == o.display_name &&
|
|
269
|
+
first_name == o.first_name &&
|
|
270
|
+
last_name == o.last_name &&
|
|
271
|
+
vertical == o.vertical &&
|
|
272
|
+
entity_type == o.entity_type &&
|
|
273
|
+
brand_status == o.brand_status &&
|
|
183
274
|
tax_id == o.tax_id &&
|
|
184
275
|
website == o.website &&
|
|
185
276
|
country == o.country &&
|
|
@@ -200,7 +291,7 @@ module Pingram
|
|
|
200
291
|
# Calculates hash code according to all attributes.
|
|
201
292
|
# @return [Integer] Hash code
|
|
202
293
|
def hash
|
|
203
|
-
[scenario_id, business_type, legal_name, tax_id, website, country, street, city, state, postal_code, compliance_contact_email, compliance_contact_phone].hash
|
|
294
|
+
[scenario_id, business_type, legal_name, display_name, first_name, last_name, vertical, entity_type, brand_status, tax_id, website, country, street, city, state, postal_code, compliance_contact_email, compliance_contact_phone].hash
|
|
204
295
|
end
|
|
205
296
|
|
|
206
297
|
# Builds the object from hash
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -46,6 +46,7 @@ require 'pingram/models/bind_number_response_agent_spec_model'
|
|
|
46
46
|
require 'pingram/models/bind_number_response_agent_spec_outbound'
|
|
47
47
|
require 'pingram/models/bind_number_response_agent_spec_tools_inner'
|
|
48
48
|
require 'pingram/models/bind_number_response_agent_spec_variables_inner'
|
|
49
|
+
require 'pingram/models/brand_webhook_response'
|
|
49
50
|
require 'pingram/models/chained'
|
|
50
51
|
require 'pingram/models/change_email_request'
|
|
51
52
|
require 'pingram/models/change_phone_request'
|
|
@@ -55,8 +56,6 @@ require 'pingram/models/create_account_response'
|
|
|
55
56
|
require 'pingram/models/create_address_request'
|
|
56
57
|
require 'pingram/models/create_key_request'
|
|
57
58
|
require 'pingram/models/create_key_response'
|
|
58
|
-
require 'pingram/models/create_organization_request'
|
|
59
|
-
require 'pingram/models/create_organization_response'
|
|
60
59
|
require 'pingram/models/create_voice_agent_request'
|
|
61
60
|
require 'pingram/models/create_voice_agent_response'
|
|
62
61
|
require 'pingram/models/custom'
|
|
@@ -124,6 +123,12 @@ require 'pingram/models/get_templates_list_response_inner_any_of6_metadata_entit
|
|
|
124
123
|
require 'pingram/models/get_templates_list_response_inner_any_of6_metadata_entities_inner_external_ref'
|
|
125
124
|
require 'pingram/models/get_templates_response'
|
|
126
125
|
require 'pingram/models/get_usage_history_query'
|
|
126
|
+
require 'pingram/models/get_usage_history_response'
|
|
127
|
+
require 'pingram/models/get_usage_history_response_items_inner'
|
|
128
|
+
require 'pingram/models/get_usage_history_response_items_inner_counts'
|
|
129
|
+
require 'pingram/models/get_usage_response'
|
|
130
|
+
require 'pingram/models/get_usage_response_costs'
|
|
131
|
+
require 'pingram/models/get_usage_response_counts'
|
|
127
132
|
require 'pingram/models/get_users_response'
|
|
128
133
|
require 'pingram/models/get_users_response_users_inner'
|
|
129
134
|
require 'pingram/models/get_users_response_users_inner_email_suppression_status'
|
|
@@ -196,13 +201,6 @@ require 'pingram/models/notification_patch_request_deduplication'
|
|
|
196
201
|
require 'pingram/models/notification_patch_request_throttling'
|
|
197
202
|
require 'pingram/models/order_phone_number_request'
|
|
198
203
|
require 'pingram/models/order_phone_number_response'
|
|
199
|
-
require 'pingram/models/organization'
|
|
200
|
-
require 'pingram/models/organization_usage'
|
|
201
|
-
require 'pingram/models/organization_usage_costs'
|
|
202
|
-
require 'pingram/models/organization_usage_counts'
|
|
203
|
-
require 'pingram/models/organization_usage_history'
|
|
204
|
-
require 'pingram/models/organization_usage_history_items_inner'
|
|
205
|
-
require 'pingram/models/organization_usage_history_items_inner_counts'
|
|
206
204
|
require 'pingram/models/phone_verify_confirm_request'
|
|
207
205
|
require 'pingram/models/phone_verify_confirm_response'
|
|
208
206
|
require 'pingram/models/phone_verify_start_request'
|
|
@@ -266,6 +264,7 @@ require 'pingram/models/template_patch_request_instant'
|
|
|
266
264
|
require 'pingram/models/template_post_request'
|
|
267
265
|
require 'pingram/models/ten_dlc_brand_create_request'
|
|
268
266
|
require 'pingram/models/ten_dlc_brand_registration'
|
|
267
|
+
require 'pingram/models/ten_dlc_brand_registration_details'
|
|
269
268
|
require 'pingram/models/ten_dlc_brand_update_request'
|
|
270
269
|
require 'pingram/models/transfer'
|
|
271
270
|
require 'pingram/models/unbind_number_response'
|
|
@@ -296,7 +295,6 @@ require 'pingram/api/keys_api'
|
|
|
296
295
|
require 'pingram/api/logs_api'
|
|
297
296
|
require 'pingram/api/members_api'
|
|
298
297
|
require 'pingram/api/numbers_api'
|
|
299
|
-
require 'pingram/api/organization_api'
|
|
300
298
|
require 'pingram/api/profile_api'
|
|
301
299
|
require 'pingram/api/push_settings_api'
|
|
302
300
|
require 'pingram/api/sender_api'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pingram
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pingram
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -77,7 +77,6 @@ files:
|
|
|
77
77
|
- lib/pingram/api/logs_api.rb
|
|
78
78
|
- lib/pingram/api/members_api.rb
|
|
79
79
|
- lib/pingram/api/numbers_api.rb
|
|
80
|
-
- lib/pingram/api/organization_api.rb
|
|
81
80
|
- lib/pingram/api/profile_api.rb
|
|
82
81
|
- lib/pingram/api/push_settings_api.rb
|
|
83
82
|
- lib/pingram/api/sender_api.rb
|
|
@@ -119,6 +118,7 @@ files:
|
|
|
119
118
|
- lib/pingram/models/bind_number_response_agent_spec_outbound.rb
|
|
120
119
|
- lib/pingram/models/bind_number_response_agent_spec_tools_inner.rb
|
|
121
120
|
- lib/pingram/models/bind_number_response_agent_spec_variables_inner.rb
|
|
121
|
+
- lib/pingram/models/brand_webhook_response.rb
|
|
122
122
|
- lib/pingram/models/chained.rb
|
|
123
123
|
- lib/pingram/models/change_email_request.rb
|
|
124
124
|
- lib/pingram/models/change_phone_request.rb
|
|
@@ -128,8 +128,6 @@ files:
|
|
|
128
128
|
- lib/pingram/models/create_address_request.rb
|
|
129
129
|
- lib/pingram/models/create_key_request.rb
|
|
130
130
|
- lib/pingram/models/create_key_response.rb
|
|
131
|
-
- lib/pingram/models/create_organization_request.rb
|
|
132
|
-
- lib/pingram/models/create_organization_response.rb
|
|
133
131
|
- lib/pingram/models/create_voice_agent_request.rb
|
|
134
132
|
- lib/pingram/models/create_voice_agent_response.rb
|
|
135
133
|
- lib/pingram/models/custom.rb
|
|
@@ -197,6 +195,12 @@ files:
|
|
|
197
195
|
- lib/pingram/models/get_templates_list_response_inner_any_of6_metadata_entities_inner_external_ref.rb
|
|
198
196
|
- lib/pingram/models/get_templates_response.rb
|
|
199
197
|
- lib/pingram/models/get_usage_history_query.rb
|
|
198
|
+
- lib/pingram/models/get_usage_history_response.rb
|
|
199
|
+
- lib/pingram/models/get_usage_history_response_items_inner.rb
|
|
200
|
+
- lib/pingram/models/get_usage_history_response_items_inner_counts.rb
|
|
201
|
+
- lib/pingram/models/get_usage_response.rb
|
|
202
|
+
- lib/pingram/models/get_usage_response_costs.rb
|
|
203
|
+
- lib/pingram/models/get_usage_response_counts.rb
|
|
200
204
|
- lib/pingram/models/get_users_response.rb
|
|
201
205
|
- lib/pingram/models/get_users_response_users_inner.rb
|
|
202
206
|
- lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb
|
|
@@ -269,13 +273,6 @@ files:
|
|
|
269
273
|
- lib/pingram/models/notification_patch_request_throttling.rb
|
|
270
274
|
- lib/pingram/models/order_phone_number_request.rb
|
|
271
275
|
- lib/pingram/models/order_phone_number_response.rb
|
|
272
|
-
- lib/pingram/models/organization.rb
|
|
273
|
-
- lib/pingram/models/organization_usage.rb
|
|
274
|
-
- lib/pingram/models/organization_usage_costs.rb
|
|
275
|
-
- lib/pingram/models/organization_usage_counts.rb
|
|
276
|
-
- lib/pingram/models/organization_usage_history.rb
|
|
277
|
-
- lib/pingram/models/organization_usage_history_items_inner.rb
|
|
278
|
-
- lib/pingram/models/organization_usage_history_items_inner_counts.rb
|
|
279
276
|
- lib/pingram/models/phone_verify_confirm_request.rb
|
|
280
277
|
- lib/pingram/models/phone_verify_confirm_response.rb
|
|
281
278
|
- lib/pingram/models/phone_verify_start_request.rb
|
|
@@ -339,6 +336,7 @@ files:
|
|
|
339
336
|
- lib/pingram/models/template_post_request.rb
|
|
340
337
|
- lib/pingram/models/ten_dlc_brand_create_request.rb
|
|
341
338
|
- lib/pingram/models/ten_dlc_brand_registration.rb
|
|
339
|
+
- lib/pingram/models/ten_dlc_brand_registration_details.rb
|
|
342
340
|
- lib/pingram/models/ten_dlc_brand_update_request.rb
|
|
343
341
|
- lib/pingram/models/transfer.rb
|
|
344
342
|
- lib/pingram/models/unbind_number_response.rb
|
|
@@ -1,212 +0,0 @@
|
|
|
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 'cgi'
|
|
14
|
-
|
|
15
|
-
module Pingram
|
|
16
|
-
class OrganizationApi
|
|
17
|
-
attr_accessor :api_client
|
|
18
|
-
|
|
19
|
-
def initialize(api_client = ApiClient.default)
|
|
20
|
-
@api_client = api_client
|
|
21
|
-
end
|
|
22
|
-
# Create organization after SMS verification bypass
|
|
23
|
-
# @param create_organization_request [CreateOrganizationRequest]
|
|
24
|
-
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @return [CreateOrganizationResponse]
|
|
26
|
-
def organization_create(create_organization_request, opts = {})
|
|
27
|
-
data, _status_code, _headers = organization_create_with_http_info(create_organization_request, opts)
|
|
28
|
-
data
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Create organization after SMS verification bypass
|
|
32
|
-
# @param create_organization_request [CreateOrganizationRequest]
|
|
33
|
-
# @param [Hash] opts the optional parameters
|
|
34
|
-
# @return [Array<(CreateOrganizationResponse, Integer, Hash)>] CreateOrganizationResponse data, response status code and response headers
|
|
35
|
-
def organization_create_with_http_info(create_organization_request, opts = {})
|
|
36
|
-
if @api_client.config.debugging
|
|
37
|
-
@api_client.config.logger.debug 'Calling API: OrganizationApi.organization_create ...'
|
|
38
|
-
end
|
|
39
|
-
# verify the required parameter 'create_organization_request' is set
|
|
40
|
-
if @api_client.config.client_side_validation && create_organization_request.nil?
|
|
41
|
-
fail ArgumentError, "Missing the required parameter 'create_organization_request' when calling OrganizationApi.organization_create"
|
|
42
|
-
end
|
|
43
|
-
# resource path
|
|
44
|
-
local_var_path = '/organizations'
|
|
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(create_organization_request)
|
|
64
|
-
|
|
65
|
-
# return_type
|
|
66
|
-
return_type = opts[:debug_return_type] || 'CreateOrganizationResponse'
|
|
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 => :"OrganizationApi.organization_create",
|
|
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: OrganizationApi#organization_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
-
end
|
|
85
|
-
return data, status_code, headers
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
# Get usage for the authenticated account's organization (new billing model).
|
|
89
|
-
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @return [OrganizationUsage]
|
|
91
|
-
def organization_get_usage(opts = {})
|
|
92
|
-
data, _status_code, _headers = organization_get_usage_with_http_info(opts)
|
|
93
|
-
data
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Get usage for the authenticated account's organization (new billing model).
|
|
97
|
-
# @param [Hash] opts the optional parameters
|
|
98
|
-
# @return [Array<(OrganizationUsage, Integer, Hash)>] OrganizationUsage data, response status code and response headers
|
|
99
|
-
def organization_get_usage_with_http_info(opts = {})
|
|
100
|
-
if @api_client.config.debugging
|
|
101
|
-
@api_client.config.logger.debug 'Calling API: OrganizationApi.organization_get_usage ...'
|
|
102
|
-
end
|
|
103
|
-
# resource path
|
|
104
|
-
local_var_path = '/organization/usage'
|
|
105
|
-
|
|
106
|
-
# query parameters
|
|
107
|
-
query_params = opts[:query_params] || {}
|
|
108
|
-
|
|
109
|
-
# header parameters
|
|
110
|
-
header_params = opts[:header_params] || {}
|
|
111
|
-
# HTTP header 'Accept' (if needed)
|
|
112
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
113
|
-
|
|
114
|
-
# form parameters
|
|
115
|
-
form_params = opts[:form_params] || {}
|
|
116
|
-
|
|
117
|
-
# http body (model)
|
|
118
|
-
post_body = opts[:debug_body]
|
|
119
|
-
|
|
120
|
-
# return_type
|
|
121
|
-
return_type = opts[:debug_return_type] || 'OrganizationUsage'
|
|
122
|
-
|
|
123
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
124
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
125
|
-
|
|
126
|
-
new_options = opts.merge(
|
|
127
|
-
:operation => :"OrganizationApi.organization_get_usage",
|
|
128
|
-
:header_params => header_params,
|
|
129
|
-
:query_params => query_params,
|
|
130
|
-
:form_params => form_params,
|
|
131
|
-
:body => post_body,
|
|
132
|
-
:auth_names => auth_names,
|
|
133
|
-
:return_type => return_type
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
137
|
-
if @api_client.config.debugging
|
|
138
|
-
@api_client.config.logger.debug "API called: OrganizationApi#organization_get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
139
|
-
end
|
|
140
|
-
return data, status_code, headers
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
# Get historical usage for the authenticated account's organization over a date range.
|
|
144
|
-
# @param start_date [String] Start date (YYYY-MM-DD) for the range
|
|
145
|
-
# @param end_date [String] End date (YYYY-MM-DD) for the range
|
|
146
|
-
# @param [Hash] opts the optional parameters
|
|
147
|
-
# @return [OrganizationUsageHistory]
|
|
148
|
-
def organization_get_usage_history(start_date, end_date, opts = {})
|
|
149
|
-
data, _status_code, _headers = organization_get_usage_history_with_http_info(start_date, end_date, opts)
|
|
150
|
-
data
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
# Get historical usage for the authenticated account's organization over a date range.
|
|
154
|
-
# @param start_date [String] Start date (YYYY-MM-DD) for the range
|
|
155
|
-
# @param end_date [String] End date (YYYY-MM-DD) for the range
|
|
156
|
-
# @param [Hash] opts the optional parameters
|
|
157
|
-
# @return [Array<(OrganizationUsageHistory, Integer, Hash)>] OrganizationUsageHistory data, response status code and response headers
|
|
158
|
-
def organization_get_usage_history_with_http_info(start_date, end_date, opts = {})
|
|
159
|
-
if @api_client.config.debugging
|
|
160
|
-
@api_client.config.logger.debug 'Calling API: OrganizationApi.organization_get_usage_history ...'
|
|
161
|
-
end
|
|
162
|
-
# verify the required parameter 'start_date' is set
|
|
163
|
-
if @api_client.config.client_side_validation && start_date.nil?
|
|
164
|
-
fail ArgumentError, "Missing the required parameter 'start_date' when calling OrganizationApi.organization_get_usage_history"
|
|
165
|
-
end
|
|
166
|
-
# verify the required parameter 'end_date' is set
|
|
167
|
-
if @api_client.config.client_side_validation && end_date.nil?
|
|
168
|
-
fail ArgumentError, "Missing the required parameter 'end_date' when calling OrganizationApi.organization_get_usage_history"
|
|
169
|
-
end
|
|
170
|
-
# resource path
|
|
171
|
-
local_var_path = '/organization/usage/history'
|
|
172
|
-
|
|
173
|
-
# query parameters
|
|
174
|
-
query_params = opts[:query_params] || {}
|
|
175
|
-
query_params[:'startDate'] = start_date
|
|
176
|
-
query_params[:'endDate'] = end_date
|
|
177
|
-
|
|
178
|
-
# header parameters
|
|
179
|
-
header_params = opts[:header_params] || {}
|
|
180
|
-
# HTTP header 'Accept' (if needed)
|
|
181
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
182
|
-
|
|
183
|
-
# form parameters
|
|
184
|
-
form_params = opts[:form_params] || {}
|
|
185
|
-
|
|
186
|
-
# http body (model)
|
|
187
|
-
post_body = opts[:debug_body]
|
|
188
|
-
|
|
189
|
-
# return_type
|
|
190
|
-
return_type = opts[:debug_return_type] || 'OrganizationUsageHistory'
|
|
191
|
-
|
|
192
|
-
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
193
|
-
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
194
|
-
|
|
195
|
-
new_options = opts.merge(
|
|
196
|
-
:operation => :"OrganizationApi.organization_get_usage_history",
|
|
197
|
-
:header_params => header_params,
|
|
198
|
-
:query_params => query_params,
|
|
199
|
-
:form_params => form_params,
|
|
200
|
-
:body => post_body,
|
|
201
|
-
:auth_names => auth_names,
|
|
202
|
-
:return_type => return_type
|
|
203
|
-
)
|
|
204
|
-
|
|
205
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
206
|
-
if @api_client.config.debugging
|
|
207
|
-
@api_client.config.logger.debug "API called: OrganizationApi#organization_get_usage_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
208
|
-
end
|
|
209
|
-
return data, status_code, headers
|
|
210
|
-
end
|
|
211
|
-
end
|
|
212
|
-
end
|