zernio-sdk 0.0.973 → 0.0.974

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 515d0a7f6ab46a0ae5d2b5da78eb186758e56d361d52533944ba9da805bce0e2
4
- data.tar.gz: 174b2f475009dcce2521c1ba3a3e7ceeb6fe13e3e33607de71f9a9e376754acd
3
+ metadata.gz: b06be96e53178030e10e8786885bff3126870823674af0c03b26adb53c9acf15
4
+ data.tar.gz: e75d3b236e61a96cb13dfa07e2ed37cf6d17ddc0837caa296f6f9e406fe6582c
5
5
  SHA512:
6
- metadata.gz: 8763c5942fd46ed765b2e782299080d6b58bda5898059114076e581d35d59d04fc67c605b3e7d40cdb463e75fe3a5eea0a999fb86d2433939644a81de35c9265
7
- data.tar.gz: dbe79a28d96ab8ecf5f47897fbfe28dd30d7a8ffaca502986b2e5c6d7cc5eea0780490a527682ba7c2179cfa68d6db2d622bb6c19aadf5ed1314439980eaf9d8
6
+ metadata.gz: 330d932bcec27fbd7aa0e388fd10edbef33cfbd96e6377cb3c5d817d113e6b5ac8cc50957992f5c10ef4cbfb304eeaad992340ff836cfb7fa78fdeb41cdaa528
7
+ data.tar.gz: 963de1b4046425970af204d37b86f059ba10afa0f37ff063b3476fa06842b5837cdb26d362266176cd1bf215ddbfcc2b5430e2b66acb25046641a456b4040230
data/README.md CHANGED
@@ -2138,6 +2138,7 @@ Class | Method | HTTP request | Description
2138
2138
  - [Zernio::PurchasePhoneNumber200ResponseOneOf2](docs/PurchasePhoneNumber200ResponseOneOf2.md)
2139
2139
  - [Zernio::PurchasePhoneNumber202Response](docs/PurchasePhoneNumber202Response.md)
2140
2140
  - [Zernio::PurchasePhoneNumber409Response](docs/PurchasePhoneNumber409Response.md)
2141
+ - [Zernio::PurchasePhoneNumber503Response](docs/PurchasePhoneNumber503Response.md)
2141
2142
  - [Zernio::PurchasePhoneNumberRequest](docs/PurchasePhoneNumberRequest.md)
2142
2143
  - [Zernio::PurchaseWhatsAppPhoneNumber200Response](docs/PurchaseWhatsAppPhoneNumber200Response.md)
2143
2144
  - [Zernio::PurchaseWhatsAppPhoneNumber200ResponseOneOf](docs/PurchaseWhatsAppPhoneNumber200ResponseOneOf.md)
@@ -0,0 +1,20 @@
1
+ # Zernio::PurchasePhoneNumber503Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::PurchasePhoneNumber503Response.new(
16
+ error: null,
17
+ code: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,190 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.5.0
7
+ Contact: support@zernio.com
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 Zernio
17
+ class PurchasePhoneNumber503Response < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ attr_accessor :code
21
+
22
+ class EnumAttributeValidator
23
+ attr_reader :datatype
24
+ attr_reader :allowable_values
25
+
26
+ def initialize(datatype, allowable_values)
27
+ @allowable_values = allowable_values.map do |value|
28
+ case datatype.to_s
29
+ when /Integer/i
30
+ value.to_i
31
+ when /Float/i
32
+ value.to_f
33
+ else
34
+ value
35
+ end
36
+ end
37
+ end
38
+
39
+ def valid?(value)
40
+ !value || allowable_values.include?(value)
41
+ end
42
+ end
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+ :'error' => :'error',
48
+ :'code' => :'code'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'error' => :'String',
66
+ :'code' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::PurchasePhoneNumber503Response` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::PurchasePhoneNumber503Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'error')
93
+ self.error = attributes[:'error']
94
+ end
95
+
96
+ if attributes.key?(:'code')
97
+ self.code = attributes[:'code']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ warn '[DEPRECATED] the `valid?` method is obsolete'
113
+ code_validator = EnumAttributeValidator.new('String', ["CARRIER_UNAVAILABLE"])
114
+ return false unless code_validator.valid?(@code)
115
+ true
116
+ end
117
+
118
+ # Custom attribute writer method checking allowed values (enum).
119
+ # @param [Object] code Object to be assigned
120
+ def code=(code)
121
+ validator = EnumAttributeValidator.new('String', ["CARRIER_UNAVAILABLE"])
122
+ unless validator.valid?(code)
123
+ fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
124
+ end
125
+ @code = code
126
+ end
127
+
128
+ # Checks equality by comparing each attribute.
129
+ # @param [Object] Object to be compared
130
+ def ==(o)
131
+ return true if self.equal?(o)
132
+ self.class == o.class &&
133
+ error == o.error &&
134
+ code == o.code
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [error, code].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ end
189
+
190
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.973'
14
+ VERSION = '0.0.974'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -1349,6 +1349,7 @@ require 'zernio-sdk/models/purchase_phone_number200_response_one_of1_phone_numbe
1349
1349
  require 'zernio-sdk/models/purchase_phone_number200_response_one_of2'
1350
1350
  require 'zernio-sdk/models/purchase_phone_number202_response'
1351
1351
  require 'zernio-sdk/models/purchase_phone_number409_response'
1352
+ require 'zernio-sdk/models/purchase_phone_number503_response'
1352
1353
  require 'zernio-sdk/models/purchase_phone_number_request'
1353
1354
  require 'zernio-sdk/models/purchase_whats_app_phone_number200_response'
1354
1355
  require 'zernio-sdk/models/purchase_whats_app_phone_number200_response_one_of'
data/openapi.yaml CHANGED
@@ -37268,6 +37268,15 @@ paths:
37268
37268
  properties:
37269
37269
  error: { type: string }
37270
37270
  code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE, PHONE_NUMBER_UNAVAILABLE] }
37271
+ '503':
37272
+ description: 'The carrier could not take the order just now (code CARRIER_UNAVAILABLE); the number is not taken, retry the same request in a minute.'
37273
+ content:
37274
+ application/json:
37275
+ schema:
37276
+ type: object
37277
+ properties:
37278
+ error: { type: string }
37279
+ code: { type: string, enum: [CARRIER_UNAVAILABLE] }
37271
37280
  '202':
37272
37281
  description: Country requires end-user KYC before the number can be ordered.
37273
37282
  content:
@@ -37699,6 +37708,15 @@ paths:
37699
37708
  properties:
37700
37709
  error: { type: string }
37701
37710
  code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE, PHONE_NUMBER_UNAVAILABLE] }
37711
+ '503':
37712
+ description: 'The carrier could not take the order just now (code CARRIER_UNAVAILABLE); the number is not taken, retry the same request in a minute.'
37713
+ content:
37714
+ application/json:
37715
+ schema:
37716
+ type: object
37717
+ properties:
37718
+ error: { type: string }
37719
+ code: { type: string, enum: [CARRIER_UNAVAILABLE] }
37702
37720
  '202':
37703
37721
  description: Country requires end-user KYC before the number can be ordered.
37704
37722
  content:
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.5.0
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Zernio::PurchasePhoneNumber503Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::PurchasePhoneNumber503Response do
21
+ #let(:instance) { Zernio::PurchasePhoneNumber503Response.new }
22
+
23
+ describe 'test an instance of PurchasePhoneNumber503Response' do
24
+ it 'should create an instance of PurchasePhoneNumber503Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::PurchasePhoneNumber503Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "error"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "code"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["CARRIER_UNAVAILABLE"])
40
+ # validator.allowable_values.each do |value|
41
+ # expect { instance.code = value }.not_to raise_error
42
+ # end
43
+ end
44
+ end
45
+
46
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zernio-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.973
4
+ version: 0.0.974
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -1444,6 +1444,7 @@ files:
1444
1444
  - docs/PurchasePhoneNumber200ResponseOneOf2.md
1445
1445
  - docs/PurchasePhoneNumber202Response.md
1446
1446
  - docs/PurchasePhoneNumber409Response.md
1447
+ - docs/PurchasePhoneNumber503Response.md
1447
1448
  - docs/PurchasePhoneNumberRequest.md
1448
1449
  - docs/PurchaseWhatsAppPhoneNumber200Response.md
1449
1450
  - docs/PurchaseWhatsAppPhoneNumber200ResponseOneOf.md
@@ -3611,6 +3612,7 @@ files:
3611
3612
  - lib/zernio-sdk/models/purchase_phone_number200_response_one_of2.rb
3612
3613
  - lib/zernio-sdk/models/purchase_phone_number202_response.rb
3613
3614
  - lib/zernio-sdk/models/purchase_phone_number409_response.rb
3615
+ - lib/zernio-sdk/models/purchase_phone_number503_response.rb
3614
3616
  - lib/zernio-sdk/models/purchase_phone_number_request.rb
3615
3617
  - lib/zernio-sdk/models/purchase_whats_app_phone_number200_response.rb
3616
3618
  - lib/zernio-sdk/models/purchase_whats_app_phone_number200_response_one_of.rb
@@ -5749,6 +5751,7 @@ files:
5749
5751
  - spec/models/purchase_phone_number200_response_spec.rb
5750
5752
  - spec/models/purchase_phone_number202_response_spec.rb
5751
5753
  - spec/models/purchase_phone_number409_response_spec.rb
5754
+ - spec/models/purchase_phone_number503_response_spec.rb
5752
5755
  - spec/models/purchase_phone_number_request_spec.rb
5753
5756
  - spec/models/purchase_whats_app_phone_number200_response_one_of1_spec.rb
5754
5757
  - spec/models/purchase_whats_app_phone_number200_response_one_of_phone_number_spec.rb
@@ -7496,6 +7499,7 @@ test_files:
7496
7499
  - spec/models/create_contact200_response_contact_spec.rb
7497
7500
  - spec/models/send_inbox_message_request_location_spec.rb
7498
7501
  - spec/models/x_article_spec.rb
7502
+ - spec/models/purchase_phone_number503_response_spec.rb
7499
7503
  - spec/models/adjust_conversions_request_adjustments_inner_spec.rb
7500
7504
  - spec/models/get_calls_usage200_response_totals_spec.rb
7501
7505
  - spec/models/send_inbox_message_request_contacts_inner_phones_inner_spec.rb