Skip to content

Commit 6f796af

Browse files
feat(api): api update
1 parent 5f0254d commit 6f796af

7 files changed

Lines changed: 76 additions & 22 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-cbb433962c75b95b0c00c453c3a2e39a88f4291a92c093f27a3f52d1b52785a2.yml
3-
openapi_spec_hash: 46b3934a43850209dad40e883aa5d1bd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb/orb-8b0ad117378120e92c83db4289345b202e96ee8cdd187e25eadd49f8220fd2c2.yml
3+
openapi_spec_hash: c54dfea4283acbda4f01e8da6ac0e651
44
config_hash: c01c1191b1cd696c7ca855ff6d28a8df

lib/orb/models/accounting_provider_config.rb

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,23 @@ class AccountingProviderConfig < Orb::Internal::Type::BaseModel
1010

1111
# @!attribute provider_type
1212
#
13-
# @return [String]
14-
required :provider_type, String
13+
# @return [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
14+
required :provider_type, enum: -> { Orb::AccountingProviderConfig::ProviderType }
1515

1616
# @!method initialize(external_provider_id:, provider_type:)
1717
# @param external_provider_id [String]
18-
# @param provider_type [String]
18+
# @param provider_type [Symbol, Orb::Models::AccountingProviderConfig::ProviderType]
19+
20+
# @see Orb::Models::AccountingProviderConfig#provider_type
21+
module ProviderType
22+
extend Orb::Internal::Type::Enum
23+
24+
QUICKBOOKS = :quickbooks
25+
NETSUITE = :netsuite
26+
27+
# @!method self.values
28+
# @return [Array<Symbol>]
29+
end
1930
end
2031
end
2132
end

lib/orb/models/customer.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ module ProviderType
452452

453453
QUICKBOOKS = :quickbooks
454454
NETSUITE = :netsuite
455-
NETSUITE_AMPERSAND = :netsuite_ampersand
456455

457456
# @!method self.values
458457
# @return [Array<Symbol>]

rbi/orb/models/accounting_provider_config.rbi

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,57 @@ module Orb
1111
sig { returns(String) }
1212
attr_accessor :external_provider_id
1313

14-
sig { returns(String) }
14+
sig { returns(Orb::AccountingProviderConfig::ProviderType::OrSymbol) }
1515
attr_accessor :provider_type
1616

1717
sig do
18-
params(external_provider_id: String, provider_type: String).returns(
19-
T.attached_class
20-
)
18+
params(
19+
external_provider_id: String,
20+
provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol
21+
).returns(T.attached_class)
2122
end
2223
def self.new(external_provider_id:, provider_type:)
2324
end
2425

2526
sig do
2627
override.returns(
27-
{ external_provider_id: String, provider_type: String }
28+
{
29+
external_provider_id: String,
30+
provider_type: Orb::AccountingProviderConfig::ProviderType::OrSymbol
31+
}
2832
)
2933
end
3034
def to_hash
3135
end
36+
37+
module ProviderType
38+
extend Orb::Internal::Type::Enum
39+
40+
TaggedSymbol =
41+
T.type_alias do
42+
T.all(Symbol, Orb::AccountingProviderConfig::ProviderType)
43+
end
44+
OrSymbol = T.type_alias { T.any(Symbol, String) }
45+
46+
QUICKBOOKS =
47+
T.let(
48+
:quickbooks,
49+
Orb::AccountingProviderConfig::ProviderType::TaggedSymbol
50+
)
51+
NETSUITE =
52+
T.let(
53+
:netsuite,
54+
Orb::AccountingProviderConfig::ProviderType::TaggedSymbol
55+
)
56+
57+
sig do
58+
override.returns(
59+
T::Array[Orb::AccountingProviderConfig::ProviderType::TaggedSymbol]
60+
)
61+
end
62+
def self.values
63+
end
64+
end
3265
end
3366
end
3467
end

rbi/orb/models/customer.rbi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -761,11 +761,6 @@ module Orb
761761
:netsuite,
762762
Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol
763763
)
764-
NETSUITE_AMPERSAND =
765-
T.let(
766-
:netsuite_ampersand,
767-
Orb::Customer::AccountingSyncConfiguration::AccountingProvider::ProviderType::TaggedSymbol
768-
)
769764

770765
sig do
771766
override.returns(
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
module Orb
22
module Models
33
type accounting_provider_config =
4-
{ external_provider_id: String, provider_type: String }
4+
{
5+
external_provider_id: String,
6+
provider_type: Orb::Models::AccountingProviderConfig::provider_type
7+
}
58

69
class AccountingProviderConfig < Orb::Internal::Type::BaseModel
710
attr_accessor external_provider_id: String
811

9-
attr_accessor provider_type: String
12+
attr_accessor provider_type: Orb::Models::AccountingProviderConfig::provider_type
1013

1114
def initialize: (
1215
external_provider_id: String,
13-
provider_type: String
16+
provider_type: Orb::Models::AccountingProviderConfig::provider_type
1417
) -> void
1518

16-
def to_hash: -> { external_provider_id: String, provider_type: String }
19+
def to_hash: -> {
20+
external_provider_id: String,
21+
provider_type: Orb::Models::AccountingProviderConfig::provider_type
22+
}
23+
24+
type provider_type = :quickbooks | :netsuite
25+
26+
module ProviderType
27+
extend Orb::Internal::Type::Enum
28+
29+
QUICKBOOKS: :quickbooks
30+
NETSUITE: :netsuite
31+
32+
def self?.values: -> ::Array[Orb::Models::AccountingProviderConfig::provider_type]
33+
end
1734
end
1835
end
1936
end

sig/orb/models/customer.rbs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,13 @@ module Orb
221221
provider_type: Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type
222222
}
223223

224-
type provider_type = :quickbooks | :netsuite | :netsuite_ampersand
224+
type provider_type = :quickbooks | :netsuite
225225

226226
module ProviderType
227227
extend Orb::Internal::Type::Enum
228228

229229
QUICKBOOKS: :quickbooks
230230
NETSUITE: :netsuite
231-
NETSUITE_AMPERSAND: :netsuite_ampersand
232231

233232
def self?.values: -> ::Array[Orb::Models::Customer::AccountingSyncConfiguration::AccountingProvider::provider_type]
234233
end

0 commit comments

Comments
 (0)