feat(service): Migrate b2c, b2b to the builder pattern#112
feat(service): Migrate b2c, b2b to the builder pattern#112
Conversation
| pub party_a: String, | ||
| pub sender_identifier_type: IdentifierTypes, | ||
| pub party_b: String, | ||
| #[serde(rename(serialize = "RecieverIdentifierType"))] |
There was a problem hiding this comment.
Do we still need this inner rename if he outer struct has the rename_all="PascalCase" attribute?
There was a problem hiding this comment.
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.
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.
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.
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.
...but it might be desirable to keep the same as the typo that mpesa api uses. Up to you
No description provided.