method-ruby 0.1.0

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.
Files changed (125) hide show
  1. checksums.yaml +7 -0
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +11 -0
  4. data/README.md +244 -0
  5. data/SECURITY.md +27 -0
  6. data/lib/method_ruby/client.rb +114 -0
  7. data/lib/method_ruby/errors.rb +228 -0
  8. data/lib/method_ruby/file_part.rb +58 -0
  9. data/lib/method_ruby/internal/transport/base_client.rb +595 -0
  10. data/lib/method_ruby/internal/transport/pooled_net_requester.rb +210 -0
  11. data/lib/method_ruby/internal/type/array_of.rb +168 -0
  12. data/lib/method_ruby/internal/type/base_model.rb +531 -0
  13. data/lib/method_ruby/internal/type/base_page.rb +55 -0
  14. data/lib/method_ruby/internal/type/boolean.rb +77 -0
  15. data/lib/method_ruby/internal/type/converter.rb +327 -0
  16. data/lib/method_ruby/internal/type/enum.rb +131 -0
  17. data/lib/method_ruby/internal/type/file_input.rb +111 -0
  18. data/lib/method_ruby/internal/type/hash_of.rb +188 -0
  19. data/lib/method_ruby/internal/type/request_parameters.rb +42 -0
  20. data/lib/method_ruby/internal/type/union.rb +237 -0
  21. data/lib/method_ruby/internal/type/unknown.rb +81 -0
  22. data/lib/method_ruby/internal/util.rb +951 -0
  23. data/lib/method_ruby/internal.rb +20 -0
  24. data/lib/method_ruby/models/address.rb +45 -0
  25. data/lib/method_ruby/models/entity.rb +102 -0
  26. data/lib/method_ruby/models/entity_corporation.rb +33 -0
  27. data/lib/method_ruby/models/entity_corporation_owner.rb +45 -0
  28. data/lib/method_ruby/models/entity_create_params.rb +188 -0
  29. data/lib/method_ruby/models/entity_create_response.rb +32 -0
  30. data/lib/method_ruby/models/entity_individual.rb +39 -0
  31. data/lib/method_ruby/models/entity_list_params.rb +61 -0
  32. data/lib/method_ruby/models/entity_list_response.rb +32 -0
  33. data/lib/method_ruby/models/entity_retrieve_params.rb +37 -0
  34. data/lib/method_ruby/models/entity_retrieve_response.rb +32 -0
  35. data/lib/method_ruby/models/entity_update_params.rb +75 -0
  36. data/lib/method_ruby/models/entity_update_response.rb +32 -0
  37. data/lib/method_ruby/models/ping_check_params.rb +14 -0
  38. data/lib/method_ruby/models/ping_check_response.rb +49 -0
  39. data/lib/method_ruby/models/resource_error.rb +33 -0
  40. data/lib/method_ruby/models.rb +63 -0
  41. data/lib/method_ruby/request_options.rb +77 -0
  42. data/lib/method_ruby/resources/entities.rb +141 -0
  43. data/lib/method_ruby/resources/ping.rb +34 -0
  44. data/lib/method_ruby/version.rb +5 -0
  45. data/lib/method_ruby.rb +73 -0
  46. data/manifest.yaml +17 -0
  47. data/rbi/method_ruby/client.rbi +85 -0
  48. data/rbi/method_ruby/errors.rbi +205 -0
  49. data/rbi/method_ruby/file_part.rbi +37 -0
  50. data/rbi/method_ruby/internal/transport/base_client.rbi +303 -0
  51. data/rbi/method_ruby/internal/transport/pooled_net_requester.rbi +84 -0
  52. data/rbi/method_ruby/internal/type/array_of.rbi +104 -0
  53. data/rbi/method_ruby/internal/type/base_model.rbi +308 -0
  54. data/rbi/method_ruby/internal/type/base_page.rbi +42 -0
  55. data/rbi/method_ruby/internal/type/boolean.rbi +58 -0
  56. data/rbi/method_ruby/internal/type/converter.rbi +216 -0
  57. data/rbi/method_ruby/internal/type/enum.rbi +82 -0
  58. data/rbi/method_ruby/internal/type/file_input.rbi +59 -0
  59. data/rbi/method_ruby/internal/type/hash_of.rbi +104 -0
  60. data/rbi/method_ruby/internal/type/request_parameters.rbi +29 -0
  61. data/rbi/method_ruby/internal/type/union.rbi +128 -0
  62. data/rbi/method_ruby/internal/type/unknown.rbi +58 -0
  63. data/rbi/method_ruby/internal/util.rbi +507 -0
  64. data/rbi/method_ruby/internal.rbi +18 -0
  65. data/rbi/method_ruby/models/address.rbi +63 -0
  66. data/rbi/method_ruby/models/entity.rbi +151 -0
  67. data/rbi/method_ruby/models/entity_corporation.rbi +61 -0
  68. data/rbi/method_ruby/models/entity_corporation_owner.rbi +86 -0
  69. data/rbi/method_ruby/models/entity_create_params.rbi +408 -0
  70. data/rbi/method_ruby/models/entity_create_response.rbi +84 -0
  71. data/rbi/method_ruby/models/entity_individual.rbi +65 -0
  72. data/rbi/method_ruby/models/entity_list_params.rbi +132 -0
  73. data/rbi/method_ruby/models/entity_list_response.rbi +84 -0
  74. data/rbi/method_ruby/models/entity_retrieve_params.rbi +93 -0
  75. data/rbi/method_ruby/models/entity_retrieve_response.rbi +89 -0
  76. data/rbi/method_ruby/models/entity_update_params.rbi +141 -0
  77. data/rbi/method_ruby/models/entity_update_response.rbi +84 -0
  78. data/rbi/method_ruby/models/ping_check_params.rbi +27 -0
  79. data/rbi/method_ruby/models/ping_check_response.rbi +118 -0
  80. data/rbi/method_ruby/models/resource_error.rbi +55 -0
  81. data/rbi/method_ruby/models.rbi +25 -0
  82. data/rbi/method_ruby/request_options.rbi +59 -0
  83. data/rbi/method_ruby/resources/entities.rbi +119 -0
  84. data/rbi/method_ruby/resources/ping.rbi +22 -0
  85. data/rbi/method_ruby/version.rbi +5 -0
  86. data/sig/method_ruby/client.rbs +39 -0
  87. data/sig/method_ruby/errors.rbs +117 -0
  88. data/sig/method_ruby/file_part.rbs +21 -0
  89. data/sig/method_ruby/internal/transport/base_client.rbs +135 -0
  90. data/sig/method_ruby/internal/transport/pooled_net_requester.rbs +48 -0
  91. data/sig/method_ruby/internal/type/array_of.rbs +48 -0
  92. data/sig/method_ruby/internal/type/base_model.rbs +102 -0
  93. data/sig/method_ruby/internal/type/base_page.rbs +24 -0
  94. data/sig/method_ruby/internal/type/boolean.rbs +26 -0
  95. data/sig/method_ruby/internal/type/converter.rbs +79 -0
  96. data/sig/method_ruby/internal/type/enum.rbs +32 -0
  97. data/sig/method_ruby/internal/type/file_input.rbs +25 -0
  98. data/sig/method_ruby/internal/type/hash_of.rbs +48 -0
  99. data/sig/method_ruby/internal/type/request_parameters.rbs +19 -0
  100. data/sig/method_ruby/internal/type/union.rbs +52 -0
  101. data/sig/method_ruby/internal/type/unknown.rbs +26 -0
  102. data/sig/method_ruby/internal/util.rbs +195 -0
  103. data/sig/method_ruby/internal.rbs +9 -0
  104. data/sig/method_ruby/models/address.rbs +40 -0
  105. data/sig/method_ruby/models/entity.rbs +94 -0
  106. data/sig/method_ruby/models/entity_corporation.rbs +43 -0
  107. data/sig/method_ruby/models/entity_corporation_owner.rbs +57 -0
  108. data/sig/method_ruby/models/entity_create_params.rbs +215 -0
  109. data/sig/method_ruby/models/entity_create_response.rbs +41 -0
  110. data/sig/method_ruby/models/entity_individual.rbs +44 -0
  111. data/sig/method_ruby/models/entity_list_params.rbs +77 -0
  112. data/sig/method_ruby/models/entity_list_response.rbs +41 -0
  113. data/sig/method_ruby/models/entity_retrieve_params.rbs +47 -0
  114. data/sig/method_ruby/models/entity_retrieve_response.rbs +41 -0
  115. data/sig/method_ruby/models/entity_update_params.rbs +84 -0
  116. data/sig/method_ruby/models/entity_update_response.rbs +41 -0
  117. data/sig/method_ruby/models/ping_check_params.rbs +15 -0
  118. data/sig/method_ruby/models/ping_check_response.rbs +59 -0
  119. data/sig/method_ruby/models/resource_error.rbs +38 -0
  120. data/sig/method_ruby/models.rbs +23 -0
  121. data/sig/method_ruby/request_options.rbs +36 -0
  122. data/sig/method_ruby/resources/entities.rbs +41 -0
  123. data/sig/method_ruby/resources/ping.rbs +11 -0
  124. data/sig/method_ruby/version.rbs +3 -0
  125. metadata +196 -0
@@ -0,0 +1,195 @@
1
+ module MethodRuby
2
+ module Internal
3
+ module Util
4
+ extend MethodRuby::Internal::Util::SorbetRuntimeSupport
5
+
6
+ def self?.monotonic_secs: -> Float
7
+
8
+ def self?.walk_namespaces: (
9
+ Module | Class ns
10
+ ) -> Enumerable[(Module | Class)]
11
+
12
+ def self?.arch: -> String
13
+
14
+ def self?.os: -> String
15
+
16
+ def self?.primitive?: (top input) -> bool
17
+
18
+ def self?.coerce_boolean: (String | bool input) -> (bool | top)
19
+
20
+ def self?.coerce_boolean!: (String | bool input) -> bool?
21
+
22
+ def self?.coerce_integer: (String | Integer input) -> (Integer | top)
23
+
24
+ def self?.coerce_float: (String | Integer | Float input) -> (Float | top)
25
+
26
+ def self?.coerce_hash: (top input) -> (::Hash[top, top] | top)
27
+
28
+ def self?.coerce_hash!: (top input) -> ::Hash[top, top]?
29
+
30
+ def self?.deep_merge_lr: (top lhs, top rhs, ?concat: bool) -> top
31
+
32
+ def self?.deep_merge: (
33
+ *::Array[top] values,
34
+ ?sentinel: top?,
35
+ ?concat: bool
36
+ ) -> top
37
+
38
+ def self?.dig: (
39
+ ::Hash[Symbol, top] | ::Array[top] | top data,
40
+ (Symbol
41
+ | Integer
42
+ | ::Array[(Symbol | Integer)]
43
+ | (^(top arg0) -> top))? pick
44
+ ) {
45
+ -> top?
46
+ } -> top?
47
+
48
+ def self?.uri_origin: (URI::Generic uri) -> String
49
+
50
+ def self?.interpolate_path: (String | ::Array[String] path) -> String
51
+
52
+ def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
53
+
54
+ def self?.encode_query: (
55
+ ::Hash[String, (::Array[String] | String)?]? query
56
+ ) -> String?
57
+
58
+ type parsed_uri =
59
+ {
60
+ scheme: String?,
61
+ host: String?,
62
+ port: Integer?,
63
+ path: String?,
64
+ query: ::Hash[String, ::Array[String]]
65
+ }
66
+
67
+ def self?.parse_uri: (
68
+ URI::Generic | String url
69
+ ) -> MethodRuby::Internal::Util::parsed_uri
70
+
71
+ def self?.unparse_uri: (
72
+ MethodRuby::Internal::Util::parsed_uri parsed
73
+ ) -> URI::Generic
74
+
75
+ def self?.join_parsed_uri: (
76
+ MethodRuby::Internal::Util::parsed_uri lhs,
77
+ MethodRuby::Internal::Util::parsed_uri rhs
78
+ ) -> URI::Generic
79
+
80
+ def self?.normalized_headers: (
81
+ *::Hash[String, (String
82
+ | Integer
83
+ | ::Array[(String | Integer)?])?] headers
84
+ ) -> ::Hash[String, String]
85
+
86
+ class ReadIOAdapter
87
+ def close?: -> bool?
88
+
89
+ def close: -> void
90
+
91
+ private def read_enum: (Integer? max_len) -> String
92
+
93
+ def read: (?Integer? max_len, ?String? out_string) -> String?
94
+
95
+ def initialize: (
96
+ String | Pathname | StringIO | Enumerable[String] src
97
+ ) {
98
+ (String arg0) -> void
99
+ } -> void
100
+ end
101
+
102
+ def self?.writable_enum: {
103
+ (Enumerator::Yielder y) -> void
104
+ } -> Enumerable[String]
105
+
106
+ JSON_CONTENT: Regexp
107
+ JSONL_CONTENT: Regexp
108
+
109
+ def encode_query_params: (
110
+ ::Hash[Symbol, top] query
111
+ ) -> ::Hash[Symbol, top]
112
+
113
+ private def write_query_param_element!: (
114
+ ::Hash[Symbol, top] collection,
115
+ String key,
116
+ top element
117
+ ) -> nil
118
+
119
+ def self?.write_multipart_content: (
120
+ Enumerator::Yielder y,
121
+ val: top,
122
+ closing: ::Array[^-> void],
123
+ ?content_type: String?
124
+ ) -> void
125
+
126
+ def self?.write_multipart_chunk: (
127
+ Enumerator::Yielder y,
128
+ boundary: String,
129
+ key: Symbol | String,
130
+ val: top,
131
+ closing: ::Array[^-> void]
132
+ ) -> void
133
+
134
+ def self?.encode_multipart_streaming: (
135
+ top body
136
+ ) -> [String, Enumerable[String]]
137
+
138
+ def self?.encode_content: (
139
+ ::Hash[String, String] headers,
140
+ top body
141
+ ) -> top
142
+
143
+ def self?.force_charset!: (String content_type, text: String) -> void
144
+
145
+ def self?.decode_content: (
146
+ ::Hash[String, String] headers,
147
+ stream: Enumerable[String],
148
+ ?suppress_error: bool
149
+ ) -> top
150
+
151
+ def self?.fused_enum: (
152
+ Enumerable[top] enum,
153
+ ?external: bool
154
+ ) {
155
+ -> void
156
+ } -> Enumerable[top]
157
+
158
+ def self?.close_fused!: (Enumerable[top]? enum) -> void
159
+
160
+ def self?.chain_fused: (
161
+ Enumerable[top]? enum
162
+ ) {
163
+ (Enumerator::Yielder arg0) -> void
164
+ } -> Enumerable[top]
165
+
166
+ type server_sent_event =
167
+ { event: String?, data: String?, id: String?, retry: Integer? }
168
+
169
+ def self?.decode_lines: (Enumerable[String] enum) -> Enumerable[String]
170
+
171
+ def self?.decode_sse: (
172
+ Enumerable[String] lines
173
+ ) -> Enumerable[MethodRuby::Internal::Util::server_sent_event]
174
+
175
+ module SorbetRuntimeSupport
176
+ class MissingSorbetRuntimeError < ::RuntimeError
177
+ end
178
+
179
+ private def sorbet_runtime_constants: -> ::Hash[Symbol, top]
180
+
181
+ def const_missing: (Symbol name) -> void
182
+
183
+ def sorbet_constant_defined?: (Symbol name) -> bool
184
+
185
+ def define_sorbet_constant!: (Symbol name) { -> top } -> void
186
+
187
+ def to_sorbet_type: -> top
188
+
189
+ def self.to_sorbet_type: (
190
+ MethodRuby::Internal::Util::SorbetRuntimeSupport | top `type`
191
+ ) -> top
192
+ end
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,9 @@
1
+ module MethodRuby
2
+ module Internal
3
+ extend MethodRuby::Internal::Util::SorbetRuntimeSupport
4
+
5
+ type file_input = Pathname | StringIO | IO | String | MethodRuby::FilePart
6
+
7
+ OMIT: Object
8
+ end
9
+ end
@@ -0,0 +1,40 @@
1
+ module MethodRuby
2
+ module Models
3
+ type address =
4
+ {
5
+ city: String?,
6
+ :line1 => String?,
7
+ :line2 => String?,
8
+ state: String?,
9
+ zip: String?
10
+ }
11
+
12
+ class Address < MethodRuby::Internal::Type::BaseModel
13
+ attr_accessor city: String?
14
+
15
+ attr_accessor line1: String?
16
+
17
+ attr_accessor line2: String?
18
+
19
+ attr_accessor state: String?
20
+
21
+ attr_accessor zip: String?
22
+
23
+ def initialize: (
24
+ ?city: String?,
25
+ ?line1: String?,
26
+ ?line2: String?,
27
+ ?state: String?,
28
+ ?zip: String?
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ city: String?,
33
+ :line1 => String?,
34
+ :line2 => String?,
35
+ state: String?,
36
+ zip: String?
37
+ }
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,94 @@
1
+ module MethodRuby
2
+ module Models
3
+ type entity =
4
+ {
5
+ id: String,
6
+ status: MethodRuby::Models::Entity::status,
7
+ type: MethodRuby::Models::Entity::type_,
8
+ address: MethodRuby::Address,
9
+ corporation: MethodRuby::EntityCorporation?,
10
+ created_at: Time,
11
+ error: MethodRuby::ResourceError?,
12
+ individual: MethodRuby::EntityIndividual?,
13
+ metadata: ::Hash[Symbol, top]?,
14
+ updated_at: Time
15
+ }
16
+
17
+ class Entity < MethodRuby::Internal::Type::BaseModel
18
+ attr_accessor id: String
19
+
20
+ attr_accessor status: MethodRuby::Models::Entity::status
21
+
22
+ attr_accessor type: MethodRuby::Models::Entity::type_
23
+
24
+ attr_reader address: MethodRuby::Address?
25
+
26
+ def address=: (MethodRuby::Address) -> MethodRuby::Address
27
+
28
+ attr_accessor corporation: MethodRuby::EntityCorporation?
29
+
30
+ attr_reader created_at: Time?
31
+
32
+ def created_at=: (Time) -> Time
33
+
34
+ attr_accessor error: MethodRuby::ResourceError?
35
+
36
+ attr_accessor individual: MethodRuby::EntityIndividual?
37
+
38
+ attr_accessor metadata: ::Hash[Symbol, top]?
39
+
40
+ attr_reader updated_at: Time?
41
+
42
+ def updated_at=: (Time) -> Time
43
+
44
+ def initialize: (
45
+ id: String,
46
+ status: MethodRuby::Models::Entity::status,
47
+ type: MethodRuby::Models::Entity::type_,
48
+ ?address: MethodRuby::Address,
49
+ ?corporation: MethodRuby::EntityCorporation?,
50
+ ?created_at: Time,
51
+ ?error: MethodRuby::ResourceError?,
52
+ ?individual: MethodRuby::EntityIndividual?,
53
+ ?metadata: ::Hash[Symbol, top]?,
54
+ ?updated_at: Time
55
+ ) -> void
56
+
57
+ def to_hash: -> {
58
+ id: String,
59
+ status: MethodRuby::Models::Entity::status,
60
+ type: MethodRuby::Models::Entity::type_,
61
+ address: MethodRuby::Address,
62
+ corporation: MethodRuby::EntityCorporation?,
63
+ created_at: Time,
64
+ error: MethodRuby::ResourceError?,
65
+ individual: MethodRuby::EntityIndividual?,
66
+ metadata: ::Hash[Symbol, top]?,
67
+ updated_at: Time
68
+ }
69
+
70
+ type status = :active | :incomplete | :disabled
71
+
72
+ module Status
73
+ extend MethodRuby::Internal::Type::Enum
74
+
75
+ ACTIVE: :active
76
+ INCOMPLETE: :incomplete
77
+ DISABLED: :disabled
78
+
79
+ def self?.values: -> ::Array[MethodRuby::Models::Entity::status]
80
+ end
81
+
82
+ type type_ = :individual | :corporation
83
+
84
+ module Type
85
+ extend MethodRuby::Internal::Type::Enum
86
+
87
+ INDIVIDUAL: :individual
88
+ CORPORATION: :corporation
89
+
90
+ def self?.values: -> ::Array[MethodRuby::Models::Entity::type_]
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,43 @@
1
+ module MethodRuby
2
+ module Models
3
+ type entity_corporation =
4
+ {
5
+ dba: String?,
6
+ ein: String,
7
+ name: String,
8
+ owners: ::Array[MethodRuby::EntityCorporationOwner]
9
+ }
10
+
11
+ class EntityCorporation < MethodRuby::Internal::Type::BaseModel
12
+ attr_accessor dba: String?
13
+
14
+ attr_reader ein: String?
15
+
16
+ def ein=: (String) -> String
17
+
18
+ attr_reader name: String?
19
+
20
+ def name=: (String) -> String
21
+
22
+ attr_reader owners: ::Array[MethodRuby::EntityCorporationOwner]?
23
+
24
+ def owners=: (
25
+ ::Array[MethodRuby::EntityCorporationOwner]
26
+ ) -> ::Array[MethodRuby::EntityCorporationOwner]
27
+
28
+ def initialize: (
29
+ ?dba: String?,
30
+ ?ein: String,
31
+ ?name: String,
32
+ ?owners: ::Array[MethodRuby::EntityCorporationOwner]
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ dba: String?,
37
+ ein: String,
38
+ name: String,
39
+ owners: ::Array[MethodRuby::EntityCorporationOwner]
40
+ }
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,57 @@
1
+ module MethodRuby
2
+ module Models
3
+ type entity_corporation_owner =
4
+ {
5
+ address: MethodRuby::Address,
6
+ dob: Date,
7
+ email: String,
8
+ first_name: String,
9
+ last_name: String,
10
+ phone: String
11
+ }
12
+
13
+ class EntityCorporationOwner < MethodRuby::Internal::Type::BaseModel
14
+ attr_reader address: MethodRuby::Address?
15
+
16
+ def address=: (MethodRuby::Address) -> MethodRuby::Address
17
+
18
+ attr_reader dob: Date?
19
+
20
+ def dob=: (Date) -> Date
21
+
22
+ attr_reader email: String?
23
+
24
+ def email=: (String) -> String
25
+
26
+ attr_reader first_name: String?
27
+
28
+ def first_name=: (String) -> String
29
+
30
+ attr_reader last_name: String?
31
+
32
+ def last_name=: (String) -> String
33
+
34
+ attr_reader phone: String?
35
+
36
+ def phone=: (String) -> String
37
+
38
+ def initialize: (
39
+ ?address: MethodRuby::Address,
40
+ ?dob: Date,
41
+ ?email: String,
42
+ ?first_name: String,
43
+ ?last_name: String,
44
+ ?phone: String
45
+ ) -> void
46
+
47
+ def to_hash: -> {
48
+ address: MethodRuby::Address,
49
+ dob: Date,
50
+ email: String,
51
+ first_name: String,
52
+ last_name: String,
53
+ phone: String
54
+ }
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,215 @@
1
+ module MethodRuby
2
+ module Models
3
+ type entity_create_params =
4
+ {
5
+ body: MethodRuby::Models::EntityCreateParams::body,
6
+ idempotency_key: String,
7
+ method_version: MethodRuby::Models::EntityCreateParams::method_version
8
+ }
9
+ & MethodRuby::Internal::Type::request_parameters
10
+
11
+ class EntityCreateParams < MethodRuby::Internal::Type::BaseModel
12
+ extend MethodRuby::Internal::Type::RequestParameters::Converter
13
+ include MethodRuby::Internal::Type::RequestParameters
14
+
15
+ attr_accessor body: MethodRuby::Models::EntityCreateParams::body
16
+
17
+ attr_reader idempotency_key: String?
18
+
19
+ def idempotency_key=: (String) -> String
20
+
21
+ attr_reader method_version: MethodRuby::Models::EntityCreateParams::method_version?
22
+
23
+ def method_version=: (
24
+ MethodRuby::Models::EntityCreateParams::method_version
25
+ ) -> MethodRuby::Models::EntityCreateParams::method_version
26
+
27
+ def initialize: (
28
+ body: MethodRuby::Models::EntityCreateParams::body,
29
+ ?idempotency_key: String,
30
+ ?method_version: MethodRuby::Models::EntityCreateParams::method_version,
31
+ ?request_options: MethodRuby::request_opts
32
+ ) -> void
33
+
34
+ def to_hash: -> {
35
+ body: MethodRuby::Models::EntityCreateParams::body,
36
+ idempotency_key: String,
37
+ method_version: MethodRuby::Models::EntityCreateParams::method_version,
38
+ request_options: MethodRuby::RequestOptions
39
+ }
40
+
41
+ type body =
42
+ MethodRuby::EntityCreateParams::Body::Individual
43
+ | MethodRuby::EntityCreateParams::Body::Corporation
44
+
45
+ module Body
46
+ extend MethodRuby::Internal::Type::Union
47
+
48
+ type individual =
49
+ {
50
+ individual: MethodRuby::EntityCreateParams::Body::Individual::Individual,
51
+ type: :individual,
52
+ address: MethodRuby::Address,
53
+ metadata: ::Hash[Symbol, top]?
54
+ }
55
+
56
+ class Individual < MethodRuby::Internal::Type::BaseModel
57
+ attr_accessor individual: MethodRuby::EntityCreateParams::Body::Individual::Individual
58
+
59
+ attr_accessor type: :individual
60
+
61
+ attr_reader address: MethodRuby::Address?
62
+
63
+ def address=: (MethodRuby::Address) -> MethodRuby::Address
64
+
65
+ attr_accessor metadata: ::Hash[Symbol, top]?
66
+
67
+ def initialize: (
68
+ individual: MethodRuby::EntityCreateParams::Body::Individual::Individual,
69
+ ?address: MethodRuby::Address,
70
+ ?metadata: ::Hash[Symbol, top]?,
71
+ ?type: :individual
72
+ ) -> void
73
+
74
+ def to_hash: -> {
75
+ individual: MethodRuby::EntityCreateParams::Body::Individual::Individual,
76
+ type: :individual,
77
+ address: MethodRuby::Address,
78
+ metadata: ::Hash[Symbol, top]?
79
+ }
80
+
81
+ type individual =
82
+ {
83
+ first_name: String,
84
+ last_name: String,
85
+ dob: Date,
86
+ email: String,
87
+ phone: String
88
+ }
89
+
90
+ class Individual < MethodRuby::Internal::Type::BaseModel
91
+ attr_accessor first_name: String
92
+
93
+ attr_accessor last_name: String
94
+
95
+ attr_reader dob: Date?
96
+
97
+ def dob=: (Date) -> Date
98
+
99
+ attr_reader email: String?
100
+
101
+ def email=: (String) -> String
102
+
103
+ attr_reader phone: String?
104
+
105
+ def phone=: (String) -> String
106
+
107
+ def initialize: (
108
+ first_name: String,
109
+ last_name: String,
110
+ ?dob: Date,
111
+ ?email: String,
112
+ ?phone: String
113
+ ) -> void
114
+
115
+ def to_hash: -> {
116
+ first_name: String,
117
+ last_name: String,
118
+ dob: Date,
119
+ email: String,
120
+ phone: String
121
+ }
122
+ end
123
+ end
124
+
125
+ type corporation =
126
+ {
127
+ corporation: MethodRuby::EntityCreateParams::Body::Corporation::Corporation,
128
+ type: :corporation,
129
+ address: MethodRuby::Address,
130
+ metadata: ::Hash[Symbol, top]?
131
+ }
132
+
133
+ class Corporation < MethodRuby::Internal::Type::BaseModel
134
+ attr_accessor corporation: MethodRuby::EntityCreateParams::Body::Corporation::Corporation
135
+
136
+ attr_accessor type: :corporation
137
+
138
+ attr_reader address: MethodRuby::Address?
139
+
140
+ def address=: (MethodRuby::Address) -> MethodRuby::Address
141
+
142
+ attr_accessor metadata: ::Hash[Symbol, top]?
143
+
144
+ def initialize: (
145
+ corporation: MethodRuby::EntityCreateParams::Body::Corporation::Corporation,
146
+ ?address: MethodRuby::Address,
147
+ ?metadata: ::Hash[Symbol, top]?,
148
+ ?type: :corporation
149
+ ) -> void
150
+
151
+ def to_hash: -> {
152
+ corporation: MethodRuby::EntityCreateParams::Body::Corporation::Corporation,
153
+ type: :corporation,
154
+ address: MethodRuby::Address,
155
+ metadata: ::Hash[Symbol, top]?
156
+ }
157
+
158
+ type corporation =
159
+ {
160
+ name: String,
161
+ dba: String,
162
+ ein: String,
163
+ owners: ::Array[MethodRuby::EntityCorporationOwner]
164
+ }
165
+
166
+ class Corporation < MethodRuby::Internal::Type::BaseModel
167
+ attr_accessor name: String
168
+
169
+ attr_reader dba: String?
170
+
171
+ def dba=: (String) -> String
172
+
173
+ attr_reader ein: String?
174
+
175
+ def ein=: (String) -> String
176
+
177
+ attr_reader owners: ::Array[MethodRuby::EntityCorporationOwner]?
178
+
179
+ def owners=: (
180
+ ::Array[MethodRuby::EntityCorporationOwner]
181
+ ) -> ::Array[MethodRuby::EntityCorporationOwner]
182
+
183
+ def initialize: (
184
+ name: String,
185
+ ?dba: String,
186
+ ?ein: String,
187
+ ?owners: ::Array[MethodRuby::EntityCorporationOwner]
188
+ ) -> void
189
+
190
+ def to_hash: -> {
191
+ name: String,
192
+ dba: String,
193
+ ein: String,
194
+ owners: ::Array[MethodRuby::EntityCorporationOwner]
195
+ }
196
+ end
197
+ end
198
+
199
+ def self?.variants: -> ::Array[MethodRuby::Models::EntityCreateParams::body]
200
+ end
201
+
202
+ type method_version = :"2024-04-04" | :"2025-07-04" | :"2025-12-01"
203
+
204
+ module MethodVersion
205
+ extend MethodRuby::Internal::Type::Enum
206
+
207
+ METHOD_VERSION_2024_04_04: :"2024-04-04"
208
+ METHOD_VERSION_2025_07_04: :"2025-07-04"
209
+ METHOD_VERSION_2025_12_01: :"2025-12-01"
210
+
211
+ def self?.values: -> ::Array[MethodRuby::Models::EntityCreateParams::method_version]
212
+ end
213
+ end
214
+ end
215
+ end
@@ -0,0 +1,41 @@
1
+ module MethodRuby
2
+ module Models
3
+ type entity_create_response =
4
+ {
5
+ data: MethodRuby::Entity,
6
+ success: MethodRuby::Models::EntityCreateResponse::success
7
+ }
8
+
9
+ class EntityCreateResponse < MethodRuby::Internal::Type::BaseModel
10
+ attr_reader data: MethodRuby::Entity?
11
+
12
+ def data=: (MethodRuby::Entity) -> MethodRuby::Entity
13
+
14
+ attr_reader success: MethodRuby::Models::EntityCreateResponse::success?
15
+
16
+ def success=: (
17
+ MethodRuby::Models::EntityCreateResponse::success
18
+ ) -> MethodRuby::Models::EntityCreateResponse::success
19
+
20
+ def initialize: (
21
+ ?data: MethodRuby::Entity,
22
+ ?success: MethodRuby::Models::EntityCreateResponse::success
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ data: MethodRuby::Entity,
27
+ success: MethodRuby::Models::EntityCreateResponse::success
28
+ }
29
+
30
+ type success = true
31
+
32
+ module Success
33
+ extend MethodRuby::Internal::Type::Enum
34
+
35
+ TRUE: true
36
+
37
+ def self?.values: -> ::Array[MethodRuby::Models::EntityCreateResponse::success]
38
+ end
39
+ end
40
+ end
41
+ end