Class: ConstantContactClient::AccountServicesApi
- Inherits:
-
Object
- Object
- ConstantContactClient::AccountServicesApi
- Defined in:
- lib/constant_contact_client/api/account_services_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_account_email_address(add_account_email_address_request, opts = {}) ⇒ AddAccountEmailAddress201Response
POST Add an Account Email Address Use this method to add a new email address to a Constant Contact account.
-
#add_account_email_address_with_http_info(add_account_email_address_request, opts = {}) ⇒ Array<(AddAccountEmailAddress201Response, Integer, Hash)>
POST Add an Account Email Address Use this method to add a new email address to a Constant Contact account.
-
#add_physical_address(get_account_details200_response_physical_address, opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
POST the Physical Address for the Account Use this method to add the address where the account's organization physically resides.
-
#add_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
POST the Physical Address for the Account Use this method to add the address where the account's organization physically resides.
-
#get_account_details(opts = {}) ⇒ GetAccountDetails200Response
GET a Summary of Account Details Get account related details for a Constant Contact user account.
-
#get_account_details_with_http_info(opts = {}) ⇒ Array<(GetAccountDetails200Response, Integer, Hash)>
GET a Summary of Account Details Get account related details for a Constant Contact user account.
-
#get_account_physical_address(opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
GET the Physical Address for the Account Use this method to get the address where the account's organization physically resides.
-
#get_account_physical_address_with_http_info(opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
GET the Physical Address for the Account Use this method to get the address where the account's organization physically resides.
-
#get_all_account_email_addresses(opts = {}) ⇒ Array<GetAllAccountEmailAddresses200ResponseInner>
GET a Collection of Account Email Addresses Use this method to return a collection of email addresses for the account associated with your access token.
-
#get_all_account_email_addresses_with_http_info(opts = {}) ⇒ Array<(Array<GetAllAccountEmailAddresses200ResponseInner>, Integer, Hash)>
GET a Collection of Account Email Addresses Use this method to return a collection of email addresses for the account associated with your access token.
-
#get_user_privileges(opts = {}) ⇒ Array<GetUserPrivileges200ResponseInner>
GET User Privileges Use this method to return the user privileges associated with your access token as an array of objects.
-
#get_user_privileges_with_http_info(opts = {}) ⇒ Array<(Array<GetUserPrivileges200ResponseInner>, Integer, Hash)>
GET User Privileges Use this method to return the user privileges associated with your access token as an array of objects.
-
#initialize(api_client = ApiClient.default) ⇒ AccountServicesApi
constructor
A new instance of AccountServicesApi.
-
#update_account(update_account_request, opts = {}) ⇒ UpdateAccountRequest
PUT (update) Account Details Use this method to update account details for a Constant Contact account, such as the email address or phone number.
-
#update_account_physical_address(get_account_details200_response_physical_address, opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
PUT (update) the Physical Address for an Account Use this method to update the organization's physical address for the Constant Contact user account.
-
#update_account_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
PUT (update) the Physical Address for an Account Use this method to update the organization's physical address for the Constant Contact user account.
-
#update_account_with_http_info(update_account_request, opts = {}) ⇒ Array<(UpdateAccountRequest, Integer, Hash)>
PUT (update) Account Details Use this method to update account details for a Constant Contact account, such as the email address or phone number.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountServicesApi
Returns a new instance of AccountServicesApi.
19 20 21 |
# File 'lib/constant_contact_client/api/account_services_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/account_services_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_account_email_address(add_account_email_address_request, opts = {}) ⇒ AddAccountEmailAddress201Response
POST Add an Account Email Address
Use this method to add a new email address to a Constant Contact account. If the email address you are adding already exists in the account the API will return a 409 conflict error. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. After a user clicks that link, the account email status changes from UNCONFIRMED to CONFIRMED. You can use confirmed account email addresses in the email campaign from_email and reply_to_email headers. For more use case information, see Add an Account Email Address in the API guide.
27 28 29 30 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 27 def add_account_email_address(add_account_email_address_request, opts = {}) data, _status_code, _headers = add_account_email_address_with_http_info(add_account_email_address_request, opts) data end |
#add_account_email_address_with_http_info(add_account_email_address_request, opts = {}) ⇒ Array<(AddAccountEmailAddress201Response, Integer, Hash)>
POST Add an Account Email Address Use this method to add a new email address to a Constant Contact account. If the email address you are adding already exists in the account the API will return a 409 conflict error. When you add a new email address to an account, Constant Contact automatically sends an email to that address with a link to confirm it. After a user clicks that link, the account email status changes from `UNCONFIRMED` to `CONFIRMED`. You can use confirmed account email addresses in the email campaign `from_email` and `reply_to_email` headers. For more use case information, see Add an Account Email Address in the API guide.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 37 def add_account_email_address_with_http_info(add_account_email_address_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.add_account_email_address ...' end # verify the required parameter 'add_account_email_address_request' is set if @api_client.config.client_side_validation && add_account_email_address_request.nil? fail ArgumentError, "Missing the required parameter 'add_account_email_address_request' when calling AccountServicesApi.add_account_email_address" end # resource path local_var_path = '/account/emails' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(add_account_email_address_request) # return_type return_type = opts[:debug_return_type] || 'AddAccountEmailAddress201Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.add_account_email_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#add_account_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#add_physical_address(get_account_details200_response_physical_address, opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
POST the Physical Address for the Account
Use this method to add the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account. The country (country_code) where the account organization resides determines whether you use the state_code to specify United States (US) and Canada (CA) addresses, or use the state_name to specify all other countries.
95 96 97 98 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 95 def add_physical_address(get_account_details200_response_physical_address, opts = {}) data, _status_code, _headers = add_physical_address_with_http_info(get_account_details200_response_physical_address, opts) data end |
#add_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
POST the Physical Address for the Account Use this method to add the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account. The country (<code>country_code</code>) where the account organization resides determines whether you use the <code>state_code</code> to specify United States (<code>US</code>) and Canada (<code>CA</code>) addresses, or use the <code>state_name</code> to specify all other countries.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 105 def add_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.add_physical_address ...' end # verify the required parameter 'get_account_details200_response_physical_address' is set if @api_client.config.client_side_validation && get_account_details200_response_physical_address.nil? fail ArgumentError, "Missing the required parameter 'get_account_details200_response_physical_address' when calling AccountServicesApi.add_physical_address" end # resource path local_var_path = '/account/summary/physical_address' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_account_details200_response_physical_address) # return_type return_type = opts[:debug_return_type] || 'GetAccountDetails200ResponsePhysicalAddress' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.add_physical_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#add_physical_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_details(opts = {}) ⇒ GetAccountDetails200Response
GET a Summary of Account Details
Get account related details for a Constant Contact user account. Use the extra_fields query parameter to include the company_logo and/or physical_address details in the response body. For more details, see Get Account Summary Details.
163 164 165 166 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 163 def get_account_details(opts = {}) data, _status_code, _headers = get_account_details_with_http_info(opts) data end |
#get_account_details_with_http_info(opts = {}) ⇒ Array<(GetAccountDetails200Response, Integer, Hash)>
GET a Summary of Account Details Get account related details for a Constant Contact user account. Use the `extra_fields` query parameter to include the `company_logo` and/or `physical_address` details in the response body. For more details, see Get Account Summary Details.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 173 def get_account_details_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.get_account_details ...' end allowable_values = ["physical_address", "company_logo"] if @api_client.config.client_side_validation && opts[:'extra_fields'] && !allowable_values.include?(opts[:'extra_fields']) fail ArgumentError, "invalid value for \"extra_fields\", must be one of #{allowable_values}" end # resource path local_var_path = '/account/summary' # query parameters query_params = opts[:query_params] || {} query_params[:'extra_fields'] = opts[:'extra_fields'] if !opts[:'extra_fields'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetAccountDetails200Response' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.get_account_details", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#get_account_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_account_physical_address(opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
GET the Physical Address for the Account Use this method to get the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account.
226 227 228 229 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 226 def get_account_physical_address(opts = {}) data, _status_code, _headers = get_account_physical_address_with_http_info(opts) data end |
#get_account_physical_address_with_http_info(opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
GET the Physical Address for the Account Use this method to get the address where the account's organization physically resides. The physical address is required to send emails and displays on the footer of every email that is sent from the account.
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 235 def get_account_physical_address_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.get_account_physical_address ...' end # resource path local_var_path = '/account/summary/physical_address' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'GetAccountDetails200ResponsePhysicalAddress' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.get_account_physical_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#get_account_physical_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_all_account_email_addresses(opts = {}) ⇒ Array<GetAllAccountEmailAddresses200ResponseInner>
GET a Collection of Account Email Addresses
Use this method to return a collection of email addresses for the account associated with your access token. When you <a href="https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/createEmailCampaignUsingPOST" target="_blank">Create an Email Campaign, you must use an account email address with a CONFIRMED status in the email campaign from_email and reply_to_email headers. Use the query parameters to filter results. You can filter using confirm_status, role_code, or email_address. For example, searching with confirm_status=CONFIRMED returns all confirmed email addresses in the account. This method only supports one query parameter at a time.
286 287 288 289 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 286 def get_all_account_email_addresses(opts = {}) data, _status_code, _headers = get_all_account_email_addresses_with_http_info(opts) data end |
#get_all_account_email_addresses_with_http_info(opts = {}) ⇒ Array<(Array<GetAllAccountEmailAddresses200ResponseInner>, Integer, Hash)>
GET a Collection of Account Email Addresses Use this method to return a collection of email addresses for the account associated with your access token. When you <a href="https://v3.developer.constantcontact.com/api_reference/index.html#!/Email_Campaigns/createEmailCampaignUsingPOST" target="_blank">Create an Email Campaign<a/>, you must use an account email address with a `CONFIRMED` status in the email campaign `from_email` and `reply_to_email` headers. Use the query parameters to filter results. You can filter using `confirm_status`, `role_code`, or `email_address`. For example, searching with `confirm_status=CONFIRMED` returns all confirmed email addresses in the account. This method only supports one query parameter at a time.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 298 def get_all_account_email_addresses_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.get_all_account_email_addresses ...' end allowable_values = ["CONFIRMED", "C", "UNCONFIRMED", "U"] if @api_client.config.client_side_validation && opts[:'confirm_status'] && !allowable_values.include?(opts[:'confirm_status']) fail ArgumentError, "invalid value for \"confirm_status\", must be one of #{allowable_values}" end allowable_values = ["CONTACT", "C", "BILLING", "B", "JOURNALING", "J", "REPLY_TO", "R", "OTHER", "O"] if @api_client.config.client_side_validation && opts[:'role_code'] && !allowable_values.include?(opts[:'role_code']) fail ArgumentError, "invalid value for \"role_code\", must be one of #{allowable_values}" end # resource path local_var_path = '/account/emails' # query parameters query_params = opts[:query_params] || {} query_params[:'confirm_status'] = opts[:'confirm_status'] if !opts[:'confirm_status'].nil? query_params[:'role_code'] = opts[:'role_code'] if !opts[:'role_code'].nil? query_params[:'email_address'] = opts[:'email_address'] if !opts[:'email_address'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<GetAllAccountEmailAddresses200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.get_all_account_email_addresses", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#get_all_account_email_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user_privileges(opts = {}) ⇒ Array<GetUserPrivileges200ResponseInner>
GET User Privileges Use this method to return the user privileges associated with your access token as an array of objects. This method returns all user privileges, including privileges the V3 API does not currently use. Constant Contact requires specific user privileges to make requests using the V3 API. For more information, see the User Privileges and Roles Overview.
357 358 359 360 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 357 def get_user_privileges(opts = {}) data, _status_code, _headers = get_user_privileges_with_http_info(opts) data end |
#get_user_privileges_with_http_info(opts = {}) ⇒ Array<(Array<GetUserPrivileges200ResponseInner>, Integer, Hash)>
GET User Privileges Use this method to return the user privileges associated with your access token as an array of objects. This method returns all user privileges, including privileges the V3 API does not currently use. Constant Contact requires specific user privileges to make requests using the V3 API. For more information, see the User Privileges and Roles Overview.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 366 def get_user_privileges_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.get_user_privileges ...' end # resource path local_var_path = '/account/user/privileges' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<GetUserPrivileges200ResponseInner>' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.get_user_privileges", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#get_user_privileges\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account(update_account_request, opts = {}) ⇒ UpdateAccountRequest
PUT (update) Account Details Use this method to update account details for a Constant Contact account, such as the email address or phone number. This PUT method provides a partial update where only valid properties that you include in the request body are updated and excluded properties are not overwritten. For more details, see Put (update) Account Summary Details.
415 416 417 418 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 415 def update_account(update_account_request, opts = {}) data, _status_code, _headers = update_account_with_http_info(update_account_request, opts) data end |
#update_account_physical_address(get_account_details200_response_physical_address, opts = {}) ⇒ GetAccountDetails200ResponsePhysicalAddress
PUT (update) the Physical Address for an Account
Use this method to update the organization's physical address for the Constant Contact user account. The physical address is required to send emails and displays on the footer of every email that is sent from the account. To get the current physical address, make a GET call to /account/summary/physical_address. The country (country_code) where the account organization resides determines whether you use the state_code to specify United States (US) and Canada (CA) addresses, or use the state_name to specify all other countries. For more details, see Put (update) the Physical Address for the Account. You must have the role of Account Owner assigned to update account level details.
483 484 485 486 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 483 def update_account_physical_address(get_account_details200_response_physical_address, opts = {}) data, _status_code, _headers = update_account_physical_address_with_http_info(get_account_details200_response_physical_address, opts) data end |
#update_account_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) ⇒ Array<(GetAccountDetails200ResponsePhysicalAddress, Integer, Hash)>
PUT (update) the Physical Address for an Account Use this method to update the organization's physical address for the Constant Contact user account. The physical address is required to send emails and displays on the footer of every email that is sent from the account. To get the current physical address, make a GET call to `/account/summary/physical_address`. The country (<code>country_code</code>) where the account organization resides determines whether you use the <code>state_code</code> to specify United States (<code>US</code>) and Canada (<code>CA</code>) addresses, or use the <code>state_name</code> to specify all other countries. For more details, see Put (update) the Physical Address for the Account. You must have the role of Account Owner assigned to update account level details.
493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 493 def update_account_physical_address_with_http_info(get_account_details200_response_physical_address, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.update_account_physical_address ...' end # verify the required parameter 'get_account_details200_response_physical_address' is set if @api_client.config.client_side_validation && get_account_details200_response_physical_address.nil? fail ArgumentError, "Missing the required parameter 'get_account_details200_response_physical_address' when calling AccountServicesApi.update_account_physical_address" end # resource path local_var_path = '/account/summary/physical_address' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(get_account_details200_response_physical_address) # return_type return_type = opts[:debug_return_type] || 'GetAccountDetails200ResponsePhysicalAddress' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.update_account_physical_address", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#update_account_physical_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account_with_http_info(update_account_request, opts = {}) ⇒ Array<(UpdateAccountRequest, Integer, Hash)>
PUT (update) Account Details Use this method to update account details for a Constant Contact account, such as the email address or phone number. This PUT method provides a partial update where only valid properties that you include in the request body are updated and excluded properties are not overwritten. For more details, see Put (update) Account Summary Details.
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/constant_contact_client/api/account_services_api.rb', line 425 def update_account_with_http_info(update_account_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountServicesApi.update_account ...' end # verify the required parameter 'update_account_request' is set if @api_client.config.client_side_validation && update_account_request.nil? fail ArgumentError, "Missing the required parameter 'update_account_request' when calling AccountServicesApi.update_account" end # resource path local_var_path = '/account/summary' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(update_account_request) # return_type return_type = opts[:debug_return_type] || 'UpdateAccountRequest' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2_access_code', 'oauth2_implicit'] = opts.merge( :operation => :"AccountServicesApi.update_account", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountServicesApi#update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |