-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat(address): add address client #1
Conversation
* add exception unit test
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 is a great base to start with and we can iterate on it. Thanks for putting in the initial work, Jin! LGTM
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.
LGTM, with some questions/nits
Lob/Api/Address/AddressClient.cs
Outdated
|
||
public Task<LobResponse<AddressResource>> GetAsync(string id) | ||
{ | ||
Console.WriteLine($"getasync {id}"); |
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.
Leftover from debugging?
{ | ||
public class AddressResource : DeletableResource | ||
{ | ||
public string AddressLine1 { get; set; } |
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.
Do we need these prefixed with Address
if they're already part of the AddressResource
class?
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.
since it is reflected with the prefix in the API schema, just keeping it 1-1. its also arguably clearer, since we bundle a number of non-address fields into our address object.
What:
sln
andcsproj
files for library and test.addresses
.Details:
LobClient
is instantiated with the apiKey and is used to access the various API resources e.g.LobClient.Address.CreateAsync(...)
orLobClient.Letter.CreateAsync(...)
laterLobRestClient
is a thin layer overHttpClient
and does only the following:LobRestClient
has limited intelligence, it pushes content serialization and query parameter encoding to the resource client themselves (AddressClient
,LetterClient
, etc.). Not a big fan, but open to ideas.async
/await
, so we do not support clients without said capability.