ultracart_api 3.10.22 → 3.10.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/docs/AutoOrder.md +1 -0
- data/docs/AutoOrderManagement.md +8 -0
- data/docs/ConversationAgentAuth.md +13 -0
- data/docs/ConversationAgentAuthResponse.md +5 -6
- data/docs/ConversationApi.md +6 -5
- data/docs/ConversationEventQueuePosition.md +7 -0
- data/docs/ConversationMultimediaUploadUrl.md +9 -0
- data/docs/ConversationMultimediaUploadUrlResponse.md +12 -0
- data/docs/ConversationResponse.md +12 -0
- data/docs/ConversationStartRequest.md +1 -0
- data/docs/ConversationStartResponse.md +1 -2
- data/docs/ConversationWebsocketMessage.md +16 -0
- data/lib/ultracart_api/api/conversation_api.rb +9 -8
- data/lib/ultracart_api/models/auto_order.rb +10 -1
- data/lib/ultracart_api/models/auto_order_management.rb +185 -0
- data/lib/ultracart_api/models/conversation_agent_auth.rb +231 -0
- data/lib/ultracart_api/models/conversation_agent_auth_response.rb +32 -42
- data/lib/ultracart_api/models/conversation_event_queue_position.rb +175 -0
- data/lib/ultracart_api/models/conversation_multimedia_upload_url.rb +193 -0
- data/lib/ultracart_api/models/conversation_multimedia_upload_url_response.rb +221 -0
- data/lib/ultracart_api/models/conversation_response.rb +221 -0
- data/lib/ultracart_api/models/conversation_start_request.rb +13 -4
- data/lib/ultracart_api/models/conversation_start_response.rb +7 -16
- data/lib/ultracart_api/models/conversation_websocket_message.rb +305 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +7 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4af8b1802f29835912c31dbf47b4a6aace7bde8fe41ba6dc168301bdfc1d32c
|
4
|
+
data.tar.gz: 5c6db27fba9988151c4f8cdb2b2629471c7f3415573bb7f001573a5fea7d52da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 809ed5a47539b0946f910a7b7a7351ee19b95860cece13d8d2dcef63123da38eb58ed555f407767ee3997ddaf04fe0b2bd658b20f73409ac16e60efde550a859
|
7
|
+
data.tar.gz: 42d8b1dc51470d12018937c5723c314db08eab31da54b3ec9e313e60f733e9c230424e3265cfcf2b6b114fcb6518bfa35a18936cf3211949c0e3500326b3dc5b
|
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.
|
10
|
+
- Package version: 3.10.23
|
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.
|
27
|
+
gem install ./ultracart_api-3.10.23.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.23.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.
|
35
|
+
gem 'ultracart_api', '~> 3.10.23'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -466,6 +466,7 @@ Class | Method | HTTP request | Description
|
|
466
466
|
- [UltracartClient::AutoOrderItemOption](docs/AutoOrderItemOption.md)
|
467
467
|
- [UltracartClient::AutoOrderItemSimpleSchedule](docs/AutoOrderItemSimpleSchedule.md)
|
468
468
|
- [UltracartClient::AutoOrderLog](docs/AutoOrderLog.md)
|
469
|
+
- [UltracartClient::AutoOrderManagement](docs/AutoOrderManagement.md)
|
469
470
|
- [UltracartClient::AutoOrderQuery](docs/AutoOrderQuery.md)
|
470
471
|
- [UltracartClient::AutoOrderQueryBatch](docs/AutoOrderQueryBatch.md)
|
471
472
|
- [UltracartClient::AutoOrderResponse](docs/AutoOrderResponse.md)
|
@@ -556,13 +557,19 @@ Class | Method | HTTP request | Description
|
|
556
557
|
- [UltracartClient::CheckoutStateProvinceResponse](docs/CheckoutStateProvinceResponse.md)
|
557
558
|
- [UltracartClient::CityStateZip](docs/CityStateZip.md)
|
558
559
|
- [UltracartClient::Conversation](docs/Conversation.md)
|
560
|
+
- [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
|
559
561
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
562
|
+
- [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
|
560
563
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
561
564
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
565
|
+
- [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
|
566
|
+
- [UltracartClient::ConversationMultimediaUploadUrlResponse](docs/ConversationMultimediaUploadUrlResponse.md)
|
562
567
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
568
|
+
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
563
569
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
564
570
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
565
571
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
572
|
+
- [UltracartClient::ConversationWebsocketMessage](docs/ConversationWebsocketMessage.md)
|
566
573
|
- [UltracartClient::ConversationsResponse](docs/ConversationsResponse.md)
|
567
574
|
- [UltracartClient::CountriesResponse](docs/CountriesResponse.md)
|
568
575
|
- [UltracartClient::Country](docs/Country.md)
|
@@ -1152,6 +1159,7 @@ Not every change is committed to every SDK.
|
|
1152
1159
|
|
1153
1160
|
| Version | Date | Comments |
|
1154
1161
|
| --: | :-: | --- |
|
1162
|
+
| 3.10.23 | 07/25/2022 | conversations - add a websocket message model |
|
1155
1163
|
| 3.10.22 | 07/20/2022 | conversation participant name added |
|
1156
1164
|
| 3.10.21 | 07/18/2022 | twilio dev |
|
1157
1165
|
| 3.10.20 | 07/14/2022 | Add channel storefront_oid to the customer activity record |
|
data/docs/AutoOrder.md
CHANGED
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**failure_reason** | **String** | The reason this auto order failed during the last rebill attempt | [optional]
|
19
19
|
**items** | [**Array<AutoOrderItem>**](AutoOrderItem.md) | The items that are setup to rebill | [optional]
|
20
20
|
**logs** | [**Array<AutoOrderLog>**](AutoOrderLog.md) | Logs associated with this auto order | [optional]
|
21
|
+
**management** | [**AutoOrderManagement**](AutoOrderManagement.md) | | [optional]
|
21
22
|
**next_attempt** | **String** | The next time that the auto order will be attempted for processing | [optional]
|
22
23
|
**original_order** | [**Order**](Order.md) | | [optional]
|
23
24
|
**original_order_id** | **String** | The original order id that this auto order is associated with. | [optional]
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# UltracartClient::AutoOrderManagement
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**update_billing_url** | **String** | URL where the customer can go to update their billing information. | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# UltracartClient::ConversationAgentAuth
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**conversation_participant_arn** | **String** | | [optional]
|
7
|
+
**conversation_participant_name** | **String** | | [optional]
|
8
|
+
**jwt** | **String** | | [optional]
|
9
|
+
**merchant_id** | **String** | | [optional]
|
10
|
+
**twilio_phone_numbers** | **Array<String>** | | [optional]
|
11
|
+
**websocket_url** | **String** | | [optional]
|
12
|
+
|
13
|
+
|
@@ -3,11 +3,10 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
7
|
-
**
|
8
|
-
**
|
9
|
-
**
|
10
|
-
**
|
11
|
-
**websocket_url** | **String** | | [optional]
|
6
|
+
**agent_auth** | [**ConversationAgentAuth**](ConversationAgentAuth.md) | | [optional]
|
7
|
+
**error** | [**Error**](Error.md) | | [optional]
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
12
11
|
|
13
12
|
|
data/docs/ConversationApi.md
CHANGED
@@ -59,7 +59,7 @@ This endpoint does not need any parameter.
|
|
59
59
|
|
60
60
|
|
61
61
|
# **get_conversation**
|
62
|
-
>
|
62
|
+
> ConversationResponse get_conversation(conversation_uuid)
|
63
63
|
|
64
64
|
Retrieve a conversation
|
65
65
|
|
@@ -95,7 +95,7 @@ Name | Type | Description | Notes
|
|
95
95
|
|
96
96
|
### Return type
|
97
97
|
|
98
|
-
[**
|
98
|
+
[**ConversationResponse**](ConversationResponse.md)
|
99
99
|
|
100
100
|
### Authorization
|
101
101
|
|
@@ -109,7 +109,7 @@ Name | Type | Description | Notes
|
|
109
109
|
|
110
110
|
|
111
111
|
# **get_conversation_multimedia_upload_url**
|
112
|
-
> get_conversation_multimedia_upload_url(extension)
|
112
|
+
> ConversationMultimediaUploadUrlResponse get_conversation_multimedia_upload_url(extension)
|
113
113
|
|
114
114
|
Get a presigned conersation multimedia upload URL
|
115
115
|
|
@@ -130,7 +130,8 @@ extension = 'extension_example' # String |
|
|
130
130
|
|
131
131
|
begin
|
132
132
|
#Get a presigned conersation multimedia upload URL
|
133
|
-
api_instance.get_conversation_multimedia_upload_url(extension)
|
133
|
+
result = api_instance.get_conversation_multimedia_upload_url(extension)
|
134
|
+
p result
|
134
135
|
rescue UltracartClient::ApiError => e
|
135
136
|
puts "Exception when calling ConversationApi->get_conversation_multimedia_upload_url: #{e}"
|
136
137
|
end
|
@@ -144,7 +145,7 @@ Name | Type | Description | Notes
|
|
144
145
|
|
145
146
|
### Return type
|
146
147
|
|
147
|
-
|
148
|
+
[**ConversationMultimediaUploadUrlResponse**](ConversationMultimediaUploadUrlResponse.md)
|
148
149
|
|
149
150
|
### Authorization
|
150
151
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::ConversationMultimediaUploadUrlResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**conversation_multimedia_upload_url** | [**ConversationMultimediaUploadUrl**](ConversationMultimediaUploadUrl.md) | | [optional]
|
7
|
+
**error** | [**Error**](Error.md) | | [optional]
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::ConversationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**conversation** | [**Conversation**](Conversation.md) | | [optional]
|
7
|
+
**error** | [**Error**](Error.md) | | [optional]
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**add_conversation_participant_arns** | **Array<String>** | | [optional]
|
7
7
|
**conversation_arn** | **String** | | [optional]
|
8
|
+
**conversation_webchat_queue_uuid** | **String** | | [optional]
|
8
9
|
|
9
10
|
|
@@ -3,7 +3,6 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**
|
7
|
-
**conversation_uuid** | **String** | | [optional]
|
6
|
+
**conversation** | [**Conversation**](Conversation.md) | | [optional]
|
8
7
|
|
9
8
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# UltracartClient::ConversationWebsocketMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**conversation_uuid** | **String** | Conversation UUID if the websocket message is tied to a specific conversation | [optional]
|
7
|
+
**event_conversation_closed** | [**Conversation**](Conversation.md) | | [optional]
|
8
|
+
**event_new_conversation** | [**Conversation**](Conversation.md) | | [optional]
|
9
|
+
**event_new_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
10
|
+
**event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional]
|
11
|
+
**event_type** | **String** | Type of event | [optional]
|
12
|
+
**event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
13
|
+
**message** | [**ConversationMessage**](ConversationMessage.md) | | [optional]
|
14
|
+
**type** | **String** | Type of message | [optional]
|
15
|
+
|
16
|
+
|
@@ -85,7 +85,7 @@ module UltracartClient
|
|
85
85
|
# Retrieve a conversation including the participants and messages
|
86
86
|
# @param conversation_uuid
|
87
87
|
# @param [Hash] opts the optional parameters
|
88
|
-
# @return [
|
88
|
+
# @return [ConversationResponse]
|
89
89
|
def get_conversation(conversation_uuid, opts = {})
|
90
90
|
data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
|
91
91
|
data
|
@@ -95,7 +95,7 @@ module UltracartClient
|
|
95
95
|
# Retrieve a conversation including the participants and messages
|
96
96
|
# @param conversation_uuid
|
97
97
|
# @param [Hash] opts the optional parameters
|
98
|
-
# @return [Array<(
|
98
|
+
# @return [Array<(ConversationResponse, Fixnum, Hash)>] ConversationResponse data, response status code and response headers
|
99
99
|
def get_conversation_with_http_info(conversation_uuid, opts = {})
|
100
100
|
if @api_client.config.debugging
|
101
101
|
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation ...'
|
@@ -130,7 +130,7 @@ module UltracartClient
|
|
130
130
|
:form_params => form_params,
|
131
131
|
:body => post_body,
|
132
132
|
:auth_names => auth_names,
|
133
|
-
:return_type => '
|
133
|
+
:return_type => 'ConversationResponse')
|
134
134
|
if @api_client.config.debugging
|
135
135
|
@api_client.config.logger.debug "API called: ConversationApi#get_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
136
136
|
end
|
@@ -140,17 +140,17 @@ module UltracartClient
|
|
140
140
|
# Get a presigned conersation multimedia upload URL
|
141
141
|
# @param extension
|
142
142
|
# @param [Hash] opts the optional parameters
|
143
|
-
# @return [
|
143
|
+
# @return [ConversationMultimediaUploadUrlResponse]
|
144
144
|
def get_conversation_multimedia_upload_url(extension, opts = {})
|
145
|
-
get_conversation_multimedia_upload_url_with_http_info(extension, opts)
|
146
|
-
|
145
|
+
data, _status_code, _headers = get_conversation_multimedia_upload_url_with_http_info(extension, opts)
|
146
|
+
data
|
147
147
|
end
|
148
148
|
|
149
149
|
# Get a presigned conersation multimedia upload URL
|
150
150
|
# Get a presigned conersation multimedia upload URL
|
151
151
|
# @param extension
|
152
152
|
# @param [Hash] opts the optional parameters
|
153
|
-
# @return [Array<(
|
153
|
+
# @return [Array<(ConversationMultimediaUploadUrlResponse, Fixnum, Hash)>] ConversationMultimediaUploadUrlResponse data, response status code and response headers
|
154
154
|
def get_conversation_multimedia_upload_url_with_http_info(extension, opts = {})
|
155
155
|
if @api_client.config.debugging
|
156
156
|
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_multimedia_upload_url ...'
|
@@ -184,7 +184,8 @@ module UltracartClient
|
|
184
184
|
:query_params => query_params,
|
185
185
|
:form_params => form_params,
|
186
186
|
:body => post_body,
|
187
|
-
:auth_names => auth_names
|
187
|
+
:auth_names => auth_names,
|
188
|
+
:return_type => 'ConversationMultimediaUploadUrlResponse')
|
188
189
|
if @api_client.config.debugging
|
189
190
|
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_multimedia_upload_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
191
|
end
|
@@ -59,6 +59,8 @@ module UltracartClient
|
|
59
59
|
# Logs associated with this auto order
|
60
60
|
attr_accessor :logs
|
61
61
|
|
62
|
+
attr_accessor :management
|
63
|
+
|
62
64
|
# The next time that the auto order will be attempted for processing
|
63
65
|
attr_accessor :next_attempt
|
64
66
|
|
@@ -119,6 +121,7 @@ module UltracartClient
|
|
119
121
|
:'failure_reason' => :'failure_reason',
|
120
122
|
:'items' => :'items',
|
121
123
|
:'logs' => :'logs',
|
124
|
+
:'management' => :'management',
|
122
125
|
:'next_attempt' => :'next_attempt',
|
123
126
|
:'original_order' => :'original_order',
|
124
127
|
:'original_order_id' => :'original_order_id',
|
@@ -147,6 +150,7 @@ module UltracartClient
|
|
147
150
|
:'failure_reason' => :'String',
|
148
151
|
:'items' => :'Array<AutoOrderItem>',
|
149
152
|
:'logs' => :'Array<AutoOrderLog>',
|
153
|
+
:'management' => :'AutoOrderManagement',
|
150
154
|
:'next_attempt' => :'String',
|
151
155
|
:'original_order' => :'Order',
|
152
156
|
:'original_order_id' => :'String',
|
@@ -229,6 +233,10 @@ module UltracartClient
|
|
229
233
|
end
|
230
234
|
end
|
231
235
|
|
236
|
+
if attributes.has_key?(:'management')
|
237
|
+
self.management = attributes[:'management']
|
238
|
+
end
|
239
|
+
|
232
240
|
if attributes.has_key?(:'next_attempt')
|
233
241
|
self.next_attempt = attributes[:'next_attempt']
|
234
242
|
end
|
@@ -305,6 +313,7 @@ module UltracartClient
|
|
305
313
|
failure_reason == o.failure_reason &&
|
306
314
|
items == o.items &&
|
307
315
|
logs == o.logs &&
|
316
|
+
management == o.management &&
|
308
317
|
next_attempt == o.next_attempt &&
|
309
318
|
original_order == o.original_order &&
|
310
319
|
original_order_id == o.original_order_id &&
|
@@ -323,7 +332,7 @@ module UltracartClient
|
|
323
332
|
# Calculates hash code according to all attributes.
|
324
333
|
# @return [Fixnum] Hash code
|
325
334
|
def hash
|
326
|
-
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
335
|
+
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, management, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
327
336
|
end
|
328
337
|
|
329
338
|
# Builds the object from hash
|
@@ -0,0 +1,185 @@
|
|
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 AutoOrderManagement
|
17
|
+
# URL where the customer can go to update their billing information.
|
18
|
+
attr_accessor :update_billing_url
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'update_billing_url' => :'update_billing_url'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'update_billing_url' => :'String'
|
31
|
+
}
|
32
|
+
end
|
33
|
+
|
34
|
+
# Initializes the object
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
36
|
+
def initialize(attributes = {})
|
37
|
+
return unless attributes.is_a?(Hash)
|
38
|
+
|
39
|
+
# convert string to symbol for hash key
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
41
|
+
|
42
|
+
if attributes.has_key?(:'update_billing_url')
|
43
|
+
self.update_billing_url = attributes[:'update_billing_url']
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
48
|
+
# @return Array for valid properties with the reasons
|
49
|
+
def list_invalid_properties
|
50
|
+
invalid_properties = Array.new
|
51
|
+
invalid_properties
|
52
|
+
end
|
53
|
+
|
54
|
+
# Check to see if the all the properties in the model are valid
|
55
|
+
# @return true if the model is valid
|
56
|
+
def valid?
|
57
|
+
true
|
58
|
+
end
|
59
|
+
|
60
|
+
# Checks equality by comparing each attribute.
|
61
|
+
# @param [Object] Object to be compared
|
62
|
+
def ==(o)
|
63
|
+
return true if self.equal?(o)
|
64
|
+
self.class == o.class &&
|
65
|
+
update_billing_url == o.update_billing_url
|
66
|
+
end
|
67
|
+
|
68
|
+
# @see the `==` method
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def eql?(o)
|
71
|
+
self == o
|
72
|
+
end
|
73
|
+
|
74
|
+
# Calculates hash code according to all attributes.
|
75
|
+
# @return [Fixnum] Hash code
|
76
|
+
def hash
|
77
|
+
[update_billing_url].hash
|
78
|
+
end
|
79
|
+
|
80
|
+
# Builds the object from hash
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
82
|
+
# @return [Object] Returns the model itself
|
83
|
+
def build_from_hash(attributes)
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
86
|
+
if type =~ /\AArray<(.*)>/i
|
87
|
+
# check to ensure the input is an array given that the attribute
|
88
|
+
# is documented as an array but the input is not
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
91
|
+
end
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
94
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
95
|
+
end
|
96
|
+
|
97
|
+
self
|
98
|
+
end
|
99
|
+
|
100
|
+
# Deserializes the data based on type
|
101
|
+
# @param string type Data type
|
102
|
+
# @param string value Value to be deserialized
|
103
|
+
# @return [Object] Deserialized data
|
104
|
+
def _deserialize(type, value)
|
105
|
+
case type.to_sym
|
106
|
+
when :DateTime
|
107
|
+
DateTime.parse(value)
|
108
|
+
when :Date
|
109
|
+
Date.parse(value)
|
110
|
+
when :String
|
111
|
+
value.to_s
|
112
|
+
when :Integer
|
113
|
+
value.to_i
|
114
|
+
when :Float
|
115
|
+
value.to_f
|
116
|
+
when :BOOLEAN
|
117
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
118
|
+
true
|
119
|
+
else
|
120
|
+
false
|
121
|
+
end
|
122
|
+
when :Object
|
123
|
+
# generic object (usually a Hash), return directly
|
124
|
+
value
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
128
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
131
|
+
{}.tap do |hash|
|
132
|
+
value.each do |k, v|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
else # model
|
137
|
+
temp_model = UltracartClient.const_get(type).new
|
138
|
+
temp_model.build_from_hash(value)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Returns the string representation of the object
|
143
|
+
# @return [String] String presentation of the object
|
144
|
+
def to_s
|
145
|
+
to_hash.to_s
|
146
|
+
end
|
147
|
+
|
148
|
+
# to_body is an alias to to_hash (backward compatibility)
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
150
|
+
def to_body
|
151
|
+
to_hash
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the object in the form of hash
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_hash
|
157
|
+
hash = {}
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
159
|
+
value = self.send(attr)
|
160
|
+
next if value.nil?
|
161
|
+
hash[param] = _to_hash(value)
|
162
|
+
end
|
163
|
+
hash
|
164
|
+
end
|
165
|
+
|
166
|
+
# Outputs non-array value in the form of hash
|
167
|
+
# For object, use to_hash. Otherwise, just return the value
|
168
|
+
# @param [Object] value Any valid value
|
169
|
+
# @return [Hash] Returns the value in the form of hash
|
170
|
+
def _to_hash(value)
|
171
|
+
if value.is_a?(Array)
|
172
|
+
value.compact.map { |v| _to_hash(v) }
|
173
|
+
elsif value.is_a?(Hash)
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
176
|
+
end
|
177
|
+
elsif value.respond_to? :to_hash
|
178
|
+
value.to_hash
|
179
|
+
else
|
180
|
+
value
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
end
|
185
|
+
end
|