rcs 1.0.12 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7bcabdc33fdbabdd3b7cfc7978a324d98e093c8a0b07d39114785fbab248fd60
4
- data.tar.gz: 7c1dd8ac26f8eca62e4c3a219cb5e1fc8d658ec61133251467a94daf5f13b525
3
+ metadata.gz: 7c64d425bcacc2baf86894e594e3e03d7227f5c7221ad06c944a90138011d5fe
4
+ data.tar.gz: c3f8a91fdfacd860df015784ec8d51af1c91c0913f68cffc12a9f064614215bf
5
5
  SHA512:
6
- metadata.gz: 9681f12bdeeab84a1a7e41be608aea3b3ca9c5c978aea029218ec5d91e0f1db9eb5bceab473249acc28b82dd8d5b016302f57d61d1e322b22978ca11b5a3b33b
7
- data.tar.gz: a6b0153c40257cc2e1443cd4247c0cb572014dae19f970e70eb569c031018a7ee6f2d8e9d3ee8baec18b7c0c9b3711a7b387e497a0a638ef1e04f196152201f7
6
+ metadata.gz: 50f8276cace3809d5a71d693115c584a68261e36970e46365124d6690d6aecdcbfff0cf67ecf661da9f3d82fc8ade6237e3b173bcf85a367453ed30167f75287
7
+ data.tar.gz: e9f306e9917eaa8afd72388d7a0a46e83eced1d1e7da446a20ea9c4289c25a1e5fd1a2e78cb829b96a7ccdc77ad028f5a676201470b804960ea7d6c4a7508200
@@ -11,7 +11,7 @@ module Pinnacle
11
11
  attr_reader :title
12
12
  # @return [Pinnacle::ActionType] Type of action for the button. 'openUrl' opens a URL, 'call' dials a phone
13
13
  # number, 'trigger' sends the predefined payload to the webhook when pressed,
14
- # 'requestLocation' requests the user's location, 'scheduleEvent' creates a
14
+ # 'requestUserLocation' requests the user's location, 'scheduleEvent' creates a
15
15
  # calendar event, 'sendLocation' sends a location.
16
16
  attr_reader :type
17
17
  # @return [String] Optional payload associated with the action. This payload encodes the respective
@@ -46,7 +46,7 @@ module Pinnacle
46
46
  # @param title [String] Title of the action (must be less than 25 characters).
47
47
  # @param type [Pinnacle::ActionType] Type of action for the button. 'openUrl' opens a URL, 'call' dials a phone
48
48
  # number, 'trigger' sends the predefined payload to the webhook when pressed,
49
- # 'requestLocation' requests the user's location, 'scheduleEvent' creates a
49
+ # 'requestUserLocation' requests the user's location, 'scheduleEvent' creates a
50
50
  # calendar event, 'sendLocation' sends a location.
51
51
  # @param payload [String] Optional payload associated with the action. This payload encodes the respective
52
52
  # fields for the action type and is required. For 'openUrl', the payload is the
@@ -3,13 +3,13 @@
3
3
  module Pinnacle
4
4
  # Type of action for the button. 'openUrl' opens a URL, 'call' dials a phone
5
5
  # number, 'trigger' sends the predefined payload to the webhook when pressed,
6
- # 'requestLocation' requests the user's location, 'scheduleEvent' creates a
6
+ # 'requestUserLocation' requests the user's location, 'scheduleEvent' creates a
7
7
  # calendar event, 'sendLocation' sends a location.
8
8
  class ActionType
9
9
  OPEN_URL = "openUrl"
10
10
  CALL = "call"
11
11
  TRIGGER = "trigger"
12
- REQUEST_LOCATION = "requestLocation"
12
+ REQUEST_USER_LOCATION = "requestUserLocation"
13
13
  SCHEDULE_EVENT = "scheduleEvent"
14
14
  SEND_LOCATION = "sendLocation"
15
15
  end
@@ -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.12" }
46
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.14" }
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.12" }
90
+ headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "rcs", "X-Fern-SDK-Version": "1.0.14" }
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.12
4
+ version: 1.0.14
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