-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from dubinc/speakeasy-sdk-regen-1740270566
chore: 🐝 Update SDK - Generate 0.2.2-alpha.70
- Loading branch information
Showing
185 changed files
with
734 additions
and
658 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
|
||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
module Crystalline | ||
autoload :MetadataFields, 'crystalline/metadata_fields' | ||
end | ||
|
||
|
||
require_relative 'crystalline/utils' | ||
require_relative 'crystalline/t' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. | ||
|
||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
require 'sorbet-runtime' | ||
|
||
module Crystalline | ||
extend T::Sig | ||
|
||
class FieldAugmented | ||
include MetadataFields | ||
end | ||
|
||
sig { params(complex: Object).returns(Object) } | ||
def self.marshal_dict_complex(complex) | ||
if complex.is_a? Array | ||
complex.map { |v| Crystalline.marshal_dict_complex(v) } | ||
elsif complex.is_a? Hash | ||
complex.transform_values { |v| Crystalline.marshal_dict_complex(v) } | ||
elsif complex.is_a? Crystalline::FieldAugmented | ||
complex.to_dict | ||
else | ||
complex | ||
end | ||
end | ||
|
||
def self.marshal_json_complex(complex) | ||
JSON.dump(marshal_dict_complex(complex)) | ||
end | ||
|
||
sig { params(data: Object, type: Object).returns(Object) } | ||
def self.unmarshal_complex(data, type) | ||
unmarshal_json(data, type) | ||
end | ||
|
||
sig { params(data: Object, type: Object).returns(Object) } | ||
def self.unmarshal_json(data, type) | ||
if T.simplifiable? type | ||
type = T.simplify_type type | ||
end | ||
if type.instance_of?(Class) && type < ::Crystalline::FieldAugmented | ||
type.from_dict(data) | ||
elsif T.arr? type | ||
data.map { |v| Crystalline.unmarshal_complex(v, T.arr_of(type)) } | ||
elsif T.hash? type | ||
data.transform_values { |v| Crystalline.unmarshal_complex(v, T.hash_of(type)) } | ||
else | ||
data | ||
end | ||
end | ||
|
||
sig { params(val: Object, primitives: T::Boolean).returns(Object) } | ||
def self.val_to_string(val, primitives: true) | ||
if val.is_a? T::Enum | ||
val.serialize | ||
elsif val.is_a? DateTime | ||
val.strftime('%Y-%m-%dT%H:%M:%S.%NZ') | ||
elsif primitives | ||
val.to_s | ||
else | ||
val | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.