lob 6.0.9 → 6.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +21 -17
- data/__tests__/Api/Address.unit.rb +8 -8
- data/__tests__/Api/BankAccount.unit.rb +2 -2
- data/__tests__/Integration/Address.spec.rb +3 -3
- data/__tests__/Integration/Check.spec.rb +1 -1
- data/__tests__/Integration/Letter.spec.rb +1 -1
- data/__tests__/Integration/Postcard.spec.rb +36 -0
- data/__tests__/Integration/SelfMailer.spec.rb +20 -0
- data/__tests__/Integration/Template.spec.rb +3 -2
- data/__tests__/Integration/UsAutocompletion.spec.rb +0 -1
- data/docs/Address.md +3 -3
- data/docs/IntlAddress.md +2 -2
- data/lib/lob/models/address.rb +76 -587
- data/lib/lob/models/bank_account.rb +15 -4
- data/lib/lob/models/bank_account_verify.rb +69 -13
- data/lib/lob/models/intl_address.rb +12 -14
- data/lib/lob/version.rb +1 -1
- data/lib/lob.rb +3 -0
- data/spec/api/bank_accounts_api_spec.rb +77 -44
- metadata +25 -30
- data/lib/openapi_client/api_client.rb +0 -392
- data/lib/openapi_client/api_error.rb +0 -57
- data/lib/openapi_client/configuration.rb +0 -279
- data/lib/openapi_client/version.rb +0 -15
- data/lib/openapi_client.rb +0 -212
|
@@ -55,6 +55,9 @@ module Lob
|
|
|
55
55
|
|
|
56
56
|
attr_accessor :object
|
|
57
57
|
|
|
58
|
+
# The type of microdeposit verification used for this bank account. Either "amounts" or "descriptor_code", or null once verified.
|
|
59
|
+
attr_accessor :microdeposit_type
|
|
60
|
+
|
|
58
61
|
class EnumAttributeValidator
|
|
59
62
|
attr_reader :datatype
|
|
60
63
|
attr_reader :allowable_values
|
|
@@ -93,7 +96,8 @@ module Lob
|
|
|
93
96
|
:'date_created' => :'date_created',
|
|
94
97
|
:'date_modified' => :'date_modified',
|
|
95
98
|
:'deleted' => :'deleted',
|
|
96
|
-
:'object' => :'object'
|
|
99
|
+
:'object' => :'object',
|
|
100
|
+
:'microdeposit_type' => :'microdeposit_type'
|
|
97
101
|
}
|
|
98
102
|
end
|
|
99
103
|
|
|
@@ -118,7 +122,8 @@ module Lob
|
|
|
118
122
|
:'date_created' => :'Time',
|
|
119
123
|
:'date_modified' => :'Time',
|
|
120
124
|
:'deleted' => :'Boolean',
|
|
121
|
-
:'object' => :'String'
|
|
125
|
+
:'object' => :'String',
|
|
126
|
+
:'microdeposit_type' => :'String'
|
|
122
127
|
}
|
|
123
128
|
end
|
|
124
129
|
|
|
@@ -127,6 +132,7 @@ module Lob
|
|
|
127
132
|
Set.new([
|
|
128
133
|
:'description',
|
|
129
134
|
:'signature_url',
|
|
135
|
+
:'microdeposit_type',
|
|
130
136
|
])
|
|
131
137
|
end
|
|
132
138
|
|
|
@@ -206,6 +212,10 @@ module Lob
|
|
|
206
212
|
else
|
|
207
213
|
self.object = 'bank_account'
|
|
208
214
|
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'microdeposit_type')
|
|
217
|
+
self.microdeposit_type = attributes[:'microdeposit_type']
|
|
218
|
+
end
|
|
209
219
|
end
|
|
210
220
|
|
|
211
221
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -428,7 +438,8 @@ module Lob
|
|
|
428
438
|
date_created == o.date_created &&
|
|
429
439
|
date_modified == o.date_modified &&
|
|
430
440
|
deleted == o.deleted &&
|
|
431
|
-
object == o.object
|
|
441
|
+
object == o.object &&
|
|
442
|
+
microdeposit_type == o.microdeposit_type
|
|
432
443
|
end
|
|
433
444
|
|
|
434
445
|
# @see the `==` method
|
|
@@ -440,7 +451,7 @@ module Lob
|
|
|
440
451
|
# Calculates hash code according to all attributes.
|
|
441
452
|
# @return [Integer] Hash code
|
|
442
453
|
def hash
|
|
443
|
-
[description, routing_number, account_number, account_type, signatory, metadata, id, signature_url, bank_name, verified, date_created, date_modified, deleted, object].hash
|
|
454
|
+
[description, routing_number, account_number, account_type, signatory, metadata, id, signature_url, bank_name, verified, date_created, date_modified, deleted, object, microdeposit_type].hash
|
|
444
455
|
end
|
|
445
456
|
|
|
446
457
|
|
|
@@ -18,10 +18,14 @@ module Lob
|
|
|
18
18
|
# In live mode, an array containing the two micro deposits (in cents) placed in the bank account. In test mode, no micro deposits will be placed, so any two integers between `1` and `100` will work.
|
|
19
19
|
attr_accessor :amounts
|
|
20
20
|
|
|
21
|
+
# The 6-character code (beginning with SM) from the bank statement descriptor of the single $0.01 microdeposit. Required when microdeposit_type is descriptor_code.
|
|
22
|
+
attr_accessor :descriptor_code
|
|
23
|
+
|
|
21
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
25
|
def self.attribute_map
|
|
23
26
|
{
|
|
24
|
-
:'amounts' => :'amounts'
|
|
27
|
+
:'amounts' => :'amounts',
|
|
28
|
+
:'descriptor_code' => :'descriptor_code'
|
|
25
29
|
}
|
|
26
30
|
end
|
|
27
31
|
|
|
@@ -33,7 +37,8 @@ module Lob
|
|
|
33
37
|
# Attribute type mapping.
|
|
34
38
|
def self.openapi_types
|
|
35
39
|
{
|
|
36
|
-
:'amounts' => :'Array<Integer>'
|
|
40
|
+
:'amounts' => :'Array<Integer>',
|
|
41
|
+
:'descriptor_code' => :'String'
|
|
37
42
|
}
|
|
38
43
|
end
|
|
39
44
|
|
|
@@ -63,22 +68,51 @@ module Lob
|
|
|
63
68
|
self.amounts = value
|
|
64
69
|
end
|
|
65
70
|
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'descriptor_code')
|
|
73
|
+
self.descriptor_code = attributes[:'descriptor_code']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
has_amounts = !@amounts.nil?
|
|
77
|
+
has_descriptor_code = !@descriptor_code.nil?
|
|
78
|
+
|
|
79
|
+
if !has_amounts && !has_descriptor_code
|
|
80
|
+
fail ArgumentError, 'one of "amounts" or "descriptor_code" must be provided'
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if has_amounts && has_descriptor_code
|
|
84
|
+
fail ArgumentError, 'only one of "amounts" or "descriptor_code" may be provided'
|
|
85
|
+
end
|
|
66
86
|
end
|
|
67
87
|
|
|
68
88
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
69
89
|
# @return Array for valid properties with the reasons
|
|
70
90
|
def list_invalid_properties
|
|
71
91
|
invalid_properties = Array.new
|
|
72
|
-
|
|
73
|
-
|
|
92
|
+
|
|
93
|
+
if @amounts.nil? && @descriptor_code.nil?
|
|
94
|
+
invalid_properties.push('one of "amounts" or "descriptor_code" must be provided')
|
|
74
95
|
end
|
|
75
96
|
|
|
76
|
-
if
|
|
77
|
-
invalid_properties.push('
|
|
97
|
+
if !@amounts.nil? && !@descriptor_code.nil?
|
|
98
|
+
invalid_properties.push('only one of "amounts" or "descriptor_code" may be provided')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if !@amounts.nil?
|
|
102
|
+
if @amounts.length > 2
|
|
103
|
+
invalid_properties.push('invalid value for "amounts", number of items must be less than or equal to 2.')
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @amounts.length < 2
|
|
107
|
+
invalid_properties.push('invalid value for "amounts", number of items must be greater than or equal to 2.')
|
|
108
|
+
end
|
|
78
109
|
end
|
|
79
110
|
|
|
80
|
-
if
|
|
81
|
-
|
|
111
|
+
if !@descriptor_code.nil?
|
|
112
|
+
pattern = Regexp.new(/^SM[a-zA-Z0-9]{4}$/)
|
|
113
|
+
if @descriptor_code !~ pattern
|
|
114
|
+
invalid_properties.push("invalid value for \"descriptor_code\", must conform to the pattern #{pattern}.")
|
|
115
|
+
end
|
|
82
116
|
end
|
|
83
117
|
|
|
84
118
|
invalid_properties
|
|
@@ -87,9 +121,15 @@ module Lob
|
|
|
87
121
|
# Check to see if the all the properties in the model are valid
|
|
88
122
|
# @return true if the model is valid
|
|
89
123
|
def valid?
|
|
90
|
-
return false if @amounts.nil?
|
|
91
|
-
return false if
|
|
92
|
-
|
|
124
|
+
return false if @amounts.nil? && @descriptor_code.nil?
|
|
125
|
+
return false if !@amounts.nil? && !@descriptor_code.nil?
|
|
126
|
+
if !@amounts.nil?
|
|
127
|
+
return false if @amounts.length > 2
|
|
128
|
+
return false if @amounts.length < 2
|
|
129
|
+
end
|
|
130
|
+
if !@descriptor_code.nil?
|
|
131
|
+
return false if @descriptor_code !~ Regexp.new(/^SM[a-zA-Z0-9]{4}$/)
|
|
132
|
+
end
|
|
93
133
|
true
|
|
94
134
|
end
|
|
95
135
|
|
|
@@ -111,12 +151,28 @@ module Lob
|
|
|
111
151
|
@amounts = amounts
|
|
112
152
|
end
|
|
113
153
|
|
|
154
|
+
# Custom attribute writer method with validation
|
|
155
|
+
# @param [Object] descriptor_code Value to be assigned
|
|
156
|
+
def descriptor_code=(descriptor_code)
|
|
157
|
+
if descriptor_code.nil?
|
|
158
|
+
fail ArgumentError, 'descriptor_code cannot be nil'
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
pattern = Regexp.new(/^SM[a-zA-Z0-9]{4}$/)
|
|
162
|
+
if descriptor_code !~ pattern
|
|
163
|
+
fail ArgumentError, "invalid value for \"descriptor_code\", must conform to the pattern #{pattern}."
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@descriptor_code = descriptor_code
|
|
167
|
+
end
|
|
168
|
+
|
|
114
169
|
# Checks equality by comparing each attribute.
|
|
115
170
|
# @param [Object] Object to be compared
|
|
116
171
|
def ==(o)
|
|
117
172
|
return true if self.equal?(o)
|
|
118
173
|
self.class == o.class &&
|
|
119
|
-
amounts == o.amounts
|
|
174
|
+
amounts == o.amounts &&
|
|
175
|
+
descriptor_code == o.descriptor_code
|
|
120
176
|
end
|
|
121
177
|
|
|
122
178
|
# @see the `==` method
|
|
@@ -128,7 +184,7 @@ module Lob
|
|
|
128
184
|
# Calculates hash code according to all attributes.
|
|
129
185
|
# @return [Integer] Hash code
|
|
130
186
|
def hash
|
|
131
|
-
[amounts].hash
|
|
187
|
+
[amounts, descriptor_code].hash
|
|
132
188
|
end
|
|
133
189
|
|
|
134
190
|
|
|
@@ -42,10 +42,10 @@ module Lob
|
|
|
42
42
|
|
|
43
43
|
attr_accessor :address_city
|
|
44
44
|
|
|
45
|
-
#
|
|
45
|
+
# Must be no longer than 200 characters.
|
|
46
46
|
attr_accessor :address_state
|
|
47
47
|
|
|
48
|
-
# Must
|
|
48
|
+
# Must be no longer than 40 characters.
|
|
49
49
|
attr_accessor :address_zip
|
|
50
50
|
|
|
51
51
|
attr_accessor :address_country
|
|
@@ -294,13 +294,12 @@ module Lob
|
|
|
294
294
|
invalid_properties.push('invalid value for "address_city", the character length must be smaller than or equal to 200.')
|
|
295
295
|
end
|
|
296
296
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
invalid_properties.push("invalid value for \"address_state\", must conform to the pattern #{pattern}.")
|
|
297
|
+
if !@address_state.nil? && @address_state.to_s.length > 200
|
|
298
|
+
invalid_properties.push('invalid value for "address_state", the character length must be smaller than or equal to 200.')
|
|
300
299
|
end
|
|
301
300
|
|
|
302
|
-
if !@address_zip.nil? && @address_zip.to_s.length >
|
|
303
|
-
invalid_properties.push('invalid value for "address_zip", the character length must be smaller than or equal to
|
|
301
|
+
if !@address_zip.nil? && @address_zip.to_s.length > 40
|
|
302
|
+
invalid_properties.push('invalid value for "address_zip", the character length must be smaller than or equal to 40.')
|
|
304
303
|
end
|
|
305
304
|
|
|
306
305
|
invalid_properties
|
|
@@ -318,8 +317,8 @@ module Lob
|
|
|
318
317
|
return false if !@address_line1.nil? && @address_line1.to_s.length > 64
|
|
319
318
|
return false if !@address_line2.nil? && @address_line2.to_s.length > 64
|
|
320
319
|
return false if !@address_city.nil? && @address_city.to_s.length > 200
|
|
321
|
-
return false if !@address_state.nil? && @address_state
|
|
322
|
-
return false if !@address_zip.nil? && @address_zip.to_s.length >
|
|
320
|
+
return false if !@address_state.nil? && @address_state.to_s.length > 200
|
|
321
|
+
return false if !@address_zip.nil? && @address_zip.to_s.length > 40
|
|
323
322
|
object_validator = EnumAttributeValidator.new('String', ["address"])
|
|
324
323
|
return false unless object_validator.valid?(@object)
|
|
325
324
|
true
|
|
@@ -425,9 +424,8 @@ module Lob
|
|
|
425
424
|
# Custom attribute writer method with validation
|
|
426
425
|
# @param [Object] address_state Value to be assigned
|
|
427
426
|
def address_state=(address_state)
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
fail ArgumentError, "invalid value for \"address_state\", must conform to the pattern #{pattern}."
|
|
427
|
+
if !address_state.nil? && address_state.to_s.length > 200
|
|
428
|
+
fail ArgumentError, 'invalid value for "address_state", the character length must be smaller than or equal to 200.'
|
|
431
429
|
end
|
|
432
430
|
|
|
433
431
|
@address_state = address_state
|
|
@@ -436,8 +434,8 @@ module Lob
|
|
|
436
434
|
# Custom attribute writer method with validation
|
|
437
435
|
# @param [Object] address_zip Value to be assigned
|
|
438
436
|
def address_zip=(address_zip)
|
|
439
|
-
if !address_zip.nil? && address_zip.to_s.length >
|
|
440
|
-
fail ArgumentError, 'invalid value for "address_zip", the character length must be smaller than or equal to
|
|
437
|
+
if !address_zip.nil? && address_zip.to_s.length > 40
|
|
438
|
+
fail ArgumentError, 'invalid value for "address_zip", the character length must be smaller than or equal to 40.'
|
|
441
439
|
end
|
|
442
440
|
|
|
443
441
|
@address_zip = address_zip
|
data/lib/lob/version.rb
CHANGED
data/lib/lob.rb
CHANGED
|
@@ -65,6 +65,7 @@ require 'lob/models/cmp_schedule_type'
|
|
|
65
65
|
require 'lob/models/cmp_use_type'
|
|
66
66
|
require 'lob/models/country_extended'
|
|
67
67
|
require 'lob/models/country_extended_expanded'
|
|
68
|
+
require 'lob/models/country_extended_expanded_no_us'
|
|
68
69
|
require 'lob/models/creative_patch'
|
|
69
70
|
require 'lob/models/creative_response'
|
|
70
71
|
require 'lob/models/creative_writable'
|
|
@@ -81,6 +82,7 @@ require 'lob/models/geocode_components'
|
|
|
81
82
|
require 'lob/models/http_validation_error'
|
|
82
83
|
require 'lob/models/identity_validation'
|
|
83
84
|
require 'lob/models/inline_object'
|
|
85
|
+
require 'lob/models/intl_address'
|
|
84
86
|
require 'lob/models/intl_autocompletions'
|
|
85
87
|
require 'lob/models/intl_autocompletions_writable'
|
|
86
88
|
require 'lob/models/intl_components'
|
|
@@ -161,6 +163,7 @@ require 'lob/models/upload_state'
|
|
|
161
163
|
require 'lob/models/upload_updatable'
|
|
162
164
|
require 'lob/models/upload_writable'
|
|
163
165
|
require 'lob/models/uploads_metadata'
|
|
166
|
+
require 'lob/models/us_address'
|
|
164
167
|
require 'lob/models/us_autocompletions'
|
|
165
168
|
require 'lob/models/us_autocompletions_writable'
|
|
166
169
|
require 'lob/models/us_components'
|
|
@@ -13,89 +13,122 @@ OpenAPI Generator version: 5.2.1
|
|
|
13
13
|
require 'spec_helper'
|
|
14
14
|
require 'json'
|
|
15
15
|
|
|
16
|
-
# Unit tests for Lob::BankAccountsApi
|
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
-
# Please update as you see appropriate
|
|
19
16
|
describe 'BankAccountsApi' do
|
|
20
17
|
before do
|
|
21
|
-
# run before each test
|
|
22
18
|
@api_instance = Lob::BankAccountsApi.new
|
|
23
19
|
end
|
|
24
20
|
|
|
25
|
-
after do
|
|
26
|
-
# run after each test
|
|
27
|
-
end
|
|
28
|
-
|
|
29
21
|
describe 'test an instance of BankAccountsApi' do
|
|
30
22
|
it 'should create an instance of BankAccountsApi' do
|
|
31
23
|
expect(@api_instance).to be_instance_of(Lob::BankAccountsApi)
|
|
32
24
|
end
|
|
33
25
|
end
|
|
34
26
|
|
|
35
|
-
# unit tests for bank_account_create
|
|
36
|
-
# create
|
|
37
|
-
# Creates a new bank account with the provided properties. Bank accounts created in live mode will need to be verified via micro deposits before being able to send live checks. The deposits will appear in the bank account in 2-3 business days and have the description \"VERIFICATION\".
|
|
38
|
-
# @param bank_account_writable
|
|
39
|
-
# @param [Hash] opts the optional parameters
|
|
40
|
-
# @return [BankAccount]
|
|
41
27
|
describe 'bank_account_create test' do
|
|
42
28
|
it 'should work' do
|
|
43
29
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
44
30
|
end
|
|
45
31
|
end
|
|
46
32
|
|
|
47
|
-
# unit tests for bank_account_delete
|
|
48
|
-
# delete
|
|
49
|
-
# Permanently deletes a bank account. It cannot be undone.
|
|
50
|
-
# @param bank_id id of the bank account
|
|
51
|
-
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @return [BankAccountDeletion]
|
|
53
33
|
describe 'bank_account_delete test' do
|
|
54
34
|
it 'should work' do
|
|
55
35
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
56
36
|
end
|
|
57
37
|
end
|
|
58
38
|
|
|
59
|
-
# unit tests for bank_account_retrieve
|
|
60
|
-
# get
|
|
61
|
-
# Retrieves the details of an existing bank account. You need only supply the unique bank account identifier that was returned upon bank account creation.
|
|
62
|
-
# @param bank_id id of the bank account
|
|
63
|
-
# @param [Hash] opts the optional parameters
|
|
64
|
-
# @return [BankAccount]
|
|
65
39
|
describe 'bank_account_retrieve test' do
|
|
66
40
|
it 'should work' do
|
|
67
41
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
68
42
|
end
|
|
69
43
|
end
|
|
70
44
|
|
|
71
|
-
# unit tests for bank_account_verify
|
|
72
|
-
# verify
|
|
73
|
-
# Verify a bank account in order to create a check.
|
|
74
|
-
# @param bank_id id of the bank account to be verified
|
|
75
|
-
# @param bank_account_verify
|
|
76
|
-
# @param [Hash] opts the optional parameters
|
|
77
|
-
# @return [BankAccount]
|
|
78
45
|
describe 'bank_account_verify test' do
|
|
79
46
|
it 'should work' do
|
|
80
47
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
81
48
|
end
|
|
82
49
|
end
|
|
83
50
|
|
|
84
|
-
# unit tests for bank_accounts_list
|
|
85
|
-
# list
|
|
86
|
-
# Returns a list of your bank accounts. The bank accounts are returned sorted by creation date, with the most recently created bank accounts appearing first.
|
|
87
|
-
# @param [Hash] opts the optional parameters
|
|
88
|
-
# @option opts [Integer] :limit How many results to return.
|
|
89
|
-
# @option opts [String] :before A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response.
|
|
90
|
-
# @option opts [String] :after A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response.
|
|
91
|
-
# @option opts [Array<String>] :include Request that the response include the total count by specifying `include[]=total_count`.
|
|
92
|
-
# @option opts [Hash<String, Time>] :date_created Filter by date created.
|
|
93
|
-
# @option opts [Hash<String, String>] :metadata Filter by metadata key-value pair`.
|
|
94
|
-
# @return [BankAccountList]
|
|
95
51
|
describe 'bank_accounts_list test' do
|
|
96
52
|
it 'should work' do
|
|
97
53
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
98
54
|
end
|
|
99
55
|
end
|
|
100
56
|
|
|
57
|
+
describe 'BankAccountVerify model' do
|
|
58
|
+
it 'accepts amounts' do
|
|
59
|
+
verify = Lob::BankAccountVerify.new(amounts: [11, 35])
|
|
60
|
+
expect(verify.amounts).to eq([11, 35])
|
|
61
|
+
expect(verify.descriptor_code).to be_nil
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
it 'accepts a valid descriptor_code' do
|
|
65
|
+
verify = Lob::BankAccountVerify.new(descriptor_code: 'SM11AA')
|
|
66
|
+
expect(verify.descriptor_code).to eq('SM11AA')
|
|
67
|
+
expect(verify.amounts).to be_nil
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
it 'raises when neither amounts nor descriptor_code is provided' do
|
|
71
|
+
expect {
|
|
72
|
+
Lob::BankAccountVerify.new({})
|
|
73
|
+
}.to raise_error(ArgumentError, /one of "amounts" or "descriptor_code" must be provided/)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
it 'raises when both amounts and descriptor_code are provided' do
|
|
77
|
+
expect {
|
|
78
|
+
Lob::BankAccountVerify.new(amounts: [11, 35], descriptor_code: 'SM11AA')
|
|
79
|
+
}.to raise_error(ArgumentError, /only one of "amounts" or "descriptor_code" may be provided/)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it 'raises when descriptor_code does not match the pattern' do
|
|
83
|
+
expect {
|
|
84
|
+
Lob::BankAccountVerify.new(descriptor_code: 'INVALID')
|
|
85
|
+
}.to raise_error(ArgumentError, /must conform to the pattern/)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
it 'raises when descriptor_code does not start with SM' do
|
|
89
|
+
expect {
|
|
90
|
+
Lob::BankAccountVerify.new(descriptor_code: 'AB1234')
|
|
91
|
+
}.to raise_error(ArgumentError, /must conform to the pattern/)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
it 'raises when descriptor_code is too short' do
|
|
95
|
+
expect {
|
|
96
|
+
Lob::BankAccountVerify.new(descriptor_code: 'SM123')
|
|
97
|
+
}.to raise_error(ArgumentError, /must conform to the pattern/)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
it 'raises when descriptor_code is too long' do
|
|
101
|
+
expect {
|
|
102
|
+
Lob::BankAccountVerify.new(descriptor_code: 'SM12345')
|
|
103
|
+
}.to raise_error(ArgumentError, /must conform to the pattern/)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
it 'is valid with amounts' do
|
|
107
|
+
verify = Lob::BankAccountVerify.new(amounts: [11, 35])
|
|
108
|
+
expect(verify.valid?).to be true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
it 'is valid with descriptor_code' do
|
|
112
|
+
verify = Lob::BankAccountVerify.new(descriptor_code: 'SM11AA')
|
|
113
|
+
expect(verify.valid?).to be true
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
describe 'BankAccount model microdeposit_type' do
|
|
118
|
+
it 'accepts microdeposit_type "amounts"' do
|
|
119
|
+
account = Lob::BankAccount.new(microdeposit_type: 'amounts')
|
|
120
|
+
expect(account.microdeposit_type).to eq('amounts')
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
it 'accepts microdeposit_type "descriptor_code"' do
|
|
124
|
+
account = Lob::BankAccount.new(microdeposit_type: 'descriptor_code')
|
|
125
|
+
expect(account.microdeposit_type).to eq('descriptor_code')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
it 'defaults microdeposit_type to nil when not provided' do
|
|
129
|
+
account = Lob::BankAccount.new({})
|
|
130
|
+
expect(account.microdeposit_type).to be_nil
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
101
134
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.0
|
|
4
|
+
version: 6.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-06-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -476,11 +476,6 @@ files:
|
|
|
476
476
|
- lib/lob/models/zip_editable.rb
|
|
477
477
|
- lib/lob/models/zip_lookup_city.rb
|
|
478
478
|
- lib/lob/version.rb
|
|
479
|
-
- lib/openapi_client.rb
|
|
480
|
-
- lib/openapi_client/api_client.rb
|
|
481
|
-
- lib/openapi_client/api_error.rb
|
|
482
|
-
- lib/openapi_client/configuration.rb
|
|
483
|
-
- lib/openapi_client/version.rb
|
|
484
479
|
- lob.gemspec
|
|
485
480
|
- spec/api/addresses_api_spec.rb
|
|
486
481
|
- spec/api/bank_accounts_api_spec.rb
|
|
@@ -514,7 +509,7 @@ homepage: https://openapi-generator.tech
|
|
|
514
509
|
licenses:
|
|
515
510
|
- Unlicense
|
|
516
511
|
metadata: {}
|
|
517
|
-
post_install_message:
|
|
512
|
+
post_install_message:
|
|
518
513
|
rdoc_options: []
|
|
519
514
|
require_paths:
|
|
520
515
|
- lib
|
|
@@ -530,35 +525,35 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
530
525
|
version: '0'
|
|
531
526
|
requirements: []
|
|
532
527
|
rubygems_version: 3.1.6
|
|
533
|
-
signing_key:
|
|
528
|
+
signing_key:
|
|
534
529
|
specification_version: 4
|
|
535
530
|
summary: Lob Ruby Gem
|
|
536
531
|
test_files:
|
|
537
|
-
- spec/api/
|
|
538
|
-
- spec/api/identity_validation_api_spec.rb
|
|
539
|
-
- spec/api/reverse_geocode_lookups_api_spec.rb
|
|
540
|
-
- spec/api/buckslip_orders_api_spec.rb
|
|
541
|
-
- spec/api/us_verifications_api_spec.rb
|
|
542
|
-
- spec/api/us_autocompletions_api_spec.rb
|
|
543
|
-
- spec/api/billing_groups_api_spec.rb
|
|
544
|
-
- spec/api/default_api_spec.rb
|
|
532
|
+
- spec/api/card_orders_api_spec.rb
|
|
545
533
|
- spec/api/self_mailers_api_spec.rb
|
|
546
|
-
- spec/api/
|
|
534
|
+
- spec/api/uploads_api_spec.rb
|
|
547
535
|
- spec/api/intl_verifications_api_spec.rb
|
|
548
|
-
- spec/api/
|
|
549
|
-
- spec/api/
|
|
550
|
-
- spec/api/
|
|
551
|
-
- spec/api/intl_autocompletions_api_spec.rb
|
|
552
|
-
- spec/api/bank_accounts_api_spec.rb
|
|
553
|
-
- spec/api/checks_api_spec.rb
|
|
536
|
+
- spec/api/creatives_api_spec.rb
|
|
537
|
+
- spec/api/zip_lookups_api_spec.rb
|
|
538
|
+
- spec/api/default_api_spec.rb
|
|
554
539
|
- spec/api/templates_api_spec.rb
|
|
555
|
-
- spec/api/
|
|
556
|
-
- spec/api/
|
|
540
|
+
- spec/api/campaigns_api_spec.rb
|
|
541
|
+
- spec/api/us_autocompletions_api_spec.rb
|
|
542
|
+
- spec/api/checks_api_spec.rb
|
|
543
|
+
- spec/api/bank_accounts_api_spec.rb
|
|
544
|
+
- spec/api/buckslip_orders_api_spec.rb
|
|
545
|
+
- spec/api/reverse_geocode_lookups_api_spec.rb
|
|
546
|
+
- spec/api/intl_autocompletions_api_spec.rb
|
|
547
|
+
- spec/api/snap_packs_api_spec.rb
|
|
557
548
|
- spec/api/addresses_api_spec.rb
|
|
558
|
-
- spec/api/
|
|
559
|
-
- spec/api/
|
|
549
|
+
- spec/api/identity_validation_api_spec.rb
|
|
550
|
+
- spec/api/cards_api_spec.rb
|
|
551
|
+
- spec/api/us_verifications_api_spec.rb
|
|
552
|
+
- spec/api/postcards_api_spec.rb
|
|
560
553
|
- spec/api/buckslips_api_spec.rb
|
|
561
|
-
- spec/api/
|
|
554
|
+
- spec/api/billing_groups_api_spec.rb
|
|
555
|
+
- spec/api/template_versions_api_spec.rb
|
|
556
|
+
- spec/api/letters_api_spec.rb
|
|
562
557
|
- spec/api_client_spec.rb
|
|
563
558
|
- spec/configuration_spec.rb
|
|
564
559
|
- spec/spec_helper.rb
|