Class: Mailtrap::CompanyInfoAPI
- Inherits:
-
Object
- Object
- Mailtrap::CompanyInfoAPI
- Includes:
- BaseAPI
- Defined in:
- lib/mailtrap/company_info_api.rb
Instance Attribute Summary
Attributes included from BaseAPI
Instance Method Summary collapse
-
#create(sending_domain_id, options) ⇒ CompanyInfo
Creates company information for a sending domain.
-
#get(sending_domain_id) ⇒ CompanyInfo
Gets company information for a sending domain.
-
#update(sending_domain_id, options) ⇒ CompanyInfo
Updates company information for a sending domain.
Methods included from BaseAPI
Instance Method Details
#create(sending_domain_id, options) ⇒ CompanyInfo
Creates company information for a sending domain
50 51 52 53 54 |
# File 'lib/mailtrap/company_info_api.rb', line 50 def create(sending_domain_id, ) (, ) response = client.post(base_path(sending_domain_id), wrap_request()) build_entity(response[:data], CompanyInfo) end |
#get(sending_domain_id) ⇒ CompanyInfo
Gets company information for a sending domain
29 30 31 32 |
# File 'lib/mailtrap/company_info_api.rb', line 29 def get(sending_domain_id) response = client.get(base_path(sending_domain_id)) build_entity(response[:data], CompanyInfo) end |
#update(sending_domain_id, options) ⇒ CompanyInfo
Updates company information for a sending domain
62 63 64 65 66 |
# File 'lib/mailtrap/company_info_api.rb', line 62 def update(sending_domain_id, ) (, ) response = client.patch(base_path(sending_domain_id), wrap_request()) build_entity(response[:data], CompanyInfo) end |