ultracart_api 3.10.13 → 3.10.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 354b5e982d4bdfdeaa19102a54dee545e16d6c60fc45985c5b0b6c40eeda7f88
4
- data.tar.gz: 34e497b5654b66f1f8e4df71ca307648f912996beddfeb75e3c7d9033dd375c2
3
+ metadata.gz: 5b9d7a233d80bc82c0718c8551a8ed7ff260a8c74e342de17ab370e926eacfa1
4
+ data.tar.gz: 19009b1fd332572af8ba51fe2db9e6466f374d61f47e4738c7c5af855b476fb9
5
5
  SHA512:
6
- metadata.gz: fce667d7f13b60589f7010b7bd4a40529aac6fd5456b9532faf9fcde323641fb1614cb794a0899ff1e038f7e3abfb5329c88dfefaed12874cfc46ceb1545c746
7
- data.tar.gz: '089df484965f457a301f5f63af85963f43c6d2c8282f82102250f0eaa86f5a413eea22fd37908368795af8cd07ad4e35e4e39aba779c2e66e5ab172bf60b263e'
6
+ metadata.gz: 769c1a0cc0e2ff90f34196eeb812b2a113fee3a1c3816a4c1e3833c5f8bae9f05fd9814522ed664e9f0dc8afb3c405d0d6153f0ca361726add3d6da15e463c84
7
+ data.tar.gz: c39bf8fb369bfc70e1bdb478a52de6efce10dc5fe1765cef53f33821de7e82102e2737d3fcdac4fa7111186640c89c177912479997f19e0b468755ef99a6bf46
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.13
10
+ - Package version: 3.10.14
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.13.gem
27
+ gem install ./ultracart_api-3.10.14.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.13.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.14.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.13'
35
+ gem 'ultracart_api', '~> 3.10.14'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -241,6 +241,7 @@ Class | Method | HTTP request | Description
241
241
  *UltracartClient::StorefrontApi* | [**clone_email_campaign**](docs/StorefrontApi.md#clone_email_campaign) | **POST** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/clone | Clone email campaign
242
242
  *UltracartClient::StorefrontApi* | [**clone_email_flow**](docs/StorefrontApi.md#clone_email_flow) | **POST** /storefront/{storefront_oid}/email/flows/{email_flow_uuid}/clone | Clone email flow
243
243
  *UltracartClient::StorefrontApi* | [**create_email_sending_domain**](docs/StorefrontApi.md#create_email_sending_domain) | **POST** /storefront/email/sending_domains/{domain}/create | Create email campaign
244
+ *UltracartClient::StorefrontApi* | [**create_email_sending_domain2**](docs/StorefrontApi.md#create_email_sending_domain2) | **POST** /storefront/email/sending_domains | Create email sending domain for various providers
244
245
  *UltracartClient::StorefrontApi* | [**create_twilio_account**](docs/StorefrontApi.md#create_twilio_account) | **POST** /storefront/twilio/accounts | Create Twilio account
245
246
  *UltracartClient::StorefrontApi* | [**delete_email_campaign_folder**](docs/StorefrontApi.md#delete_email_campaign_folder) | **DELETE** /storefront/{storefront_oid}/email/campaign_folders/{email_campaign_folder_uuid} | Delete email campaignFolder
246
247
  *UltracartClient::StorefrontApi* | [**delete_email_commseq_stat**](docs/StorefrontApi.md#delete_email_commseq_stat) | **DELETE** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/stat | Delete communication sequence stats
@@ -383,6 +384,7 @@ Class | Method | HTTP request | Description
383
384
  *UltracartClient::StorefrontApi* | [**update_email_plan**](docs/StorefrontApi.md#update_email_plan) | **POST** /storefront/{storefront_oid}/email/plan | Update email plan
384
385
  *UltracartClient::StorefrontApi* | [**update_email_postcard**](docs/StorefrontApi.md#update_email_postcard) | **PUT** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid} | Update email postcard
385
386
  *UltracartClient::StorefrontApi* | [**update_email_segment**](docs/StorefrontApi.md#update_email_segment) | **PUT** /storefront/{storefront_oid}/email/segments/{email_segment_uuid} | Update email segment
387
+ *UltracartClient::StorefrontApi* | [**update_email_sending_domain**](docs/StorefrontApi.md#update_email_sending_domain) | **PUT** /storefront/email/sending_domains/{domain} | Update email sending domain
386
388
  *UltracartClient::StorefrontApi* | [**update_email_settings**](docs/StorefrontApi.md#update_email_settings) | **POST** /storefront/{storefront_oid}/email/settings | Update email settings
387
389
  *UltracartClient::StorefrontApi* | [**update_experiment**](docs/StorefrontApi.md#update_experiment) | **PUT** /storefront/{storefront_oid}/experiments/{storefront_experiment_oid} | Update experiment
388
390
  *UltracartClient::StorefrontApi* | [**update_library_item**](docs/StorefrontApi.md#update_library_item) | **PUT** /storefront/code_library/{library_item_oid} | Update library item. Note that only certain fields may be updated via this method.
@@ -891,6 +893,7 @@ Class | Method | HTTP request | Description
891
893
  - [UltracartClient::ListSegmentMembership](docs/ListSegmentMembership.md)
892
894
  - [UltracartClient::LookupRequest](docs/LookupRequest.md)
893
895
  - [UltracartClient::LookupResponse](docs/LookupResponse.md)
896
+ - [UltracartClient::Mailgun](docs/Mailgun.md)
894
897
  - [UltracartClient::Metric](docs/Metric.md)
895
898
  - [UltracartClient::Notification](docs/Notification.md)
896
899
  - [UltracartClient::OauthRevokeSuccessResponse](docs/OauthRevokeSuccessResponse.md)
@@ -1180,6 +1183,7 @@ Not every change is committed to every SDK.
1180
1183
 
1181
1184
  | Version | Date | Comments |
1182
1185
  | --: | :-: | --- |
1186
+ | 3.10.14 | 06/16/2022 | added createEmailSendingDomain2 to support additional MTAs |
1183
1187
  | 3.10.13 | 06/16/2022 | renamed latest method to avoid conflict between customer profile search and storefront search |
1184
1188
  | 3.10.12 | 06/16/2022 | Customer profile search method to look up tags |
1185
1189
  | 3.10.11 | 06/10/2022 | esp segment 3rd party sync add/remove tag fields |
data/docs/EmailDomain.md CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
9
9
  **domain** | **String** | | [optional]
10
10
  **esp_domain_uuid** | **String** | | [optional]
11
11
  **identity_status** | **String** | | [optional]
12
+ **mailgun** | [**Mailgun**](Mailgun.md) | | [optional]
12
13
  **merchant_id** | **String** | | [optional]
13
14
  **provider** | **String** | | [optional]
14
15
  **spf** | [**VerificationRecord**](VerificationRecord.md) | | [optional]
data/docs/Mailgun.md ADDED
@@ -0,0 +1,8 @@
1
+ # UltracartClient::Mailgun
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **api_key** | **String** | | [optional]
7
+
8
+
@@ -13,6 +13,7 @@ Method | HTTP request | Description
13
13
  [**clone_email_campaign**](StorefrontApi.md#clone_email_campaign) | **POST** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/clone | Clone email campaign
14
14
  [**clone_email_flow**](StorefrontApi.md#clone_email_flow) | **POST** /storefront/{storefront_oid}/email/flows/{email_flow_uuid}/clone | Clone email flow
15
15
  [**create_email_sending_domain**](StorefrontApi.md#create_email_sending_domain) | **POST** /storefront/email/sending_domains/{domain}/create | Create email campaign
16
+ [**create_email_sending_domain2**](StorefrontApi.md#create_email_sending_domain2) | **POST** /storefront/email/sending_domains | Create email sending domain for various providers
16
17
  [**create_twilio_account**](StorefrontApi.md#create_twilio_account) | **POST** /storefront/twilio/accounts | Create Twilio account
17
18
  [**delete_email_campaign_folder**](StorefrontApi.md#delete_email_campaign_folder) | **DELETE** /storefront/{storefront_oid}/email/campaign_folders/{email_campaign_folder_uuid} | Delete email campaignFolder
18
19
  [**delete_email_commseq_stat**](StorefrontApi.md#delete_email_commseq_stat) | **DELETE** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/stat | Delete communication sequence stats
@@ -155,6 +156,7 @@ Method | HTTP request | Description
155
156
  [**update_email_plan**](StorefrontApi.md#update_email_plan) | **POST** /storefront/{storefront_oid}/email/plan | Update email plan
156
157
  [**update_email_postcard**](StorefrontApi.md#update_email_postcard) | **PUT** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid} | Update email postcard
157
158
  [**update_email_segment**](StorefrontApi.md#update_email_segment) | **PUT** /storefront/{storefront_oid}/email/segments/{email_segment_uuid} | Update email segment
159
+ [**update_email_sending_domain**](StorefrontApi.md#update_email_sending_domain) | **PUT** /storefront/email/sending_domains/{domain} | Update email sending domain
158
160
  [**update_email_settings**](StorefrontApi.md#update_email_settings) | **POST** /storefront/{storefront_oid}/email/settings | Update email settings
159
161
  [**update_experiment**](StorefrontApi.md#update_experiment) | **PUT** /storefront/{storefront_oid}/experiments/{storefront_experiment_oid} | Update experiment
160
162
  [**update_library_item**](StorefrontApi.md#update_library_item) | **PUT** /storefront/code_library/{library_item_oid} | Update library item. Note that only certain fields may be updated via this method.
@@ -630,6 +632,54 @@ Name | Type | Description | Notes
630
632
 
631
633
 
632
634
 
635
+ # **create_email_sending_domain2**
636
+ > EmailSendingDomainResponse create_email_sending_domain2(email_domain)
637
+
638
+ Create email sending domain for various providers
639
+
640
+ ### Example
641
+ ```ruby
642
+ # load the gem
643
+ require 'ultracart_api'
644
+
645
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
646
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
647
+ api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
648
+
649
+
650
+ email_domain = UltracartClient::EmailDomain.new # EmailDomain | EmailDomain
651
+
652
+
653
+ begin
654
+ #Create email sending domain for various providers
655
+ result = api_instance.create_email_sending_domain2(email_domain)
656
+ p result
657
+ rescue UltracartClient::ApiError => e
658
+ puts "Exception when calling StorefrontApi->create_email_sending_domain2: #{e}"
659
+ end
660
+ ```
661
+
662
+ ### Parameters
663
+
664
+ Name | Type | Description | Notes
665
+ ------------- | ------------- | ------------- | -------------
666
+ **email_domain** | [**EmailDomain**](EmailDomain.md)| EmailDomain |
667
+
668
+ ### Return type
669
+
670
+ [**EmailSendingDomainResponse**](EmailSendingDomainResponse.md)
671
+
672
+ ### Authorization
673
+
674
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
675
+
676
+ ### HTTP request headers
677
+
678
+ - **Content-Type**: application/json
679
+ - **Accept**: application/json
680
+
681
+
682
+
633
683
  # **create_twilio_account**
634
684
  > TwilioResponse create_twilio_account(twilio)
635
685
 
@@ -7944,6 +7994,57 @@ Name | Type | Description | Notes
7944
7994
 
7945
7995
 
7946
7996
 
7997
+ # **update_email_sending_domain**
7998
+ > EmailSendingDomainResponse update_email_sending_domain(domain, email_domain)
7999
+
8000
+ Update email sending domain
8001
+
8002
+ ### Example
8003
+ ```ruby
8004
+ # load the gem
8005
+ require 'ultracart_api'
8006
+
8007
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
8008
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
8009
+ api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
8010
+
8011
+
8012
+ domain = 'domain_example' # String |
8013
+
8014
+ email_domain = UltracartClient::EmailDomain.new # EmailDomain | EmailDomain
8015
+
8016
+
8017
+ begin
8018
+ #Update email sending domain
8019
+ result = api_instance.update_email_sending_domain(domain, email_domain)
8020
+ p result
8021
+ rescue UltracartClient::ApiError => e
8022
+ puts "Exception when calling StorefrontApi->update_email_sending_domain: #{e}"
8023
+ end
8024
+ ```
8025
+
8026
+ ### Parameters
8027
+
8028
+ Name | Type | Description | Notes
8029
+ ------------- | ------------- | ------------- | -------------
8030
+ **domain** | **String**| |
8031
+ **email_domain** | [**EmailDomain**](EmailDomain.md)| EmailDomain |
8032
+
8033
+ ### Return type
8034
+
8035
+ [**EmailSendingDomainResponse**](EmailSendingDomainResponse.md)
8036
+
8037
+ ### Authorization
8038
+
8039
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
8040
+
8041
+ ### HTTP request headers
8042
+
8043
+ - **Content-Type**: application/json
8044
+ - **Accept**: application/json
8045
+
8046
+
8047
+
7947
8048
  # **update_email_settings**
7948
8049
  > EmailSettingsResponse update_email_settings(storefront_oid, settings)
7949
8050
 
@@ -563,6 +563,59 @@ module UltracartClient
563
563
  end
564
564
  return data, status_code, headers
565
565
  end
566
+ # Create email sending domain for various providers
567
+ # @param email_domain EmailDomain
568
+ # @param [Hash] opts the optional parameters
569
+ # @return [EmailSendingDomainResponse]
570
+ def create_email_sending_domain2(email_domain, opts = {})
571
+ data, _status_code, _headers = create_email_sending_domain2_with_http_info(email_domain, opts)
572
+ data
573
+ end
574
+
575
+ # Create email sending domain for various providers
576
+ # @param email_domain EmailDomain
577
+ # @param [Hash] opts the optional parameters
578
+ # @return [Array<(EmailSendingDomainResponse, Fixnum, Hash)>] EmailSendingDomainResponse data, response status code and response headers
579
+ def create_email_sending_domain2_with_http_info(email_domain, opts = {})
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.create_email_sending_domain2 ...'
582
+ end
583
+ # verify the required parameter 'email_domain' is set
584
+ if @api_client.config.client_side_validation && email_domain.nil?
585
+ fail ArgumentError, "Missing the required parameter 'email_domain' when calling StorefrontApi.create_email_sending_domain2"
586
+ end
587
+ # resource path
588
+ local_var_path = '/storefront/email/sending_domains'
589
+
590
+ # query parameters
591
+ query_params = {}
592
+
593
+ # header parameters
594
+ header_params = {}
595
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
596
+ # HTTP header 'Accept' (if needed)
597
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
598
+ # HTTP header 'Content-Type'
599
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
600
+
601
+ # form parameters
602
+ form_params = {}
603
+
604
+ # http body (model)
605
+ post_body = @api_client.object_to_http_body(email_domain)
606
+ auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
607
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
608
+ :header_params => header_params,
609
+ :query_params => query_params,
610
+ :form_params => form_params,
611
+ :body => post_body,
612
+ :auth_names => auth_names,
613
+ :return_type => 'EmailSendingDomainResponse')
614
+ if @api_client.config.debugging
615
+ @api_client.config.logger.debug "API called: StorefrontApi#create_email_sending_domain2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
616
+ end
617
+ return data, status_code, headers
618
+ end
566
619
  # Create Twilio account
567
620
  # @param twilio Twilio
568
621
  # @param [Hash] opts the optional parameters
@@ -8936,6 +8989,65 @@ module UltracartClient
8936
8989
  end
8937
8990
  return data, status_code, headers
8938
8991
  end
8992
+ # Update email sending domain
8993
+ # @param domain
8994
+ # @param email_domain EmailDomain
8995
+ # @param [Hash] opts the optional parameters
8996
+ # @return [EmailSendingDomainResponse]
8997
+ def update_email_sending_domain(domain, email_domain, opts = {})
8998
+ data, _status_code, _headers = update_email_sending_domain_with_http_info(domain, email_domain, opts)
8999
+ data
9000
+ end
9001
+
9002
+ # Update email sending domain
9003
+ # @param domain
9004
+ # @param email_domain EmailDomain
9005
+ # @param [Hash] opts the optional parameters
9006
+ # @return [Array<(EmailSendingDomainResponse, Fixnum, Hash)>] EmailSendingDomainResponse data, response status code and response headers
9007
+ def update_email_sending_domain_with_http_info(domain, email_domain, opts = {})
9008
+ if @api_client.config.debugging
9009
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.update_email_sending_domain ...'
9010
+ end
9011
+ # verify the required parameter 'domain' is set
9012
+ if @api_client.config.client_side_validation && domain.nil?
9013
+ fail ArgumentError, "Missing the required parameter 'domain' when calling StorefrontApi.update_email_sending_domain"
9014
+ end
9015
+ # verify the required parameter 'email_domain' is set
9016
+ if @api_client.config.client_side_validation && email_domain.nil?
9017
+ fail ArgumentError, "Missing the required parameter 'email_domain' when calling StorefrontApi.update_email_sending_domain"
9018
+ end
9019
+ # resource path
9020
+ local_var_path = '/storefront/email/sending_domains/{domain}'.sub('{' + 'domain' + '}', domain.to_s)
9021
+
9022
+ # query parameters
9023
+ query_params = {}
9024
+
9025
+ # header parameters
9026
+ header_params = {}
9027
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
9028
+ # HTTP header 'Accept' (if needed)
9029
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
9030
+ # HTTP header 'Content-Type'
9031
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
9032
+
9033
+ # form parameters
9034
+ form_params = {}
9035
+
9036
+ # http body (model)
9037
+ post_body = @api_client.object_to_http_body(email_domain)
9038
+ auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
9039
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
9040
+ :header_params => header_params,
9041
+ :query_params => query_params,
9042
+ :form_params => form_params,
9043
+ :body => post_body,
9044
+ :auth_names => auth_names,
9045
+ :return_type => 'EmailSendingDomainResponse')
9046
+ if @api_client.config.debugging
9047
+ @api_client.config.logger.debug "API called: StorefrontApi#update_email_sending_domain\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9048
+ end
9049
+ return data, status_code, headers
9050
+ end
8939
9051
  # Update email settings
8940
9052
  # @param storefront_oid
8941
9053
  # @param settings settings request
@@ -26,6 +26,8 @@ module UltracartClient
26
26
 
27
27
  attr_accessor :identity_status
28
28
 
29
+ attr_accessor :mailgun
30
+
29
31
  attr_accessor :merchant_id
30
32
 
31
33
  attr_accessor :provider
@@ -47,6 +49,7 @@ module UltracartClient
47
49
  :'domain' => :'domain',
48
50
  :'esp_domain_uuid' => :'esp_domain_uuid',
49
51
  :'identity_status' => :'identity_status',
52
+ :'mailgun' => :'mailgun',
50
53
  :'merchant_id' => :'merchant_id',
51
54
  :'provider' => :'provider',
52
55
  :'spf' => :'spf',
@@ -65,6 +68,7 @@ module UltracartClient
65
68
  :'domain' => :'String',
66
69
  :'esp_domain_uuid' => :'String',
67
70
  :'identity_status' => :'String',
71
+ :'mailgun' => :'Mailgun',
68
72
  :'merchant_id' => :'String',
69
73
  :'provider' => :'String',
70
74
  :'spf' => :'VerificationRecord',
@@ -108,6 +112,10 @@ module UltracartClient
108
112
  self.identity_status = attributes[:'identity_status']
109
113
  end
110
114
 
115
+ if attributes.has_key?(:'mailgun')
116
+ self.mailgun = attributes[:'mailgun']
117
+ end
118
+
111
119
  if attributes.has_key?(:'merchant_id')
112
120
  self.merchant_id = attributes[:'merchant_id']
113
121
  end
@@ -157,6 +165,7 @@ module UltracartClient
157
165
  domain == o.domain &&
158
166
  esp_domain_uuid == o.esp_domain_uuid &&
159
167
  identity_status == o.identity_status &&
168
+ mailgun == o.mailgun &&
160
169
  merchant_id == o.merchant_id &&
161
170
  provider == o.provider &&
162
171
  spf == o.spf &&
@@ -174,7 +183,7 @@ module UltracartClient
174
183
  # Calculates hash code according to all attributes.
175
184
  # @return [Fixnum] Hash code
176
185
  def hash
177
- [comment, dkim, dkim_status, domain, esp_domain_uuid, identity_status, merchant_id, provider, spf, start_dkim_dts, start_identity_dts, verification].hash
186
+ [comment, dkim, dkim_status, domain, esp_domain_uuid, identity_status, mailgun, merchant_id, provider, spf, start_dkim_dts, start_identity_dts, verification].hash
178
187
  end
179
188
 
180
189
  # Builds the object from hash
@@ -0,0 +1,184 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class Mailgun
17
+ attr_accessor :api_key
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'api_key' => :'api_key'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'api_key' => :'String'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'api_key')
42
+ self.api_key = attributes[:'api_key']
43
+ end
44
+ end
45
+
46
+ # Show invalid properties with the reasons. Usually used together with valid?
47
+ # @return Array for valid properties with the reasons
48
+ def list_invalid_properties
49
+ invalid_properties = Array.new
50
+ invalid_properties
51
+ end
52
+
53
+ # Check to see if the all the properties in the model are valid
54
+ # @return true if the model is valid
55
+ def valid?
56
+ true
57
+ end
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] Object to be compared
61
+ def ==(o)
62
+ return true if self.equal?(o)
63
+ self.class == o.class &&
64
+ api_key == o.api_key
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [api_key].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /\AArray<(.*)>/i
86
+ # check to ensure the input is an array given that the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Deserializes the data based on type
100
+ # @param string type Data type
101
+ # @param string value Value to be deserialized
102
+ # @return [Object] Deserialized data
103
+ def _deserialize(type, value)
104
+ case type.to_sym
105
+ when :DateTime
106
+ DateTime.parse(value)
107
+ when :Date
108
+ Date.parse(value)
109
+ when :String
110
+ value.to_s
111
+ when :Integer
112
+ value.to_i
113
+ when :Float
114
+ value.to_f
115
+ when :BOOLEAN
116
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
+ true
118
+ else
119
+ false
120
+ end
121
+ when :Object
122
+ # generic object (usually a Hash), return directly
123
+ value
124
+ when /\AArray<(?<inner_type>.+)>\z/
125
+ inner_type = Regexp.last_match[:inner_type]
126
+ value.map { |v| _deserialize(inner_type, v) }
127
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
+ k_type = Regexp.last_match[:k_type]
129
+ v_type = Regexp.last_match[:v_type]
130
+ {}.tap do |hash|
131
+ value.each do |k, v|
132
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
+ end
134
+ end
135
+ else # model
136
+ temp_model = UltracartClient.const_get(type).new
137
+ temp_model.build_from_hash(value)
138
+ end
139
+ end
140
+
141
+ # Returns the string representation of the object
142
+ # @return [String] String presentation of the object
143
+ def to_s
144
+ to_hash.to_s
145
+ end
146
+
147
+ # to_body is an alias to to_hash (backward compatibility)
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_body
150
+ to_hash
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Outputs non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ # @param [Object] value Any valid value
168
+ # @return [Hash] Returns the value in the form of hash
169
+ def _to_hash(value)
170
+ if value.is_a?(Array)
171
+ value.compact.map { |v| _to_hash(v) }
172
+ elsif value.is_a?(Hash)
173
+ {}.tap do |hash|
174
+ value.each { |k, v| hash[k] = _to_hash(v) }
175
+ end
176
+ elsif value.respond_to? :to_hash
177
+ value.to_hash
178
+ else
179
+ value
180
+ end
181
+ end
182
+
183
+ end
184
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.13'
14
+ VERSION = '3.10.14'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -465,6 +465,7 @@ require 'ultracart_api/models/linked_account'
465
465
  require 'ultracart_api/models/list_segment_membership'
466
466
  require 'ultracart_api/models/lookup_request'
467
467
  require 'ultracart_api/models/lookup_response'
468
+ require 'ultracart_api/models/mailgun'
468
469
  require 'ultracart_api/models/metric'
469
470
  require 'ultracart_api/models/notification'
470
471
  require 'ultracart_api/models/oauth_revoke_success_response'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.13
4
+ version: 3.10.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -681,6 +681,7 @@ files:
681
681
  - docs/ListSegmentMembership.md
682
682
  - docs/LookupRequest.md
683
683
  - docs/LookupResponse.md
684
+ - docs/Mailgun.md
684
685
  - docs/Metric.md
685
686
  - docs/Notification.md
686
687
  - docs/OauthApi.md
@@ -1381,6 +1382,7 @@ files:
1381
1382
  - lib/ultracart_api/models/list_segment_membership.rb
1382
1383
  - lib/ultracart_api/models/lookup_request.rb
1383
1384
  - lib/ultracart_api/models/lookup_response.rb
1385
+ - lib/ultracart_api/models/mailgun.rb
1384
1386
  - lib/ultracart_api/models/metric.rb
1385
1387
  - lib/ultracart_api/models/notification.rb
1386
1388
  - lib/ultracart_api/models/oauth_revoke_success_response.rb