paid_ruby 0.1.0 → 0.1.1

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: 0c2cc435a3cbb67bf93ad28e23dec59285d96a02cf2670a8fed1f8d7249703fb
4
- data.tar.gz: 80e63a017a128c9645e1bb939984253f886dc731f9c2795a42dc77ed20708419
3
+ metadata.gz: e08b12d8087ea612ca1b405c5d6cfa6fab4374f4f89ad81df1a7042b31206c72
4
+ data.tar.gz: 7dd1f1ef4c71fe4dd19d3c34e6eacd051a95087b74ec5be2f610efe9608e2a55
5
5
  SHA512:
6
- metadata.gz: 18d335c77bc4eaf2055888ed8e2ffa72a8d1c357303f3edb9b4a3d24eb6aaf9394f6d068e083dac4819cf465250b6f636d6d04857c21cb1561e11883c61f91f5
7
- data.tar.gz: 504f1bc8b2d4e90bcacf7deda7b17028d6bb5965b56bab6f2a300732d8f7ce9d2268d4dca144d9a4a016282ab26feb1a6fec093bd5def1c5b9fbb87f4fb302f7
6
+ metadata.gz: 6eed37d4f15ac6939c644a4c7db14fbcaeb3d5e9e67d16b983d3060790f0daeb6054b1e5beb0241470bdaeca393bdc119503dc2ffd893272e9d522c62031059c
7
+ data.tar.gz: 931419aa3d4767c1df1f7c0ca332db5e629b73f7d38b3f8cdc61463626c726476ac89f327434ecd08bebdc631c8dbcc726484b925a6d4f3a821695b5220a4684
data/lib/gemconfig.rb CHANGED
@@ -6,8 +6,8 @@ module Paid
6
6
  EMAIL = ""
7
7
  SUMMARY = ""
8
8
  DESCRIPTION = ""
9
- HOMEPAGE = "https://github.com/AgentPaid/paid-ruby"
10
- SOURCE_CODE_URI = "https://github.com/AgentPaid/paid-ruby"
11
- CHANGELOG_URI = "https://github.com/AgentPaid/paid-ruby/blob/master/CHANGELOG.md"
9
+ HOMEPAGE = "https://github.com/paid-ai/paid-ruby"
10
+ SOURCE_CODE_URI = "https://github.com/paid-ai/paid-ruby"
11
+ CHANGELOG_URI = "https://github.com/paid-ai/paid-ruby/blob/master/CHANGELOG.md"
12
12
  end
13
13
  end
@@ -7,6 +7,10 @@ module Paid
7
7
  class ApiError
8
8
  # @return [String] A human-readable message providing more details about the error.
9
9
  attr_reader :message
10
+ # @return [String]
11
+ attr_reader :code
12
+ # @return [String]
13
+ attr_reader :details
10
14
  # @return [OpenStruct] Additional properties unmapped to the current class definition
11
15
  attr_reader :additional_properties
12
16
  # @return [Object]
@@ -16,12 +20,16 @@ module Paid
16
20
  OMIT = Object.new
17
21
 
18
22
  # @param message [String] A human-readable message providing more details about the error.
23
+ # @param code [String]
24
+ # @param details [String]
19
25
  # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
20
26
  # @return [Paid::ApiError]
21
- def initialize(message: OMIT, additional_properties: nil)
27
+ def initialize(message: OMIT, code: OMIT, details: OMIT, additional_properties: nil)
22
28
  @message = message if message != OMIT
29
+ @code = code if code != OMIT
30
+ @details = details if details != OMIT
23
31
  @additional_properties = additional_properties
24
- @_field_set = { "message": message }.reject do | _k, v |
32
+ @_field_set = { "message": message, "code": code, "details": details }.reject do | _k, v |
25
33
  v == OMIT
26
34
  end
27
35
  end
@@ -33,7 +41,14 @@ end
33
41
  struct = JSON.parse(json_object, object_class: OpenStruct)
34
42
  parsed_json = JSON.parse(json_object)
35
43
  message = parsed_json["message"]
36
- new(message: message, additional_properties: struct)
44
+ code = parsed_json["code"]
45
+ details = parsed_json["details"]
46
+ new(
47
+ message: message,
48
+ code: code,
49
+ details: details,
50
+ additional_properties: struct
51
+ )
37
52
  end
38
53
  # Serialize an instance of ApiError to a JSON object
39
54
  #
@@ -49,6 +64,8 @@ end
49
64
  # @return [Void]
50
65
  def self.validate_raw(obj:)
51
66
  obj.message&.is_a?(String) != false || raise("Passed value for field obj.message is not the expected type, validation failed.")
67
+ obj.code&.is_a?(String) != false || raise("Passed value for field obj.code is not the expected type, validation failed.")
68
+ obj.details&.is_a?(String) != false || raise("Passed value for field obj.details is not the expected type, validation failed.")
52
69
  end
53
70
  end
54
71
  end
data/lib/requests.rb CHANGED
@@ -47,7 +47,7 @@ end
47
47
  end
48
48
  # @return [Hash{String => String}]
49
49
  def get_headers
50
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.0' }
50
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1' }
51
51
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
52
52
  headers
53
53
  end
@@ -92,7 +92,7 @@ end
92
92
  end
93
93
  # @return [Hash{String => String}]
94
94
  def get_headers
95
- headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.0' }
95
+ headers = { "X-Fern-Language": 'Ruby', "X-Fern-SDK-Name": 'paid_ruby', "X-Fern-SDK-Version": '0.1.1' }
96
96
  headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless @token.nil?
97
97
  headers
98
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-06-09 00:00:00.000000000 Z
11
+ date: 2025-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -135,12 +135,12 @@ files:
135
135
  - lib/paid_ruby/usage/client.rb
136
136
  - lib/requests.rb
137
137
  - lib/types_export.rb
138
- homepage: https://github.com/AgentPaid/paid-ruby
138
+ homepage: https://github.com/paid-ai/paid-ruby
139
139
  licenses: []
140
140
  metadata:
141
- homepage_uri: https://github.com/AgentPaid/paid-ruby
142
- source_code_uri: https://github.com/AgentPaid/paid-ruby
143
- changelog_uri: https://github.com/AgentPaid/paid-ruby/blob/master/CHANGELOG.md
141
+ homepage_uri: https://github.com/paid-ai/paid-ruby
142
+ source_code_uri: https://github.com/paid-ai/paid-ruby
143
+ changelog_uri: https://github.com/paid-ai/paid-ruby/blob/master/CHANGELOG.md
144
144
  post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths: