Skip to content

Add new /enquiry endpoint to channel api, also add new inbound flag for /summary - #36

Open
johnjoey wants to merge 7 commits into
sturents:masterfrom
johnjoey:master
Open

johnjoey wants to merge 7 commits into
sturents:masterfrom
johnjoey:master

Conversation

@johnjoey

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/ChannelClient.php
private function generateAuth(string $timestamp): string{
return hash_hmac('sha256', $timestamp, $this->display_key) ?: '';
private function generateAuth(string $json, string $timestamp): string{
return hash_hmac('sha256', $json.$timestamp, $this->display_key) ?: '';

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now channel has an inbound endpoint, need to include body in auth hash

Comment thread swagger/api-channel.yml
name: version
type: string
required: true
required: false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The param is not required. Also, this was a breaking change so should have been a major release

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can leave as required, as this is the v3 docs, and if someone doesn't send a version param, they're implicitly accessing v2 for some endpoints (i.e. endpoints that only have v2) and v1 for others.

It also means we can set version as required on the new enquiry endpoint as that's new so we can require up front - even though its only introduced on v3, it's good hygeine as when we eventually bring out a v4 there will be a clear explicit difference between v3 and v4 in the query string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the SDK, again given we're tagging this v3, we can default the value to this version as a string

Comment thread swagger/api-channel.yml Outdated
type: string
description: |
ID for the organisation this account belongs to on the StuRents website
inbound_data_enabled:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest we are specific about enquiries - given inbound data could be mistaken for the other inbound features our API has like creating properties or creating availabilities. So we could call it enquiry_sending?

@M1ke M1ke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of points re field names and version but all v minor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants