Class: ConstantContactClient::ContactsApi
- Inherits:
-
Object
- Object
- ConstantContactClient::ContactsApi
- Defined in:
- lib/constant_contact_client/api/contacts_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_contact(create_contact_request, opts = {}) ⇒ GetContactById200Response
POST (create) a Contact Creates a new contact resource.
-
#create_contact_with_http_info(create_contact_request, opts = {}) ⇒ Array<(GetContactById200Response, Integer, Hash)>
POST (create) a Contact Creates a new contact resource.
-
#create_or_update_contact(create_or_update_contact_request, opts = {}) ⇒ CreateOrUpdateContact200Response
Create or Update a Contact Use this method to create a new contact or update an existing contact.
-
#create_or_update_contact_with_http_info(create_or_update_contact_request, opts = {}) ⇒ Array<(CreateOrUpdateContact200Response, Integer, Hash)>
Create or Update a Contact Use this method to create a new contact or update an existing contact.
-
#delete_contact(contact_id, opts = {}) ⇒ nil
DELETE a Contact Deletes the contact identified by the contact_id path parameter.
-
#delete_contact_with_http_info(contact_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
DELETE a Contact Deletes the contact identified by the contact_id path parameter.
-
#get_all_contacts(opts = {}) ⇒ GetAllContacts200Response
GET Contacts Collection Use this method to return a collection of contacts.
-
#get_all_contacts_with_http_info(opts = {}) ⇒ Array<(GetAllContacts200Response, Integer, Hash)>
GET Contacts Collection Use this method to return a collection of contacts.
-
#get_contact_by_id(contact_id, opts = {}) ⇒ GetContactById200Response
GET a Contact This endpoint GETs a specific contact resource (contact_id).
-
#get_contact_by_id_with_http_info(contact_id, opts = {}) ⇒ Array<(GetContactById200Response, Integer, Hash)>
GET a Contact This endpoint GETs a specific contact resource (contact_id).
-
#get_contact_counts(opts = {}) ⇒ GetContactCounts200Response
GET Contact Consent Counts Use to get the total contacts count for the account and the total contact-consent counts for each consent state.
-
#get_contact_counts_with_http_info(opts = {}) ⇒ Array<(GetContactCounts200Response, Integer, Hash)>
GET Contact Consent Counts Use to get the total contacts count for the account and the total contact-consent counts for each consent state.
-
#get_contact_id_xrefs(sequence_ids, opts = {}) ⇒ GetContactIdXrefs200Response
GET a collection of V2 and V3 API contact IDs <div class="Msg Msg--warning"><p class="note-text">Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format.
-
#get_contact_id_xrefs_with_http_info(sequence_ids, opts = {}) ⇒ Array<(GetContactIdXrefs200Response, Integer, Hash)>
GET a collection of V2 and V3 API contact IDs <div class="Msg Msg--warning"><p class="note-text">Use this endpoint to migrate your locally stored V2 contact ids to the new V3 format.
-
#get_sms_engagement_history(contact_id, opts = {}) ⇒ Array<GetSmsEngagementHistory200ResponseInner>
GET SMS Engagement History for a Contact Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details.
-
#get_sms_engagement_history_with_http_info(contact_id, opts = {}) ⇒ Array<(Array<GetSmsEngagementHistory200ResponseInner>, Integer, Hash)>
GET SMS Engagement History for a Contact Use this method to return SMS engagement details for a contact, such as SMS consent and advertising frequency details.
-
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
constructor
A new instance of ContactsApi.
-
#resubscribe_contact(contact_id, resubscribe_contact_request, opts = {}) ⇒ nil
PUT Resubscribe a Contact Use this endpoint to send a confirmation resubscribe email to a contact in order to get their confirmation to resubscribe.
-
#resubscribe_contact_with_http_info(contact_id, resubscribe_contact_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
PUT Resubscribe a Contact Use this endpoint to send a confirmation resubscribe email to a contact in order to get their confirmation to resubscribe.
-
#update_contact(contact_id, update_contact_request, opts = {}) ⇒ GetContactById200Response
PUT (update) a Contact The PUT method updates an existing contact.
-
#update_contact_with_http_info(contact_id, update_contact_request, opts = {}) ⇒ Array<(GetContactById200Response, Integer, Hash)>
PUT (update) a Contact The PUT method updates an existing contact.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ContactsApi
Returns a new instance of ContactsApi.
19 20 21 |
# File 'lib/constant_contact_client/api/contacts_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/constant_contact_client/api/contacts_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_contact(create_contact_request, opts = {}) ⇒ GetContactById200Response
POST (create) a Contact
Creates a new contact resource. You must include the create_source property and at least one of the following properties: first_name, last_name, a unique email_address (specified using the EmailAddress object), or the sms_channel property (specified using the ContactSmsChannel object). <div class="Msg"><p class="note-text">If email_address is specified: **Only use this method when a contact gives you their explicit permission to send them an email. It is a violation of anti-spam and telemarketing laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.
sms_channel is specified: <div class="Msg"><p class="note-text">Only use this method when a contact gives you their explicit permission to send them an SMS. It is a violation of anti-spam and telemarketing laws, as well as a serious violation of the Constant Contact Terms of Service to use the Opt-in features of the API to opt a contact back in without his or her own action and consent.
27 28 29 30 |
# File 'lib/constant_contact_client/api/contacts_api.rb', line 27 def create_contact(create_contact_request, opts = {}) data, _status_code, _headers = create_contact_with_http_info(create_contact_request, opts) data end |