Skip to content

Sending domains endpoints#104

Merged
IgorDobryn merged 4 commits intomainfrom
MT-21830-sending-domains
May 4, 2026
Merged

Sending domains endpoints#104
IgorDobryn merged 4 commits intomainfrom
MT-21830-sending-domains

Conversation

@IgorDobryn
Copy link
Copy Markdown
Contributor

@IgorDobryn IgorDobryn commented Apr 28, 2026

Motivation

Changes

  • Add missing endpoints:
    • PATCH /api/accounts/{account_id}/sending_domains/{sending_domain_id}
    • GET /api/accounts/{account_id}/sending_domains/{sending_domain_id}/company_info
    • POST /api/accounts/{account_id}/sending_domains/{sending_domain_id}/company_info
    • PATCH /api/accounts/{account_id}/sending_domains/{sending_domain_id}/company_info

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 03be946f-abe5-4ff3-a299-d289fa328555

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch MT-21830-sending-domains

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@IgorDobryn IgorDobryn requested review from DagonWat and i7an April 28, 2026 11:59
@IgorDobryn IgorDobryn marked this pull request as ready for review April 28, 2026 12:00
# @return [CompanyInfo] Updated company information
# @!macro api_errors
# @raise [ArgumentError] If invalid options are provided
def update(sending_domain_id, options)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same question as before: shouldn’t it be upsert?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we split the endpoint though

account_id = 3229
sending_domain_id = 1
client = Mailtrap::Client.new(api_key: 'your-api-key')
company_info_api = Mailtrap::CompanyInfoAPI.new(account_id, client)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sometimes its {endpoint}_api and sometimes just {endpoint} name of the variable, maybe worth to have single style.

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.

_api seems more correct. Because if you store result of create into a var, then what would be the name?

# @return [CompanyInfo] Updated company information
# @!macro api_errors
# @raise [ArgumentError] If invalid options are provided
def update(sending_domain_id, options)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we split the endpoint though

Base automatically changed from MT-21830-sandboxes-api to main May 4, 2026 07:50
@IgorDobryn IgorDobryn merged commit d156a34 into main May 4, 2026
4 checks passed
@IgorDobryn IgorDobryn deleted the MT-21830-sending-domains branch May 4, 2026 08:33
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.

3 participants