-
Notifications
You must be signed in to change notification settings - Fork 16
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(service): Migrate b2c, b2b to the builder pattern #112
base: master
Are you sure you want to change the base?
Conversation
pub amount: f64, | ||
pub party_a: String, | ||
pub sender_identifier_type: IdentifierTypes, | ||
pub party_b: String, | ||
#[serde(rename(serialize = "RecieverIdentifierType"))] |
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 still need this inner rename if he outer struct has the rename_all="PascalCase"
attribute?
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.
Funny things, there is a typo in the receiver so I am renaming the single field and same fields can't parse the way it the API expects like ResultURL
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.
Hehehe yeah, always has to be safaricom with the inconsistent API/docs.
pub queue_time_out_url: Url, | ||
#[serde(rename = "ResultURL")] | ||
pub result_url: Url, | ||
#[serde(rename = "AccountReference")] |
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.
Same for the AccountReference
...
skip_serializing_if = "Option::is_none" | ||
)] | ||
account_reference: Option<&'mpesa str>, | ||
pub reciever_identifier_type: IdentifierTypes, |
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.
Following from the comment above, I guess we can then rename this struct field to have the correct english naming like so:
pub reciever_identifier_type: IdentifierTypes, | |
pub receiver_identifier_type: IdentifierTypes, |
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.
...but it might be desirable to keep the same as the typo that mpesa api uses. Up to you
No description provided.