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,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Internal
5
+ extend MethodRuby::Internal::Util::SorbetRuntimeSupport
6
+
7
+ OMIT =
8
+ Object.new.tap do
9
+ _1.define_singleton_method(:inspect) { "#<#{MethodRuby::Internal}::OMIT>" }
10
+ end
11
+ .freeze
12
+
13
+ define_sorbet_constant!(:AnyHash) do
14
+ T.type_alias { T::Hash[Symbol, T.anything] }
15
+ end
16
+ define_sorbet_constant!(:FileInput) do
17
+ T.type_alias { T.any(Pathname, StringIO, IO, String, MethodRuby::FilePart) }
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ class Address < MethodRuby::Internal::Type::BaseModel
6
+ # @!attribute city
7
+ #
8
+ # @return [String, nil]
9
+ optional :city, String, nil?: true
10
+
11
+ # @!attribute line1
12
+ # Street address line 1
13
+ #
14
+ # @return [String, nil]
15
+ optional :line1, String, nil?: true
16
+
17
+ # @!attribute line2
18
+ # Street address line 2
19
+ #
20
+ # @return [String, nil]
21
+ optional :line2, String, nil?: true
22
+
23
+ # @!attribute state
24
+ #
25
+ # @return [String, nil]
26
+ optional :state, String, nil?: true
27
+
28
+ # @!attribute zip
29
+ #
30
+ # @return [String, nil]
31
+ optional :zip, String, nil?: true
32
+
33
+ # @!method initialize(city: nil, line1: nil, line2: nil, state: nil, zip: nil)
34
+ # @param city [String, nil]
35
+ #
36
+ # @param line1 [String, nil] Street address line 1
37
+ #
38
+ # @param line2 [String, nil] Street address line 2
39
+ #
40
+ # @param state [String, nil]
41
+ #
42
+ # @param zip [String, nil]
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,102 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ class Entity < MethodRuby::Internal::Type::BaseModel
6
+ # @!attribute id
7
+ #
8
+ # @return [String]
9
+ required :id, String
10
+
11
+ # @!attribute status
12
+ #
13
+ # @return [Symbol, MethodRuby::Models::Entity::Status]
14
+ required :status, enum: -> { MethodRuby::Entity::Status }
15
+
16
+ # @!attribute type
17
+ #
18
+ # @return [Symbol, MethodRuby::Models::Entity::Type]
19
+ required :type, enum: -> { MethodRuby::Entity::Type }
20
+
21
+ # @!attribute address
22
+ #
23
+ # @return [MethodRuby::Models::Address, nil]
24
+ optional :address, -> { MethodRuby::Address }
25
+
26
+ # @!attribute corporation
27
+ #
28
+ # @return [MethodRuby::Models::EntityCorporation, nil]
29
+ optional :corporation, -> { MethodRuby::EntityCorporation }, nil?: true
30
+
31
+ # @!attribute created_at
32
+ #
33
+ # @return [Time, nil]
34
+ optional :created_at, Time
35
+
36
+ # @!attribute error
37
+ #
38
+ # @return [MethodRuby::Models::ResourceError, nil]
39
+ optional :error, -> { MethodRuby::ResourceError }, nil?: true
40
+
41
+ # @!attribute individual
42
+ #
43
+ # @return [MethodRuby::Models::EntityIndividual, nil]
44
+ optional :individual, -> { MethodRuby::EntityIndividual }, nil?: true
45
+
46
+ # @!attribute metadata
47
+ # Custom metadata associated with the resource
48
+ #
49
+ # @return [Hash{Symbol=>Object}, nil]
50
+ optional :metadata, MethodRuby::Internal::Type::HashOf[MethodRuby::Internal::Type::Unknown], nil?: true
51
+
52
+ # @!attribute updated_at
53
+ #
54
+ # @return [Time, nil]
55
+ optional :updated_at, Time
56
+
57
+ # @!method initialize(id:, status:, type:, address: nil, corporation: nil, created_at: nil, error: nil, individual: nil, metadata: nil, updated_at: nil)
58
+ # @param id [String]
59
+ #
60
+ # @param status [Symbol, MethodRuby::Models::Entity::Status]
61
+ #
62
+ # @param type [Symbol, MethodRuby::Models::Entity::Type]
63
+ #
64
+ # @param address [MethodRuby::Models::Address]
65
+ #
66
+ # @param corporation [MethodRuby::Models::EntityCorporation, nil]
67
+ #
68
+ # @param created_at [Time]
69
+ #
70
+ # @param error [MethodRuby::Models::ResourceError, nil]
71
+ #
72
+ # @param individual [MethodRuby::Models::EntityIndividual, nil]
73
+ #
74
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata associated with the resource
75
+ #
76
+ # @param updated_at [Time]
77
+
78
+ # @see MethodRuby::Models::Entity#status
79
+ module Status
80
+ extend MethodRuby::Internal::Type::Enum
81
+
82
+ ACTIVE = :active
83
+ INCOMPLETE = :incomplete
84
+ DISABLED = :disabled
85
+
86
+ # @!method self.values
87
+ # @return [Array<Symbol>]
88
+ end
89
+
90
+ # @see MethodRuby::Models::Entity#type
91
+ module Type
92
+ extend MethodRuby::Internal::Type::Enum
93
+
94
+ INDIVIDUAL = :individual
95
+ CORPORATION = :corporation
96
+
97
+ # @!method self.values
98
+ # @return [Array<Symbol>]
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ class EntityCorporation < MethodRuby::Internal::Type::BaseModel
6
+ # @!attribute dba
7
+ #
8
+ # @return [String, nil]
9
+ optional :dba, String, nil?: true
10
+
11
+ # @!attribute ein
12
+ #
13
+ # @return [String, nil]
14
+ optional :ein, String
15
+
16
+ # @!attribute name
17
+ #
18
+ # @return [String, nil]
19
+ optional :name, String
20
+
21
+ # @!attribute owners
22
+ #
23
+ # @return [Array<MethodRuby::Models::EntityCorporationOwner>, nil]
24
+ optional :owners, -> { MethodRuby::Internal::Type::ArrayOf[MethodRuby::EntityCorporationOwner] }
25
+
26
+ # @!method initialize(dba: nil, ein: nil, name: nil, owners: nil)
27
+ # @param dba [String, nil]
28
+ # @param ein [String]
29
+ # @param name [String]
30
+ # @param owners [Array<MethodRuby::Models::EntityCorporationOwner>]
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ class EntityCorporationOwner < MethodRuby::Internal::Type::BaseModel
6
+ # @!attribute address
7
+ #
8
+ # @return [MethodRuby::Models::Address, nil]
9
+ optional :address, -> { MethodRuby::Address }
10
+
11
+ # @!attribute dob
12
+ #
13
+ # @return [Date, nil]
14
+ optional :dob, Date
15
+
16
+ # @!attribute email
17
+ #
18
+ # @return [String, nil]
19
+ optional :email, String
20
+
21
+ # @!attribute first_name
22
+ #
23
+ # @return [String, nil]
24
+ optional :first_name, String
25
+
26
+ # @!attribute last_name
27
+ #
28
+ # @return [String, nil]
29
+ optional :last_name, String
30
+
31
+ # @!attribute phone
32
+ #
33
+ # @return [String, nil]
34
+ optional :phone, String
35
+
36
+ # @!method initialize(address: nil, dob: nil, email: nil, first_name: nil, last_name: nil, phone: nil)
37
+ # @param address [MethodRuby::Models::Address]
38
+ # @param dob [Date]
39
+ # @param email [String]
40
+ # @param first_name [String]
41
+ # @param last_name [String]
42
+ # @param phone [String]
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,188 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#create
6
+ class EntityCreateParams < MethodRuby::Internal::Type::BaseModel
7
+ extend MethodRuby::Internal::Type::RequestParameters::Converter
8
+ include MethodRuby::Internal::Type::RequestParameters
9
+
10
+ # @!attribute body
11
+ #
12
+ # @return [MethodRuby::Models::EntityCreateParams::Body::Individual, MethodRuby::Models::EntityCreateParams::Body::Corporation]
13
+ required :body, union: -> { MethodRuby::EntityCreateParams::Body }
14
+
15
+ # @!attribute idempotency_key
16
+ #
17
+ # @return [String, nil]
18
+ optional :idempotency_key, String
19
+
20
+ # @!attribute method_version
21
+ #
22
+ # @return [Symbol, MethodRuby::Models::EntityCreateParams::MethodVersion, nil]
23
+ optional :method_version, enum: -> { MethodRuby::EntityCreateParams::MethodVersion }
24
+
25
+ # @!method initialize(body:, idempotency_key: nil, method_version: nil, request_options: {})
26
+ # @param body [MethodRuby::Models::EntityCreateParams::Body::Individual, MethodRuby::Models::EntityCreateParams::Body::Corporation]
27
+ # @param idempotency_key [String]
28
+ # @param method_version [Symbol, MethodRuby::Models::EntityCreateParams::MethodVersion]
29
+ # @param request_options [MethodRuby::RequestOptions, Hash{Symbol=>Object}]
30
+
31
+ module Body
32
+ extend MethodRuby::Internal::Type::Union
33
+
34
+ discriminator :type
35
+
36
+ variant :individual, -> { MethodRuby::EntityCreateParams::Body::Individual }
37
+
38
+ variant :corporation, -> { MethodRuby::EntityCreateParams::Body::Corporation }
39
+
40
+ class Individual < MethodRuby::Internal::Type::BaseModel
41
+ # @!attribute individual
42
+ #
43
+ # @return [MethodRuby::Models::EntityCreateParams::Body::Individual::Individual]
44
+ required :individual, -> { MethodRuby::EntityCreateParams::Body::Individual::Individual }
45
+
46
+ # @!attribute type
47
+ #
48
+ # @return [Symbol, :individual]
49
+ required :type, const: :individual
50
+
51
+ # @!attribute address
52
+ #
53
+ # @return [MethodRuby::Models::Address, nil]
54
+ optional :address, -> { MethodRuby::Address }
55
+
56
+ # @!attribute metadata
57
+ # Custom metadata associated with the resource
58
+ #
59
+ # @return [Hash{Symbol=>Object}, nil]
60
+ optional :metadata,
61
+ MethodRuby::Internal::Type::HashOf[MethodRuby::Internal::Type::Unknown],
62
+ nil?: true
63
+
64
+ # @!method initialize(individual:, address: nil, metadata: nil, type: :individual)
65
+ # @param individual [MethodRuby::Models::EntityCreateParams::Body::Individual::Individual]
66
+ #
67
+ # @param address [MethodRuby::Models::Address]
68
+ #
69
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata associated with the resource
70
+ #
71
+ # @param type [Symbol, :individual]
72
+
73
+ # @see MethodRuby::Models::EntityCreateParams::Body::Individual#individual
74
+ class Individual < MethodRuby::Internal::Type::BaseModel
75
+ # @!attribute first_name
76
+ #
77
+ # @return [String]
78
+ required :first_name, String
79
+
80
+ # @!attribute last_name
81
+ #
82
+ # @return [String]
83
+ required :last_name, String
84
+
85
+ # @!attribute dob
86
+ #
87
+ # @return [Date, nil]
88
+ optional :dob, Date
89
+
90
+ # @!attribute email
91
+ #
92
+ # @return [String, nil]
93
+ optional :email, String
94
+
95
+ # @!attribute phone
96
+ #
97
+ # @return [String, nil]
98
+ optional :phone, String
99
+
100
+ # @!method initialize(first_name:, last_name:, dob: nil, email: nil, phone: nil)
101
+ # @param first_name [String]
102
+ # @param last_name [String]
103
+ # @param dob [Date]
104
+ # @param email [String]
105
+ # @param phone [String]
106
+ end
107
+ end
108
+
109
+ class Corporation < MethodRuby::Internal::Type::BaseModel
110
+ # @!attribute corporation
111
+ #
112
+ # @return [MethodRuby::Models::EntityCreateParams::Body::Corporation::Corporation]
113
+ required :corporation, -> { MethodRuby::EntityCreateParams::Body::Corporation::Corporation }
114
+
115
+ # @!attribute type
116
+ #
117
+ # @return [Symbol, :corporation]
118
+ required :type, const: :corporation
119
+
120
+ # @!attribute address
121
+ #
122
+ # @return [MethodRuby::Models::Address, nil]
123
+ optional :address, -> { MethodRuby::Address }
124
+
125
+ # @!attribute metadata
126
+ # Custom metadata associated with the resource
127
+ #
128
+ # @return [Hash{Symbol=>Object}, nil]
129
+ optional :metadata,
130
+ MethodRuby::Internal::Type::HashOf[MethodRuby::Internal::Type::Unknown],
131
+ nil?: true
132
+
133
+ # @!method initialize(corporation:, address: nil, metadata: nil, type: :corporation)
134
+ # @param corporation [MethodRuby::Models::EntityCreateParams::Body::Corporation::Corporation]
135
+ #
136
+ # @param address [MethodRuby::Models::Address]
137
+ #
138
+ # @param metadata [Hash{Symbol=>Object}, nil] Custom metadata associated with the resource
139
+ #
140
+ # @param type [Symbol, :corporation]
141
+
142
+ # @see MethodRuby::Models::EntityCreateParams::Body::Corporation#corporation
143
+ class Corporation < MethodRuby::Internal::Type::BaseModel
144
+ # @!attribute name
145
+ #
146
+ # @return [String]
147
+ required :name, String
148
+
149
+ # @!attribute dba
150
+ #
151
+ # @return [String, nil]
152
+ optional :dba, String
153
+
154
+ # @!attribute ein
155
+ #
156
+ # @return [String, nil]
157
+ optional :ein, String
158
+
159
+ # @!attribute owners
160
+ #
161
+ # @return [Array<MethodRuby::Models::EntityCorporationOwner>, nil]
162
+ optional :owners, -> { MethodRuby::Internal::Type::ArrayOf[MethodRuby::EntityCorporationOwner] }
163
+
164
+ # @!method initialize(name:, dba: nil, ein: nil, owners: nil)
165
+ # @param name [String]
166
+ # @param dba [String]
167
+ # @param ein [String]
168
+ # @param owners [Array<MethodRuby::Models::EntityCorporationOwner>]
169
+ end
170
+ end
171
+
172
+ # @!method self.variants
173
+ # @return [Array(MethodRuby::Models::EntityCreateParams::Body::Individual, MethodRuby::Models::EntityCreateParams::Body::Corporation)]
174
+ end
175
+
176
+ module MethodVersion
177
+ extend MethodRuby::Internal::Type::Enum
178
+
179
+ METHOD_VERSION_2024_04_04 = :"2024-04-04"
180
+ METHOD_VERSION_2025_07_04 = :"2025-07-04"
181
+ METHOD_VERSION_2025_12_01 = :"2025-12-01"
182
+
183
+ # @!method self.values
184
+ # @return [Array<Symbol>]
185
+ end
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#create
6
+ class EntityCreateResponse < MethodRuby::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ #
9
+ # @return [MethodRuby::Models::Entity, nil]
10
+ optional :data, -> { MethodRuby::Entity }
11
+
12
+ # @!attribute success
13
+ #
14
+ # @return [Boolean, MethodRuby::Models::EntityCreateResponse::Success, nil]
15
+ optional :success, enum: -> { MethodRuby::Models::EntityCreateResponse::Success }
16
+
17
+ # @!method initialize(data: nil, success: nil)
18
+ # @param data [MethodRuby::Models::Entity]
19
+ # @param success [Boolean, MethodRuby::Models::EntityCreateResponse::Success]
20
+
21
+ # @see MethodRuby::Models::EntityCreateResponse#success
22
+ module Success
23
+ extend MethodRuby::Internal::Type::Enum
24
+
25
+ TRUE = true
26
+
27
+ # @!method self.values
28
+ # @return [Array<Boolean>]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ class EntityIndividual < MethodRuby::Internal::Type::BaseModel
6
+ # @!attribute dob
7
+ #
8
+ # @return [Date, nil]
9
+ optional :dob, Date, nil?: true
10
+
11
+ # @!attribute email
12
+ #
13
+ # @return [String, nil]
14
+ optional :email, String, nil?: true
15
+
16
+ # @!attribute first_name
17
+ #
18
+ # @return [String, nil]
19
+ optional :first_name, String
20
+
21
+ # @!attribute last_name
22
+ #
23
+ # @return [String, nil]
24
+ optional :last_name, String
25
+
26
+ # @!attribute phone
27
+ #
28
+ # @return [String, nil]
29
+ optional :phone, String, nil?: true
30
+
31
+ # @!method initialize(dob: nil, email: nil, first_name: nil, last_name: nil, phone: nil)
32
+ # @param dob [Date, nil]
33
+ # @param email [String, nil]
34
+ # @param first_name [String]
35
+ # @param last_name [String]
36
+ # @param phone [String, nil]
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#list
6
+ class EntityListParams < MethodRuby::Internal::Type::BaseModel
7
+ extend MethodRuby::Internal::Type::RequestParameters::Converter
8
+ include MethodRuby::Internal::Type::RequestParameters
9
+
10
+ # @!attribute from_date
11
+ #
12
+ # @return [Date, nil]
13
+ optional :from_date, Date
14
+
15
+ # @!attribute page
16
+ #
17
+ # @return [Integer, nil]
18
+ optional :page, Integer
19
+
20
+ # @!attribute page_cursor
21
+ #
22
+ # @return [String, nil]
23
+ optional :page_cursor, String
24
+
25
+ # @!attribute page_limit
26
+ #
27
+ # @return [Integer, nil]
28
+ optional :page_limit, Integer
29
+
30
+ # @!attribute to_date
31
+ #
32
+ # @return [Date, nil]
33
+ optional :to_date, Date
34
+
35
+ # @!attribute method_version
36
+ #
37
+ # @return [Symbol, MethodRuby::Models::EntityListParams::MethodVersion, nil]
38
+ optional :method_version, enum: -> { MethodRuby::EntityListParams::MethodVersion }
39
+
40
+ # @!method initialize(from_date: nil, page: nil, page_cursor: nil, page_limit: nil, to_date: nil, method_version: nil, request_options: {})
41
+ # @param from_date [Date]
42
+ # @param page [Integer]
43
+ # @param page_cursor [String]
44
+ # @param page_limit [Integer]
45
+ # @param to_date [Date]
46
+ # @param method_version [Symbol, MethodRuby::Models::EntityListParams::MethodVersion]
47
+ # @param request_options [MethodRuby::RequestOptions, Hash{Symbol=>Object}]
48
+
49
+ module MethodVersion
50
+ extend MethodRuby::Internal::Type::Enum
51
+
52
+ METHOD_VERSION_2024_04_04 = :"2024-04-04"
53
+ METHOD_VERSION_2025_07_04 = :"2025-07-04"
54
+ METHOD_VERSION_2025_12_01 = :"2025-12-01"
55
+
56
+ # @!method self.values
57
+ # @return [Array<Symbol>]
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#list
6
+ class EntityListResponse < MethodRuby::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ #
9
+ # @return [Array<MethodRuby::Models::Entity>, nil]
10
+ optional :data, -> { MethodRuby::Internal::Type::ArrayOf[MethodRuby::Entity] }
11
+
12
+ # @!attribute success
13
+ #
14
+ # @return [Boolean, MethodRuby::Models::EntityListResponse::Success, nil]
15
+ optional :success, enum: -> { MethodRuby::Models::EntityListResponse::Success }
16
+
17
+ # @!method initialize(data: nil, success: nil)
18
+ # @param data [Array<MethodRuby::Models::Entity>]
19
+ # @param success [Boolean, MethodRuby::Models::EntityListResponse::Success]
20
+
21
+ # @see MethodRuby::Models::EntityListResponse#success
22
+ module Success
23
+ extend MethodRuby::Internal::Type::Enum
24
+
25
+ TRUE = true
26
+
27
+ # @!method self.values
28
+ # @return [Array<Boolean>]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#retrieve
6
+ class EntityRetrieveParams < MethodRuby::Internal::Type::BaseModel
7
+ extend MethodRuby::Internal::Type::RequestParameters::Converter
8
+ include MethodRuby::Internal::Type::RequestParameters
9
+
10
+ # @!attribute ent_id
11
+ #
12
+ # @return [String]
13
+ required :ent_id, String
14
+
15
+ # @!attribute method_version
16
+ #
17
+ # @return [Symbol, MethodRuby::Models::EntityRetrieveParams::MethodVersion, nil]
18
+ optional :method_version, enum: -> { MethodRuby::EntityRetrieveParams::MethodVersion }
19
+
20
+ # @!method initialize(ent_id:, method_version: nil, request_options: {})
21
+ # @param ent_id [String]
22
+ # @param method_version [Symbol, MethodRuby::Models::EntityRetrieveParams::MethodVersion]
23
+ # @param request_options [MethodRuby::RequestOptions, Hash{Symbol=>Object}]
24
+
25
+ module MethodVersion
26
+ extend MethodRuby::Internal::Type::Enum
27
+
28
+ METHOD_VERSION_2024_04_04 = :"2024-04-04"
29
+ METHOD_VERSION_2025_07_04 = :"2025-07-04"
30
+ METHOD_VERSION_2025_12_01 = :"2025-12-01"
31
+
32
+ # @!method self.values
33
+ # @return [Array<Symbol>]
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MethodRuby
4
+ module Models
5
+ # @see MethodRuby::Resources::Entities#retrieve
6
+ class EntityRetrieveResponse < MethodRuby::Internal::Type::BaseModel
7
+ # @!attribute data
8
+ #
9
+ # @return [MethodRuby::Models::Entity, nil]
10
+ optional :data, -> { MethodRuby::Entity }
11
+
12
+ # @!attribute success
13
+ #
14
+ # @return [Boolean, MethodRuby::Models::EntityRetrieveResponse::Success, nil]
15
+ optional :success, enum: -> { MethodRuby::Models::EntityRetrieveResponse::Success }
16
+
17
+ # @!method initialize(data: nil, success: nil)
18
+ # @param data [MethodRuby::Models::Entity]
19
+ # @param success [Boolean, MethodRuby::Models::EntityRetrieveResponse::Success]
20
+
21
+ # @see MethodRuby::Models::EntityRetrieveResponse#success
22
+ module Success
23
+ extend MethodRuby::Internal::Type::Enum
24
+
25
+ TRUE = true
26
+
27
+ # @!method self.values
28
+ # @return [Array<Boolean>]
29
+ end
30
+ end
31
+ end
32
+ end