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.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/pingram/api/account_api.rb +95 -26
  4. data/lib/pingram/api/members_api.rb +10 -10
  5. data/lib/pingram/api_client.rb +1 -1
  6. data/lib/pingram/client_wrapper.rb +0 -10
  7. data/lib/pingram/models/account_get_response.rb +216 -29
  8. data/lib/pingram/models/auto_join_get_response.rb +16 -16
  9. data/lib/pingram/models/auto_join_post_response.rb +16 -16
  10. data/lib/pingram/models/billing_post_response_body.rb +35 -68
  11. data/lib/pingram/models/{create_organization_request.rb → brand_webhook_response.rb} +28 -13
  12. data/lib/pingram/models/get_members_response_inner.rb +1 -27
  13. data/lib/pingram/models/get_usage_history_query.rb +1 -1
  14. data/lib/pingram/models/{organization_usage_history.rb → get_usage_history_response.rb} +5 -5
  15. data/lib/pingram/models/{organization_usage_history_items_inner.rb → get_usage_history_response_items_inner.rb} +4 -4
  16. data/lib/pingram/models/{organization_usage_history_items_inner_counts.rb → get_usage_history_response_items_inner_counts.rb} +3 -3
  17. data/lib/pingram/models/{organization_usage.rb → get_usage_response.rb} +6 -6
  18. data/lib/pingram/models/{organization_usage_costs.rb → get_usage_response_costs.rb} +3 -3
  19. data/lib/pingram/models/{organization_usage_counts.rb → get_usage_response_counts.rb} +3 -3
  20. data/lib/pingram/models/sender_post_body_options_email.rb +4 -14
  21. data/lib/pingram/models/ten_dlc_brand_create_request.rb +19 -1
  22. data/lib/pingram/models/ten_dlc_brand_registration.rb +19 -1
  23. data/lib/pingram/models/ten_dlc_brand_registration_details.rb +599 -0
  24. data/lib/pingram/models/ten_dlc_brand_update_request.rb +92 -1
  25. data/lib/pingram/version.rb +1 -1
  26. data/lib/pingram.rb +8 -10
  27. metadata +10 -12
  28. data/lib/pingram/api/organization_api.rb +0 -212
  29. data/lib/pingram/models/create_organization_response.rb +0 -216
  30. data/lib/pingram/models/organization.rb +0 -463
@@ -14,11 +14,11 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # POST /billing response: organization usage limits + optional Checkout session.
17
+ # POST /billing response: account fields + optional Checkout session.
18
18
  class BillingPostResponseBody < ApiModelBase
19
- attr_accessor :organization_id
19
+ attr_accessor :account_id
20
20
 
21
- attr_accessor :organization_type
21
+ attr_accessor :account_type
22
22
 
23
23
  attr_accessor :creator
24
24
 
@@ -32,6 +32,7 @@ module Pingram
32
32
 
33
33
  attr_accessor :call_cap
34
34
 
35
+ # When omitted, defaults to LATEST_BILLING_VERSION.
35
36
  attr_accessor :billing_version
36
37
 
37
38
  # ISO date (YYYY-MM-DD) when the billing cycle resets.
@@ -72,8 +73,8 @@ module Pingram
72
73
  # Attribute mapping from ruby-style variable name to JSON key.
73
74
  def self.attribute_map
74
75
  {
75
- :'organization_id' => :'organizationId',
76
- :'organization_type' => :'organizationType',
76
+ :'account_id' => :'accountId',
77
+ :'account_type' => :'accountType',
77
78
  :'creator' => :'creator',
78
79
  :'name' => :'name',
79
80
  :'messages_cap' => :'messagesCap',
@@ -103,8 +104,8 @@ module Pingram
103
104
  # Attribute type mapping.
104
105
  def self.openapi_types
105
106
  {
106
- :'organization_id' => :'String',
107
- :'organization_type' => :'String',
107
+ :'account_id' => :'String',
108
+ :'account_type' => :'String',
108
109
  :'creator' => :'String',
109
110
  :'name' => :'String',
110
111
  :'messages_cap' => :'Float',
@@ -143,28 +144,24 @@ module Pingram
143
144
  h[k.to_sym] = v
144
145
  }
145
146
 
146
- if attributes.key?(:'organization_id')
147
- self.organization_id = attributes[:'organization_id']
147
+ if attributes.key?(:'account_id')
148
+ self.account_id = attributes[:'account_id']
148
149
  else
149
- self.organization_id = nil
150
+ self.account_id = nil
150
151
  end
151
152
 
152
- if attributes.key?(:'organization_type')
153
- self.organization_type = attributes[:'organization_type']
153
+ if attributes.key?(:'account_type')
154
+ self.account_type = attributes[:'account_type']
154
155
  else
155
- self.organization_type = nil
156
+ self.account_type = nil
156
157
  end
157
158
 
158
159
  if attributes.key?(:'creator')
159
160
  self.creator = attributes[:'creator']
160
- else
161
- self.creator = nil
162
161
  end
163
162
 
164
163
  if attributes.key?(:'name')
165
164
  self.name = attributes[:'name']
166
- else
167
- self.name = nil
168
165
  end
169
166
 
170
167
  if attributes.key?(:'messages_cap')
@@ -229,20 +226,12 @@ module Pingram
229
226
  def list_invalid_properties
230
227
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
231
228
  invalid_properties = Array.new
232
- if @organization_id.nil?
233
- invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
234
- end
235
-
236
- if @organization_type.nil?
237
- invalid_properties.push('invalid value for "organization_type", organization_type cannot be nil.')
229
+ if @account_id.nil?
230
+ invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
238
231
  end
239
232
 
240
- if @creator.nil?
241
- invalid_properties.push('invalid value for "creator", creator cannot be nil.')
242
- end
243
-
244
- if @name.nil?
245
- invalid_properties.push('invalid value for "name", name cannot be nil.')
233
+ if @account_type.nil?
234
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
246
235
  end
247
236
 
248
237
  if @messages_cap.nil?
@@ -276,12 +265,10 @@ module Pingram
276
265
  # @return true if the model is valid
277
266
  def valid?
278
267
  warn '[DEPRECATED] the `valid?` method is obsolete'
279
- return false if @organization_id.nil?
280
- return false if @organization_type.nil?
281
- organization_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
282
- return false unless organization_type_validator.valid?(@organization_type)
283
- return false if @creator.nil?
284
- return false if @name.nil?
268
+ return false if @account_id.nil?
269
+ return false if @account_type.nil?
270
+ account_type_validator = EnumAttributeValidator.new('String', ["free", "paid"])
271
+ return false unless account_type_validator.valid?(@account_type)
285
272
  return false if @messages_cap.nil?
286
273
  return false if @cost_cap.nil?
287
274
  billing_version_validator = EnumAttributeValidator.new('Float', [1, 3])
@@ -294,43 +281,23 @@ module Pingram
294
281
  end
295
282
 
296
283
  # Custom attribute writer method with validation
297
- # @param [Object] organization_id Value to be assigned
298
- def organization_id=(organization_id)
299
- if organization_id.nil?
300
- fail ArgumentError, 'organization_id cannot be nil'
284
+ # @param [Object] account_id Value to be assigned
285
+ def account_id=(account_id)
286
+ if account_id.nil?
287
+ fail ArgumentError, 'account_id cannot be nil'
301
288
  end
302
289
 
303
- @organization_id = organization_id
290
+ @account_id = account_id
304
291
  end
305
292
 
306
293
  # Custom attribute writer method checking allowed values (enum).
307
- # @param [Object] organization_type Object to be assigned
308
- def organization_type=(organization_type)
294
+ # @param [Object] account_type Object to be assigned
295
+ def account_type=(account_type)
309
296
  validator = EnumAttributeValidator.new('String', ["free", "paid"])
310
- unless validator.valid?(organization_type)
311
- fail ArgumentError, "invalid value for \"organization_type\", must be one of #{validator.allowable_values}."
312
- end
313
- @organization_type = organization_type
314
- end
315
-
316
- # Custom attribute writer method with validation
317
- # @param [Object] creator Value to be assigned
318
- def creator=(creator)
319
- if creator.nil?
320
- fail ArgumentError, 'creator cannot be nil'
321
- end
322
-
323
- @creator = creator
324
- end
325
-
326
- # Custom attribute writer method with validation
327
- # @param [Object] name Value to be assigned
328
- def name=(name)
329
- if name.nil?
330
- fail ArgumentError, 'name cannot be nil'
297
+ unless validator.valid?(account_type)
298
+ fail ArgumentError, "invalid value for \"account_type\", must be one of #{validator.allowable_values}."
331
299
  end
332
-
333
- @name = name
300
+ @account_type = account_type
334
301
  end
335
302
 
336
303
  # Custom attribute writer method with validation
@@ -408,8 +375,8 @@ module Pingram
408
375
  def ==(o)
409
376
  return true if self.equal?(o)
410
377
  self.class == o.class &&
411
- organization_id == o.organization_id &&
412
- organization_type == o.organization_type &&
378
+ account_id == o.account_id &&
379
+ account_type == o.account_type &&
413
380
  creator == o.creator &&
414
381
  name == o.name &&
415
382
  messages_cap == o.messages_cap &&
@@ -434,7 +401,7 @@ module Pingram
434
401
  # Calculates hash code according to all attributes.
435
402
  # @return [Integer] Hash code
436
403
  def hash
437
- [organization_id, organization_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, allow_overage, created_at, updated_at, session_id, url].hash
404
+ [account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, allow_overage, created_at, updated_at, session_id, url].hash
438
405
  end
439
406
 
440
407
  # Builds the object from hash
@@ -14,14 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- class CreateOrganizationRequest < ApiModelBase
18
- # First-touch PostHog props from the client; attached to signup events.
19
- attr_accessor :attribution
17
+ # Response for brand Telnyx webhook handler.
18
+ class BrandWebhookResponse < ApiModelBase
19
+ attr_accessor :message
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
22
22
  def self.attribute_map
23
23
  {
24
- :'attribution' => :'attribution'
24
+ :'message' => :'message'
25
25
  }
26
26
  end
27
27
 
@@ -38,7 +38,7 @@ module Pingram
38
38
  # Attribute type mapping.
39
39
  def self.openapi_types
40
40
  {
41
- :'attribution' => :'Hash<String, String>'
41
+ :'message' => :'String'
42
42
  }
43
43
  end
44
44
 
@@ -52,22 +52,22 @@ module Pingram
52
52
  # @param [Hash] attributes Model attributes in the form of hash
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::CreateOrganizationRequest` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::BrandWebhookResponse` initialize method"
56
56
  end
57
57
 
58
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::CreateOrganizationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::BrandWebhookResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
66
66
 
67
- if attributes.key?(:'attribution')
68
- if (value = attributes[:'attribution']).is_a?(Hash)
69
- self.attribution = value
70
- end
67
+ if attributes.key?(:'message')
68
+ self.message = attributes[:'message']
69
+ else
70
+ self.message = nil
71
71
  end
72
72
  end
73
73
 
@@ -76,6 +76,10 @@ module Pingram
76
76
  def list_invalid_properties
77
77
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
78
  invalid_properties = Array.new
79
+ if @message.nil?
80
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
81
+ end
82
+
79
83
  invalid_properties
80
84
  end
81
85
 
@@ -83,15 +87,26 @@ module Pingram
83
87
  # @return true if the model is valid
84
88
  def valid?
85
89
  warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @message.nil?
86
91
  true
87
92
  end
88
93
 
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] message Value to be assigned
96
+ def message=(message)
97
+ if message.nil?
98
+ fail ArgumentError, 'message cannot be nil'
99
+ end
100
+
101
+ @message = message
102
+ end
103
+
89
104
  # Checks equality by comparing each attribute.
90
105
  # @param [Object] Object to be compared
91
106
  def ==(o)
92
107
  return true if self.equal?(o)
93
108
  self.class == o.class &&
94
- attribution == o.attribution
109
+ message == o.message
95
110
  end
96
111
 
97
112
  # @see the `==` method
@@ -103,7 +118,7 @@ module Pingram
103
118
  # Calculates hash code according to all attributes.
104
119
  # @return [Integer] Hash code
105
120
  def hash
106
- [attribution].hash
121
+ [message].hash
107
122
  end
108
123
 
109
124
  # Builds the object from hash
@@ -15,8 +15,6 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  class GetMembersResponseInner < ApiModelBase
18
- attr_accessor :organization_id
19
-
20
18
  attr_accessor :account_id
21
19
 
22
20
  attr_accessor :user_id
@@ -54,7 +52,6 @@ module Pingram
54
52
  # Attribute mapping from ruby-style variable name to JSON key.
55
53
  def self.attribute_map
56
54
  {
57
- :'organization_id' => :'organizationId',
58
55
  :'account_id' => :'accountId',
59
56
  :'user_id' => :'userId',
60
57
  :'created_at' => :'createdAt',
@@ -77,7 +74,6 @@ module Pingram
77
74
  # Attribute type mapping.
78
75
  def self.openapi_types
79
76
  {
80
- :'organization_id' => :'String',
81
77
  :'account_id' => :'String',
82
78
  :'user_id' => :'String',
83
79
  :'created_at' => :'String',
@@ -109,12 +105,6 @@ module Pingram
109
105
  h[k.to_sym] = v
110
106
  }
111
107
 
112
- if attributes.key?(:'organization_id')
113
- self.organization_id = attributes[:'organization_id']
114
- else
115
- self.organization_id = nil
116
- end
117
-
118
108
  if attributes.key?(:'account_id')
119
109
  self.account_id = attributes[:'account_id']
120
110
  else
@@ -155,10 +145,6 @@ module Pingram
155
145
  def list_invalid_properties
156
146
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
157
147
  invalid_properties = Array.new
158
- if @organization_id.nil?
159
- invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
160
- end
161
-
162
148
  if @account_id.nil?
163
149
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
164
150
  end
@@ -178,23 +164,12 @@ module Pingram
178
164
  # @return true if the model is valid
179
165
  def valid?
180
166
  warn '[DEPRECATED] the `valid?` method is obsolete'
181
- return false if @organization_id.nil?
182
167
  return false if @account_id.nil?
183
168
  return false if @user_id.nil?
184
169
  return false if @created_at.nil?
185
170
  true
186
171
  end
187
172
 
188
- # Custom attribute writer method with validation
189
- # @param [Object] organization_id Value to be assigned
190
- def organization_id=(organization_id)
191
- if organization_id.nil?
192
- fail ArgumentError, 'organization_id cannot be nil'
193
- end
194
-
195
- @organization_id = organization_id
196
- end
197
-
198
173
  # Custom attribute writer method with validation
199
174
  # @param [Object] account_id Value to be assigned
200
175
  def account_id=(account_id)
@@ -230,7 +205,6 @@ module Pingram
230
205
  def ==(o)
231
206
  return true if self.equal?(o)
232
207
  self.class == o.class &&
233
- organization_id == o.organization_id &&
234
208
  account_id == o.account_id &&
235
209
  user_id == o.user_id &&
236
210
  created_at == o.created_at &&
@@ -248,7 +222,7 @@ module Pingram
248
222
  # Calculates hash code according to all attributes.
249
223
  # @return [Integer] Hash code
250
224
  def hash
251
- [organization_id, account_id, user_id, created_at, email, groups, enabled_mfas].hash
225
+ [account_id, user_id, created_at, email, groups, enabled_mfas].hash
252
226
  end
253
227
 
254
228
  # Builds the object from hash
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # Query parameters for GET /organization/usage/history
17
+ # Query parameters for GET /account/usage/history
18
18
  class GetUsageHistoryQuery < ApiModelBase
19
19
  # Start date (YYYY-MM-DD) for the range
20
20
  attr_accessor :start_date
@@ -14,8 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # Response for GET /organization/usage/history
18
- class OrganizationUsageHistory < ApiModelBase
17
+ # Response for GET /account/usage/history
18
+ class GetUsageHistoryResponse < ApiModelBase
19
19
  # Array of usage items, one per month in the requested range
20
20
  attr_accessor :items
21
21
 
@@ -39,7 +39,7 @@ module Pingram
39
39
  # Attribute type mapping.
40
40
  def self.openapi_types
41
41
  {
42
- :'items' => :'Array<OrganizationUsageHistoryItemsInner>'
42
+ :'items' => :'Array<GetUsageHistoryResponseItemsInner>'
43
43
  }
44
44
  end
45
45
 
@@ -53,14 +53,14 @@ module Pingram
53
53
  # @param [Hash] attributes Model attributes in the form of hash
54
54
  def initialize(attributes = {})
55
55
  if (!attributes.is_a?(Hash))
56
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageHistory` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageHistoryResponse` initialize method"
57
57
  end
58
58
 
59
59
  # check to see if the attribute exists and convert string to symbol for hash key
60
60
  acceptable_attribute_map = self.class.acceptable_attribute_map
61
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
62
  if (!acceptable_attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageHistory`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageHistoryResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
64
  end
65
65
  h[k.to_sym] = v
66
66
  }
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  # Single usage item in historical response
18
- class OrganizationUsageHistoryItemsInner < ApiModelBase
18
+ class GetUsageHistoryResponseItemsInner < ApiModelBase
19
19
  # Year-month (YYYY-MM) for this usage period
20
20
  attr_accessor :year_month
21
21
 
@@ -43,7 +43,7 @@ module Pingram
43
43
  def self.openapi_types
44
44
  {
45
45
  :'year_month' => :'String',
46
- :'counts' => :'OrganizationUsageHistoryItemsInnerCounts'
46
+ :'counts' => :'GetUsageHistoryResponseItemsInnerCounts'
47
47
  }
48
48
  end
49
49
 
@@ -57,14 +57,14 @@ module Pingram
57
57
  # @param [Hash] attributes Model attributes in the form of hash
58
58
  def initialize(attributes = {})
59
59
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageHistoryItemsInner` initialize method"
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageHistoryResponseItemsInner` initialize method"
61
61
  end
62
62
 
63
63
  # check to see if the attribute exists and convert string to symbol for hash key
64
64
  acceptable_attribute_map = self.class.acceptable_attribute_map
65
65
  attributes = attributes.each_with_object({}) { |(k, v), h|
66
66
  if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageHistoryItemsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageHistoryResponseItemsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
68
  end
69
69
  h[k.to_sym] = v
70
70
  }
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- class OrganizationUsageHistoryItemsInnerCounts < ApiModelBase
17
+ class GetUsageHistoryResponseItemsInnerCounts < ApiModelBase
18
18
  attr_accessor :email
19
19
 
20
20
  attr_accessor :inapp_web
@@ -79,14 +79,14 @@ module Pingram
79
79
  # @param [Hash] attributes Model attributes in the form of hash
80
80
  def initialize(attributes = {})
81
81
  if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageHistoryItemsInnerCounts` initialize method"
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageHistoryResponseItemsInnerCounts` initialize method"
83
83
  end
84
84
 
85
85
  # check to see if the attribute exists and convert string to symbol for hash key
86
86
  acceptable_attribute_map = self.class.acceptable_attribute_map
87
87
  attributes = attributes.each_with_object({}) { |(k, v), h|
88
88
  if (!acceptable_attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageHistoryItemsInnerCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageHistoryResponseItemsInnerCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
90
  end
91
91
  h[k.to_sym] = v
92
92
  }
@@ -14,8 +14,8 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Pingram
17
- # Response for GET /account/organization/usage
18
- class OrganizationUsage < ApiModelBase
17
+ # Response for GET /account/usage
18
+ class GetUsageResponse < ApiModelBase
19
19
  attr_accessor :costs
20
20
 
21
21
  attr_accessor :counts
@@ -49,8 +49,8 @@ module Pingram
49
49
  # Attribute type mapping.
50
50
  def self.openapi_types
51
51
  {
52
- :'costs' => :'OrganizationUsageCosts',
53
- :'counts' => :'OrganizationUsageCounts',
52
+ :'costs' => :'GetUsageResponseCosts',
53
+ :'counts' => :'GetUsageResponseCounts',
54
54
  :'billing_cycle_start' => :'String',
55
55
  :'billing_cycle_end' => :'String'
56
56
  }
@@ -66,14 +66,14 @@ module Pingram
66
66
  # @param [Hash] attributes Model attributes in the form of hash
67
67
  def initialize(attributes = {})
68
68
  if (!attributes.is_a?(Hash))
69
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsage` initialize method"
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageResponse` initialize method"
70
70
  end
71
71
 
72
72
  # check to see if the attribute exists and convert string to symbol for hash key
73
73
  acceptable_attribute_map = self.class.acceptable_attribute_map
74
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
75
75
  if (!acceptable_attribute_map.key?(k.to_sym))
76
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsage`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
77
  end
78
78
  h[k.to_sym] = v
79
79
  }
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  # Total costs for the billing cycle (all channel costs + number rent)
18
- class OrganizationUsageCosts < ApiModelBase
18
+ class GetUsageResponseCosts < ApiModelBase
19
19
  attr_accessor :number
20
20
 
21
21
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -52,14 +52,14 @@ module Pingram
52
52
  # @param [Hash] attributes Model attributes in the form of hash
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageCosts` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageResponseCosts` initialize method"
56
56
  end
57
57
 
58
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
59
  acceptable_attribute_map = self.class.acceptable_attribute_map
60
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
61
61
  if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageCosts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageResponseCosts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
63
  end
64
64
  h[k.to_sym] = v
65
65
  }
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  # Per-channel usage breakdown
18
- class OrganizationUsageCounts < ApiModelBase
18
+ class GetUsageResponseCounts < ApiModelBase
19
19
  attr_accessor :email
20
20
 
21
21
  attr_accessor :inapp_web
@@ -80,14 +80,14 @@ module Pingram
80
80
  # @param [Hash] attributes Model attributes in the form of hash
81
81
  def initialize(attributes = {})
82
82
  if (!attributes.is_a?(Hash))
83
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::OrganizationUsageCounts` initialize method"
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetUsageResponseCounts` initialize method"
84
84
  end
85
85
 
86
86
  # check to see if the attribute exists and convert string to symbol for hash key
87
87
  acceptable_attribute_map = self.class.acceptable_attribute_map
88
88
  attributes = attributes.each_with_object({}) { |(k, v), h|
89
89
  if (!acceptable_attribute_map.key?(k.to_sym))
90
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::OrganizationUsageCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetUsageResponseCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
91
  end
92
92
  h[k.to_sym] = v
93
93
  }
@@ -34,9 +34,6 @@ module Pingram
34
34
  # File attachments (by URL or inline base64 content). Inline `content`: ~4 MB raw per file (413 if exceeded). URL `url`: up to 20 MB per file.
35
35
  attr_accessor :attachments
36
36
 
37
- # Conditional expression for when to send (e.g. merge tag logic).
38
- attr_accessor :condition
39
-
40
37
  # Attribute mapping from ruby-style variable name to JSON key.
41
38
  def self.attribute_map
42
39
  {
@@ -45,8 +42,7 @@ module Pingram
45
42
  :'bcc_addresses' => :'bccAddresses',
46
43
  :'from_address' => :'fromAddress',
47
44
  :'from_name' => :'fromName',
48
- :'attachments' => :'attachments',
49
- :'condition' => :'condition'
45
+ :'attachments' => :'attachments'
50
46
  }
51
47
  end
52
48
 
@@ -68,8 +64,7 @@ module Pingram
68
64
  :'bcc_addresses' => :'Array<String>',
69
65
  :'from_address' => :'String',
70
66
  :'from_name' => :'String',
71
- :'attachments' => :'Array<SenderPostBodyOptionsEmailAttachmentsInner>',
72
- :'condition' => :'String'
67
+ :'attachments' => :'Array<SenderPostBodyOptionsEmailAttachmentsInner>'
73
68
  }
74
69
  end
75
70
 
@@ -126,10 +121,6 @@ module Pingram
126
121
  self.attachments = value
127
122
  end
128
123
  end
129
-
130
- if attributes.key?(:'condition')
131
- self.condition = attributes[:'condition']
132
- end
133
124
  end
134
125
 
135
126
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -157,8 +148,7 @@ module Pingram
157
148
  bcc_addresses == o.bcc_addresses &&
158
149
  from_address == o.from_address &&
159
150
  from_name == o.from_name &&
160
- attachments == o.attachments &&
161
- condition == o.condition
151
+ attachments == o.attachments
162
152
  end
163
153
 
164
154
  # @see the `==` method
@@ -170,7 +160,7 @@ module Pingram
170
160
  # Calculates hash code according to all attributes.
171
161
  # @return [Integer] Hash code
172
162
  def hash
173
- [reply_to_addresses, cc_addresses, bcc_addresses, from_address, from_name, attachments, condition].hash
163
+ [reply_to_addresses, cc_addresses, bcc_addresses, from_address, from_name, attachments].hash
174
164
  end
175
165
 
176
166
  # Builds the object from hash