-
Notifications
You must be signed in to change notification settings - Fork 45
Revert "Fix address model validation" #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,13 +147,13 @@ | |
| end | ||
|
|
||
| it "lists addresses with after param" do | ||
| response = @addressApi.list(limit: 2) | ||
| response = @addressApi.list() | ||
| responseAfter = @addressApi.list(after: response.getNextPageToken()) | ||
| expect(responseAfter.data.length()).to be > 0 | ||
| end | ||
|
|
||
| it "lists addresses with before param" do | ||
| response = @addressApi.list(limit: 2) | ||
| response = @addressApi.list() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| responseAfter = @addressApi.list(before: response.getNextPageToken()) | ||
| expect(responseAfter.data.length()).to be > 0 | ||
| end | ||
|
|
@@ -197,4 +197,4 @@ | |
| expect(response.deleted).to eq(true) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -236,7 +236,7 @@ | |
|
|
||
| expect(response.data[0].id).not_to eq(first_chk_id) | ||
|
|
||
| uri = URI.parse(response.previous_url) | ||
| uri = URI.parse(response.next_url) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line appears to contain a bug. You are parsing uri = URI.parse(response.previous_url) |
||
| params = CGI.parse(uri.query) | ||
|
|
||
| response = @checkApi.list({ :"limit" => 2, :"before" => params["before"][0] }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,7 +178,7 @@ | |
|
|
||
| expect(response.data[0].id).not_to eq(first_ltr_id) | ||
|
|
||
| uri = URI.parse(response.previous_url) | ||
| uri = URI.parse(response.next_url) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line appears to contain a bug. You are parsing uri = URI.parse(response.previous_url) |
||
| params = CGI.parse(uri.query) | ||
|
|
||
| response = @letterApi.list({ :"limit" => 2, :"before" => params["before"][0] }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,8 +98,7 @@ | |
|
|
||
| templateWritable3 = TemplateWritable.new({ | ||
| description: "Ruby Integration Test", | ||
| html: "<html>Updated HTML for Ruby Integration Test</html>", | ||
| metadata: { name: "Harry" } | ||
| html: "<html>Updated HTML for Ruby Integration Test</html>" | ||
| }) | ||
|
|
||
| response1 = @templateApi.create(templateWritable1) | ||
|
|
@@ -124,7 +123,7 @@ | |
|
|
||
| expect(response.data[0].id).not_to eq(first_tmpl_id) | ||
|
|
||
| uri = URI.parse(response.previous_url) | ||
| uri = URI.parse(response.next_url) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line appears to contain a bug. You are parsing uri = URI.parse(response.previous_url) |
||
| params = CGI.parse(uri.query) | ||
|
|
||
| response = @templateApi.list({ :"limit" => 2, :"before" => params["before"][0] }) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
|
|
||
| it "Autocompletes US address (with test key)" do | ||
| autocompletedAddr = @usAutocompletionApi.autocomplete(@validAddress) | ||
| puts autocompletedAddr.suggestions[0].primary_line | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| expect(autocompletedAddr.suggestions[0].primary_line).to eq("1 TELEGRAPH HILL BLVD") | ||
| end | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,8 +14,8 @@ | |
| | **address_line1** | **String** | | [optional] | | ||
| | **address_line2** | **String** | | [optional] | | ||
| | **address_city** | **String** | | [optional] | | ||
| | **address_state** | **String** | 2 letter state short-name code for US address or must be no longer than 200 characters for non-US address. | [optional] | | ||
| | **address_zip** | **String** | Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234` for US address or must be no longer than 40 characters for non-US address. | [optional] | | ||
| | **address_state** | **String** | 2 letter state short-name code | [optional] | | ||
| | **address_zip** | **String** | Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. | [optional] | | ||
|
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The descriptions for |
||
| | **address_country** | [**CountryExtendedExpanded**](CountryExtendedExpanded.md) | | [optional] | | ||
| | **object** | **String** | | [optional][default to 'address'] | | ||
| | **date_created** | **Time** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] | | ||
|
|
@@ -28,7 +28,7 @@ | |
| ```ruby | ||
| require 'lob' | ||
|
|
||
| instance = Lob::Address.build( | ||
| instance = Lob::Address.new( | ||
| id: null, | ||
| description: null, | ||
| name: null, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test for pagination is less reliable without a
limitparameter. To ensure a paginated response and the presence of anext_page_token, it's better to explicitly set a limit, as was done in the code being reverted.