pingram 1.0.29 → 1.0.30
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 +66 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/account_get_response.rb +14 -4
- data/lib/pingram/models/account_patch_request.rb +149 -0
- data/lib/pingram/models/billing_post_response_body.rb +11 -1
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b060d82b88d28f53793bd5088b8365bd2b1156c99003032087ff4f7356cde479
|
|
4
|
+
data.tar.gz: 4c141e3cf23edf0e18a7651746164f869464144116fd31ebc7a738b504ad7130
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c22df0d321c8c8c006c9c5d6d4cf8defd9ecec06365b3fcdcfd975bce559f63af363dd57291b1589e9c3a11297cc44e4fb545a119ce522f021bee38bedf096b
|
|
7
|
+
data.tar.gz: 0fda0509597950d768dc479f71a60b13dc0bd2ba68e76640b2160ddec58f57d526d2d2a0335feb0c12b45cef63a0198761c1bed891052628c04426dfcd0c9bbf
|
data/Gemfile.lock
CHANGED
|
@@ -630,5 +630,71 @@ module Pingram
|
|
|
630
630
|
end
|
|
631
631
|
return data, status_code, headers
|
|
632
632
|
end
|
|
633
|
+
|
|
634
|
+
# Update account billing preferences. Only account owners can change these settings.
|
|
635
|
+
# @param account_patch_request [AccountPatchRequest]
|
|
636
|
+
# @param [Hash] opts the optional parameters
|
|
637
|
+
# @return [AccountGetResponse]
|
|
638
|
+
def account_update_account_settings(account_patch_request, opts = {})
|
|
639
|
+
data, _status_code, _headers = account_update_account_settings_with_http_info(account_patch_request, opts)
|
|
640
|
+
data
|
|
641
|
+
end
|
|
642
|
+
|
|
643
|
+
# Update account billing preferences. Only account owners can change these settings.
|
|
644
|
+
# @param account_patch_request [AccountPatchRequest]
|
|
645
|
+
# @param [Hash] opts the optional parameters
|
|
646
|
+
# @return [Array<(AccountGetResponse, Integer, Hash)>] AccountGetResponse data, response status code and response headers
|
|
647
|
+
def account_update_account_settings_with_http_info(account_patch_request, opts = {})
|
|
648
|
+
if @api_client.config.debugging
|
|
649
|
+
@api_client.config.logger.debug 'Calling API: AccountApi.account_update_account_settings ...'
|
|
650
|
+
end
|
|
651
|
+
# verify the required parameter 'account_patch_request' is set
|
|
652
|
+
if @api_client.config.client_side_validation && account_patch_request.nil?
|
|
653
|
+
fail ArgumentError, "Missing the required parameter 'account_patch_request' when calling AccountApi.account_update_account_settings"
|
|
654
|
+
end
|
|
655
|
+
# resource path
|
|
656
|
+
local_var_path = '/account'
|
|
657
|
+
|
|
658
|
+
# query parameters
|
|
659
|
+
query_params = opts[:query_params] || {}
|
|
660
|
+
|
|
661
|
+
# header parameters
|
|
662
|
+
header_params = opts[:header_params] || {}
|
|
663
|
+
# HTTP header 'Accept' (if needed)
|
|
664
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
665
|
+
# HTTP header 'Content-Type'
|
|
666
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
667
|
+
if !content_type.nil?
|
|
668
|
+
header_params['Content-Type'] = content_type
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# form parameters
|
|
672
|
+
form_params = opts[:form_params] || {}
|
|
673
|
+
|
|
674
|
+
# http body (model)
|
|
675
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(account_patch_request)
|
|
676
|
+
|
|
677
|
+
# return_type
|
|
678
|
+
return_type = opts[:debug_return_type] || 'AccountGetResponse'
|
|
679
|
+
|
|
680
|
+
# auth_names (apiKey last so Bearer wins when multiple schemes set Authorization)
|
|
681
|
+
auth_names = opts[:debug_auth_names] || ['endUserHashed', 'endUser', 'clientCredentials', 'apiKey']
|
|
682
|
+
|
|
683
|
+
new_options = opts.merge(
|
|
684
|
+
:operation => :"AccountApi.account_update_account_settings",
|
|
685
|
+
:header_params => header_params,
|
|
686
|
+
:query_params => query_params,
|
|
687
|
+
:form_params => form_params,
|
|
688
|
+
:body => post_body,
|
|
689
|
+
:auth_names => auth_names,
|
|
690
|
+
:return_type => return_type
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
694
|
+
if @api_client.config.debugging
|
|
695
|
+
@api_client.config.logger.debug "API called: AccountApi#account_update_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
696
|
+
end
|
|
697
|
+
return data, status_code, headers
|
|
698
|
+
end
|
|
633
699
|
end
|
|
634
700
|
end
|
data/lib/pingram/api_client.rb
CHANGED
|
@@ -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.
|
|
35
|
+
@user_agent = "pingram-ruby/1.0.30"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -52,6 +52,9 @@ module Pingram
|
|
|
52
52
|
|
|
53
53
|
attr_accessor :pending_downgrade_account_type
|
|
54
54
|
|
|
55
|
+
# When true, paid accounts move up one budget tier at 90% of the monthly budget.
|
|
56
|
+
attr_accessor :auto_upgrade
|
|
57
|
+
|
|
55
58
|
class EnumAttributeValidator
|
|
56
59
|
attr_reader :datatype
|
|
57
60
|
attr_reader :allowable_values
|
|
@@ -93,7 +96,8 @@ module Pingram
|
|
|
93
96
|
:'subscription_status' => :'subscriptionStatus',
|
|
94
97
|
:'pending_downgrade_effective_date' => :'pendingDowngradeEffectiveDate',
|
|
95
98
|
:'pending_downgrade_cost_cap' => :'pendingDowngradeCostCap',
|
|
96
|
-
:'pending_downgrade_account_type' => :'pendingDowngradeAccountType'
|
|
99
|
+
:'pending_downgrade_account_type' => :'pendingDowngradeAccountType',
|
|
100
|
+
:'auto_upgrade' => :'autoUpgrade'
|
|
97
101
|
}
|
|
98
102
|
end
|
|
99
103
|
|
|
@@ -126,7 +130,8 @@ module Pingram
|
|
|
126
130
|
:'subscription_status' => :'String',
|
|
127
131
|
:'pending_downgrade_effective_date' => :'String',
|
|
128
132
|
:'pending_downgrade_cost_cap' => :'Float',
|
|
129
|
-
:'pending_downgrade_account_type' => :'String'
|
|
133
|
+
:'pending_downgrade_account_type' => :'String',
|
|
134
|
+
:'auto_upgrade' => :'Boolean'
|
|
130
135
|
}
|
|
131
136
|
end
|
|
132
137
|
|
|
@@ -234,6 +239,10 @@ module Pingram
|
|
|
234
239
|
if attributes.key?(:'pending_downgrade_account_type')
|
|
235
240
|
self.pending_downgrade_account_type = attributes[:'pending_downgrade_account_type']
|
|
236
241
|
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'auto_upgrade')
|
|
244
|
+
self.auto_upgrade = attributes[:'auto_upgrade']
|
|
245
|
+
end
|
|
237
246
|
end
|
|
238
247
|
|
|
239
248
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -427,7 +436,8 @@ module Pingram
|
|
|
427
436
|
subscription_status == o.subscription_status &&
|
|
428
437
|
pending_downgrade_effective_date == o.pending_downgrade_effective_date &&
|
|
429
438
|
pending_downgrade_cost_cap == o.pending_downgrade_cost_cap &&
|
|
430
|
-
pending_downgrade_account_type == o.pending_downgrade_account_type
|
|
439
|
+
pending_downgrade_account_type == o.pending_downgrade_account_type &&
|
|
440
|
+
auto_upgrade == o.auto_upgrade
|
|
431
441
|
end
|
|
432
442
|
|
|
433
443
|
# @see the `==` method
|
|
@@ -439,7 +449,7 @@ module Pingram
|
|
|
439
449
|
# Calculates hash code according to all attributes.
|
|
440
450
|
# @return [Integer] Hash code
|
|
441
451
|
def hash
|
|
442
|
-
[account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, created_at, updated_at, status, subscription_status, pending_downgrade_effective_date, pending_downgrade_cost_cap, pending_downgrade_account_type].hash
|
|
452
|
+
[account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, created_at, updated_at, status, subscription_status, pending_downgrade_effective_date, pending_downgrade_cost_cap, pending_downgrade_account_type, auto_upgrade].hash
|
|
443
453
|
end
|
|
444
454
|
|
|
445
455
|
# Builds the object from hash
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
# PATCH /account request: billing preferences.
|
|
18
|
+
class AccountPatchRequest < ApiModelBase
|
|
19
|
+
# When true, automatically move up one budget tier at 90% of the monthly budget.
|
|
20
|
+
attr_accessor :auto_upgrade
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'auto_upgrade' => :'autoUpgrade'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
|
35
|
+
def self.acceptable_attributes
|
|
36
|
+
acceptable_attribute_map.values
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.openapi_types
|
|
41
|
+
{
|
|
42
|
+
:'auto_upgrade' => :'Boolean'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AccountPatchRequest` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AccountPatchRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'auto_upgrade')
|
|
69
|
+
self.auto_upgrade = attributes[:'auto_upgrade']
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
auto_upgrade == o.auto_upgrade
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[auto_upgrade].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Returns the object in the form of hash
|
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
|
133
|
+
def to_hash
|
|
134
|
+
hash = {}
|
|
135
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
136
|
+
value = self.send(attr)
|
|
137
|
+
if value.nil?
|
|
138
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
139
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
hash[param] = _to_hash(value)
|
|
143
|
+
end
|
|
144
|
+
hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
end
|
|
@@ -52,6 +52,9 @@ module Pingram
|
|
|
52
52
|
|
|
53
53
|
attr_accessor :pending_downgrade_account_type
|
|
54
54
|
|
|
55
|
+
# When true, paid accounts move up one budget tier at 90% of the monthly budget.
|
|
56
|
+
attr_accessor :auto_upgrade
|
|
57
|
+
|
|
55
58
|
attr_accessor :session_id
|
|
56
59
|
|
|
57
60
|
attr_accessor :url
|
|
@@ -98,6 +101,7 @@ module Pingram
|
|
|
98
101
|
:'pending_downgrade_effective_date' => :'pendingDowngradeEffectiveDate',
|
|
99
102
|
:'pending_downgrade_cost_cap' => :'pendingDowngradeCostCap',
|
|
100
103
|
:'pending_downgrade_account_type' => :'pendingDowngradeAccountType',
|
|
104
|
+
:'auto_upgrade' => :'autoUpgrade',
|
|
101
105
|
:'session_id' => :'sessionId',
|
|
102
106
|
:'url' => :'url'
|
|
103
107
|
}
|
|
@@ -133,6 +137,7 @@ module Pingram
|
|
|
133
137
|
:'pending_downgrade_effective_date' => :'String',
|
|
134
138
|
:'pending_downgrade_cost_cap' => :'Float',
|
|
135
139
|
:'pending_downgrade_account_type' => :'String',
|
|
140
|
+
:'auto_upgrade' => :'Boolean',
|
|
136
141
|
:'session_id' => :'String',
|
|
137
142
|
:'url' => :'String'
|
|
138
143
|
}
|
|
@@ -243,6 +248,10 @@ module Pingram
|
|
|
243
248
|
self.pending_downgrade_account_type = attributes[:'pending_downgrade_account_type']
|
|
244
249
|
end
|
|
245
250
|
|
|
251
|
+
if attributes.key?(:'auto_upgrade')
|
|
252
|
+
self.auto_upgrade = attributes[:'auto_upgrade']
|
|
253
|
+
end
|
|
254
|
+
|
|
246
255
|
if attributes.key?(:'session_id')
|
|
247
256
|
self.session_id = attributes[:'session_id']
|
|
248
257
|
end
|
|
@@ -444,6 +453,7 @@ module Pingram
|
|
|
444
453
|
pending_downgrade_effective_date == o.pending_downgrade_effective_date &&
|
|
445
454
|
pending_downgrade_cost_cap == o.pending_downgrade_cost_cap &&
|
|
446
455
|
pending_downgrade_account_type == o.pending_downgrade_account_type &&
|
|
456
|
+
auto_upgrade == o.auto_upgrade &&
|
|
447
457
|
session_id == o.session_id &&
|
|
448
458
|
url == o.url
|
|
449
459
|
end
|
|
@@ -457,7 +467,7 @@ module Pingram
|
|
|
457
467
|
# Calculates hash code according to all attributes.
|
|
458
468
|
# @return [Integer] Hash code
|
|
459
469
|
def hash
|
|
460
|
-
[account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, created_at, updated_at, status, subscription_status, pending_downgrade_effective_date, pending_downgrade_cost_cap, pending_downgrade_account_type, session_id, url].hash
|
|
470
|
+
[account_id, account_type, creator, name, messages_cap, cost_cap, sms_cap, call_cap, billing_version, anniversary_date, created_at, updated_at, status, subscription_status, pending_downgrade_effective_date, pending_downgrade_cost_cap, pending_downgrade_account_type, auto_upgrade, session_id, url].hash
|
|
461
471
|
end
|
|
462
472
|
|
|
463
473
|
# Builds the object from hash
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -25,6 +25,7 @@ require 'pingram/models/accept_invite_response'
|
|
|
25
25
|
require 'pingram/models/account_addresses_response'
|
|
26
26
|
require 'pingram/models/account_addresses_response_addresses_inner'
|
|
27
27
|
require 'pingram/models/account_get_response'
|
|
28
|
+
require 'pingram/models/account_patch_request'
|
|
28
29
|
require 'pingram/models/address_response'
|
|
29
30
|
require 'pingram/models/api_error_body'
|
|
30
31
|
require 'pingram/models/api_error_response'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.30
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pingram
|
|
@@ -98,6 +98,7 @@ files:
|
|
|
98
98
|
- lib/pingram/models/account_addresses_response.rb
|
|
99
99
|
- lib/pingram/models/account_addresses_response_addresses_inner.rb
|
|
100
100
|
- lib/pingram/models/account_get_response.rb
|
|
101
|
+
- lib/pingram/models/account_patch_request.rb
|
|
101
102
|
- lib/pingram/models/address_response.rb
|
|
102
103
|
- lib/pingram/models/api_error_body.rb
|
|
103
104
|
- lib/pingram/models/api_error_response.rb
|