candidhealth 0.19.0 → 0.19.1.pre.6de2b0d

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: e492b95159333e559584834efc346ede4d645fb9f4a121f5bcd9d6f3477f84a1
4
- data.tar.gz: cd48bd53a9b70abde90001e5ad46af279b82bc1809cb0804082d3792066f58c8
3
+ metadata.gz: 793252ca4daa7586c13132c62e5c8358ba764bccd9c7f0c58119abacf116bfa7
4
+ data.tar.gz: 90ad15dad0a9f420ffbb36d422e9448f15c2df6702c2b0b0ac19339225ced3d6
5
5
  SHA512:
6
- metadata.gz: e2d7f02a1bad2064c0d3c104f247a51643eb7c66056e4ddf09664268be6f6c27321e6f71b3b382ddfea63109f59537c56eb160073b8c37f5d605dfdf433368e5
7
- data.tar.gz: 6c91c314676ab0b6a74c172c6c4ef1bacf45a7d395aa84b6617db568f3f48ca217aae619c0a5b133cf0fe4485c353b4c68aa03c252193ce8d44ff9b9e709b870
6
+ metadata.gz: f67737e90de29e05858644ed7ffb54663d6dbb23dac2dcab896c3b6c9b31db00387616d006209dce5aa4dea924d72fac4859bb15468b3b840b51000708c2e7f8
7
+ data.tar.gz: f64c9440c49927a37caddf29cd567184c6ed92a806500300545680eecba0059fec8b59045ba215196b106851e6b946a885bb674b7d9dc4b382632979a0e61205
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "../../../requests"
4
- require_relative "types/auth_get_token_request"
5
4
  require_relative "types/auth_get_token_response"
6
5
  require "async"
7
6
 
@@ -30,17 +29,20 @@ module CandidApiClient
30
29
  # The bearer token expires 5 hours after it has been created. After it has expired, the client will receive an "HTTP 401
31
30
  # Unauthorized" error, at which point the client should generate a new token. It is important that tokens be reused between requests; if the client attempts to generate a token too often, it will be rate-limited and will receive an "HTTP 429 Too Many Requests" error.
32
31
  #
33
- # @param request [Hash] Request of type Auth::V2::AuthGetTokenRequest, as a Hash
34
- # * :client_id (String)
35
- # * :client_secret (String)
32
+ # @param client_id [String] Your application's Client ID.
33
+ # @param client_secret [String] Your application's Client Secret.
36
34
  # @param request_options [RequestOptions]
37
35
  # @return [Auth::V2::AuthGetTokenResponse]
38
- def get_token(request:, request_options: nil)
36
+ def get_token(client_id:, client_secret:, request_options: nil)
39
37
  response = @request_client.conn.post("/api/auth/v2/token") do |req|
40
38
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
41
39
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
42
40
  req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
43
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
41
+ req.body = {
42
+ **(request_options&.additional_body_parameters || {}),
43
+ client_id: client_id,
44
+ client_secret: client_secret
45
+ }.compact
44
46
  end
45
47
  Auth::V2::AuthGetTokenResponse.from_json(json_object: response.body)
46
48
  end
@@ -68,18 +70,21 @@ module CandidApiClient
68
70
  # The bearer token expires 5 hours after it has been created. After it has expired, the client will receive an "HTTP 401
69
71
  # Unauthorized" error, at which point the client should generate a new token. It is important that tokens be reused between requests; if the client attempts to generate a token too often, it will be rate-limited and will receive an "HTTP 429 Too Many Requests" error.
70
72
  #
71
- # @param request [Hash] Request of type Auth::V2::AuthGetTokenRequest, as a Hash
72
- # * :client_id (String)
73
- # * :client_secret (String)
73
+ # @param client_id [String] Your application's Client ID.
74
+ # @param client_secret [String] Your application's Client Secret.
74
75
  # @param request_options [RequestOptions]
75
76
  # @return [Auth::V2::AuthGetTokenResponse]
76
- def get_token(request:, request_options: nil)
77
+ def get_token(client_id:, client_secret:, request_options: nil)
77
78
  Async do
78
79
  response = @request_client.conn.post("/api/auth/v2/token") do |req|
79
80
  req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
80
81
  req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
81
82
  req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
82
- req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
83
+ req.body = {
84
+ **(request_options&.additional_body_parameters || {}),
85
+ client_id: client_id,
86
+ client_secret: client_secret
87
+ }.compact
83
88
  end
84
89
  Auth::V2::AuthGetTokenResponse.from_json(json_object: response.body)
85
90
  end
@@ -7,6 +7,7 @@ module CandidApiClient
7
7
  STRIPE = "STRIPE"
8
8
  CEDAR = "CEDAR"
9
9
  HEALTHIE = "HEALTHIE"
10
+ COLLECTLY = "COLLECTLY"
10
11
  end
11
12
  end
12
13
  end
@@ -19,6 +19,7 @@ module CandidApiClient
19
19
  CASE_RATE_OR_CAPITATED = "CASE_RATE_OR_CAPITATED"
20
20
  OTHER = "OTHER"
21
21
  UNKNOWN = "UNKNOWN"
22
+ CONTRACTUAL_ADJUSTMENT = "CONTRACTUAL_ADJUSTMENT"
22
23
  end
23
24
  end
24
25
  end
data/lib/requests.rb CHANGED
@@ -20,7 +20,7 @@ module CandidApiClient
20
20
  @headers = {
21
21
  "X-Fern-Language": "Ruby",
22
22
  "X-Fern-SDK-Name": "candidhealth",
23
- "X-Fern-SDK-Version": "0.19.0",
23
+ "X-Fern-SDK-Version": "0.19.1-6de2b0d",
24
24
  "Authorization": "Bearer #{token}"
25
25
  }
26
26
  @conn = Faraday.new(@base_url, headers: @headers) do |faraday|
@@ -46,7 +46,7 @@ module CandidApiClient
46
46
  @headers = {
47
47
  "X-Fern-Language": "Ruby",
48
48
  "X-Fern-SDK-Name": "candidhealth",
49
- "X-Fern-SDK-Version": "0.19.0",
49
+ "X-Fern-SDK-Version": "0.19.1-6de2b0d",
50
50
  "Authorization": "Bearer #{token}"
51
51
  }
52
52
  @conn = Faraday.new(@base_url, headers: @headers) do |faraday|
data/lib/types_export.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "candidhealth/auth/v_2/types/auth_get_token_request"
4
3
  require_relative "candidhealth/auth/v_2/types/auth_get_token_response"
5
4
  require_relative "candidhealth/auth/v_2/types/too_many_requests_error_type"
6
5
  require_relative "candidhealth/billing_notes/v_2/types/billing_note_id"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candidhealth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1.pre.6de2b0d
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-31 00:00:00.000000000 Z
11
+ date: 2024-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async-http-faraday
@@ -99,7 +99,6 @@ files:
99
99
  - lib/candidhealth.rb
100
100
  - lib/candidhealth/auth/client.rb
101
101
  - lib/candidhealth/auth/v_2/client.rb
102
- - lib/candidhealth/auth/v_2/types/auth_get_token_request.rb
103
102
  - lib/candidhealth/auth/v_2/types/auth_get_token_response.rb
104
103
  - lib/candidhealth/auth/v_2/types/too_many_requests_error_type.rb
105
104
  - lib/candidhealth/billing_notes/client.rb
@@ -501,9 +500,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
501
500
  version: 2.7.0
502
501
  required_rubygems_version: !ruby/object:Gem::Requirement
503
502
  requirements:
504
- - - ">="
503
+ - - ">"
505
504
  - !ruby/object:Gem::Version
506
- version: '0'
505
+ version: 1.3.1
507
506
  requirements: []
508
507
  rubygems_version: 3.1.6
509
508
  signing_key:
@@ -1,54 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "json"
4
-
5
- module CandidApiClient
6
- module Auth
7
- module V2
8
- class AuthGetTokenRequest
9
- attr_reader :client_id, :client_secret, :additional_properties
10
-
11
- # @param client_id [String] Your application's Client ID.
12
- # @param client_secret [String] Your application's Client Secret.
13
- # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
14
- # @return [Auth::V2::AuthGetTokenRequest]
15
- def initialize(client_id:, client_secret:, additional_properties: nil)
16
- # @type [String] Your application's Client ID.
17
- @client_id = client_id
18
- # @type [String] Your application's Client Secret.
19
- @client_secret = client_secret
20
- # @type [OpenStruct] Additional properties unmapped to the current class definition
21
- @additional_properties = additional_properties
22
- end
23
-
24
- # Deserialize a JSON object to an instance of AuthGetTokenRequest
25
- #
26
- # @param json_object [JSON]
27
- # @return [Auth::V2::AuthGetTokenRequest]
28
- def self.from_json(json_object:)
29
- struct = JSON.parse(json_object, object_class: OpenStruct)
30
- JSON.parse(json_object)
31
- client_id = struct.client_id
32
- client_secret = struct.client_secret
33
- new(client_id: client_id, client_secret: client_secret, additional_properties: struct)
34
- end
35
-
36
- # Serialize an instance of AuthGetTokenRequest to a JSON object
37
- #
38
- # @return [JSON]
39
- def to_json(*_args)
40
- { "client_id": @client_id, "client_secret": @client_secret }.to_json
41
- end
42
-
43
- # Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object's property definitions.
44
- #
45
- # @param obj [Object]
46
- # @return [Void]
47
- def self.validate_raw(obj:)
48
- obj.client_id.is_a?(String) != false || raise("Passed value for field obj.client_id is not the expected type, validation failed.")
49
- obj.client_secret.is_a?(String) != false || raise("Passed value for field obj.client_secret is not the expected type, validation failed.")
50
- end
51
- end
52
- end
53
- end
54
- end