rcs 1.0.12 → 1.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rcs/types/payment_required_error_body.rb +57 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.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: 0c4f938dc057c065a3e19738b32076a7e3de1353bee63a576a2ef4e94aa251ab
|
4
|
+
data.tar.gz: 9b0fc9bd3deb8dcea98e657fb371ebe928cd6af1f298289527a6897e7265cca1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b513da94e38a7e598888ae5863791c80ccea156752007722a53ea2a6d40696810677c5b059c2649ce28e6692a430106530ca13f32075ce4469b41181c69904ae
|
7
|
+
data.tar.gz: 8102cbb7de42d81b5bda3758f468a8650eb13f8677a3e0b28a17da3e03541444e450716c55796609a48d394524de3e50cc5de588a2a530618d513ce407d759ec
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module Pinnacle
|
7
|
+
class PaymentRequiredErrorBody
|
8
|
+
# @return [Array<String>]
|
9
|
+
attr_reader :errors
|
10
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
11
|
+
attr_reader :additional_properties
|
12
|
+
# @return [Object]
|
13
|
+
attr_reader :_field_set
|
14
|
+
protected :_field_set
|
15
|
+
|
16
|
+
OMIT = Object.new
|
17
|
+
|
18
|
+
# @param errors [Array<String>]
|
19
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
20
|
+
# @return [Pinnacle::PaymentRequiredErrorBody]
|
21
|
+
def initialize(errors: OMIT, additional_properties: nil)
|
22
|
+
@errors = errors if errors != OMIT
|
23
|
+
@additional_properties = additional_properties
|
24
|
+
@_field_set = { "errors": errors }.reject do |_k, v|
|
25
|
+
v == OMIT
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Deserialize a JSON object to an instance of PaymentRequiredErrorBody
|
30
|
+
#
|
31
|
+
# @param json_object [String]
|
32
|
+
# @return [Pinnacle::PaymentRequiredErrorBody]
|
33
|
+
def self.from_json(json_object:)
|
34
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
35
|
+
parsed_json = JSON.parse(json_object)
|
36
|
+
errors = parsed_json["errors"]
|
37
|
+
new(errors: errors, additional_properties: struct)
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serialize an instance of PaymentRequiredErrorBody to a JSON object
|
41
|
+
#
|
42
|
+
# @return [String]
|
43
|
+
def to_json(*_args)
|
44
|
+
@_field_set&.to_json
|
45
|
+
end
|
46
|
+
|
47
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
48
|
+
# hash and check each fields type against the current object's property
|
49
|
+
# definitions.
|
50
|
+
#
|
51
|
+
# @param obj [Object]
|
52
|
+
# @return [Void]
|
53
|
+
def self.validate_raw(obj:)
|
54
|
+
obj.errors&.is_a?(Array) != false || raise("Passed value for field obj.errors is not the expected type, validation failed.")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module Pinnacle
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.13" }
|
47
47
|
headers["PINNACLE-API-Key"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module Pinnacle
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.13" }
|
91
91
|
headers["PINNACLE-API-Key"] = ((@api_key.is_a? Method) ? @api_key.call : @api_key) unless @api_key.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -11,6 +11,7 @@ require_relative "rcs/send/types/send_mms_response"
|
|
11
11
|
require_relative "rcs/types/bad_request_error_body"
|
12
12
|
require_relative "rcs/types/unauthorized_error_body"
|
13
13
|
require_relative "rcs/types/internal_server_error_body"
|
14
|
+
require_relative "rcs/types/payment_required_error_body"
|
14
15
|
require_relative "rcs/types/forbidden_error_body"
|
15
16
|
require_relative "rcs/types/rcs_functionalities"
|
16
17
|
require_relative "rcs/types/company_additional_websites_item"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/rcs/types/forbidden_error_body.rb
|
127
127
|
- lib/rcs/types/internal_server_error_body.rb
|
128
128
|
- lib/rcs/types/optionals.rb
|
129
|
+
- lib/rcs/types/payment_required_error_body.rb
|
129
130
|
- lib/rcs/types/point_of_contact.rb
|
130
131
|
- lib/rcs/types/rcs_functionalities.rb
|
131
132
|
- lib/rcs/types/unauthorized_error_body.rb
|