ultracart_api 4.0.39.rc → 4.0.42.rc

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: 2afae6d4cb49326077cb7026388f479020fffc6857cb1a7478b3a044a8600b6c
4
- data.tar.gz: 9494739cc7d3065dca654bd08aeac99e603b1dc678c0f7e8897bae7a428b7b45
3
+ metadata.gz: 2b1f122135fbc76270b2a27c45e56a8362bcf5b55f831967479862d1b14147fb
4
+ data.tar.gz: b116767c0f15772031876f7aeb21c1879374775cf4069764f588e43c7115f5f3
5
5
  SHA512:
6
- metadata.gz: c6908035700e3811ef04ec77fafaeb8b6af8e947437cb98f126c9426b32e8e16110f952dae467ba534a7a04b814339bc82298e83b46f352b52f7895ae4139123
7
- data.tar.gz: d0508988b13bd0a7ffef3b77bd53ea8ff74e30fec28a675842096b56d1fd34dc5b1608d254eb8f3b98d632541bc72eb8e65ab1abdc831cf5d847e7e0f4907af1
6
+ metadata.gz: eca54d9804f18ffc46ce49e0461cd6f7ab80fe755cd932b3927f7bdd6b14fb7f3574c028319a907c8fa18f48b2827e5af0d1781e640c026deedcb33d09c4a058
7
+ data.tar.gz: 5cb89ab94dee75f60d4875ecb8b0666c9f6664c762d7b2f8d93efced51725aac44c7d9e0df739470f8099b188b22fa5106bf95b1e5d8559bea59b5d1f5e828b1
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.39.rc
10
+ - Package version: 4.0.42.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.39.rc.gem
27
+ gem install ./ultracart_api-4.0.42.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.39.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.42.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.39.rc'
36
+ gem 'ultracart_api', '~> 4.0.42.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -472,6 +472,7 @@ Class | Method | HTTP request | Description
472
472
  - [UltracartClient::AutoOrderItemOption](docs/AutoOrderItemOption.md)
473
473
  - [UltracartClient::AutoOrderItemSimpleSchedule](docs/AutoOrderItemSimpleSchedule.md)
474
474
  - [UltracartClient::AutoOrderLog](docs/AutoOrderLog.md)
475
+ - [UltracartClient::AutoOrderManagement](docs/AutoOrderManagement.md)
475
476
  - [UltracartClient::AutoOrderQuery](docs/AutoOrderQuery.md)
476
477
  - [UltracartClient::AutoOrderQueryBatch](docs/AutoOrderQueryBatch.md)
477
478
  - [UltracartClient::AutoOrderResponse](docs/AutoOrderResponse.md)
@@ -564,6 +565,7 @@ Class | Method | HTTP request | Description
564
565
  - [UltracartClient::Conversation](docs/Conversation.md)
565
566
  - [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
566
567
  - [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
568
+ - [UltracartClient::ConversationEventQueuePosition](docs/ConversationEventQueuePosition.md)
567
569
  - [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
568
570
  - [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
569
571
  - [UltracartClient::ConversationMultimediaUploadUrl](docs/ConversationMultimediaUploadUrl.md)
@@ -573,6 +575,7 @@ Class | Method | HTTP request | Description
573
575
  - [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
574
576
  - [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
575
577
  - [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
578
+ - [UltracartClient::ConversationWebsocketMessage](docs/ConversationWebsocketMessage.md)
576
579
  - [UltracartClient::ConversationsResponse](docs/ConversationsResponse.md)
577
580
  - [UltracartClient::CountriesResponse](docs/CountriesResponse.md)
578
581
  - [UltracartClient::Country](docs/Country.md)
@@ -1164,6 +1167,9 @@ Not every change is committed to every SDK.
1164
1167
 
1165
1168
  | Version | Date | Comments |
1166
1169
  | --: | :-: | --- |
1170
+ | 4.0.42-RC | 07/25/2022 | conversation development |
1171
+ | 4.0.41-RC | 07/25/2022 | conversations bug fixes |
1172
+ | 4.0.40-RC | 07/25/2022 | conversations - add a websocket message model |
1167
1173
  | 4.0.39-RC | 07/21/2022 | conversation response types improvements |
1168
1174
  | 4.0.38-RC | 07/21/2022 | conversation bugfix for poor response objects |
1169
1175
  | 4.0.37-RC | 07/20/2022 | conversation participant name added |
data/docs/AutoOrder.md CHANGED
@@ -19,6 +19,7 @@
19
19
  | **failure_reason** | **String** | The reason this auto order failed during the last rebill attempt | [optional] |
20
20
  | **items** | [**Array<AutoOrderItem>**](AutoOrderItem.md) | The items that are setup to rebill | [optional] |
21
21
  | **logs** | [**Array<AutoOrderLog>**](AutoOrderLog.md) | Logs associated with this auto order | [optional] |
22
+ | **management** | [**AutoOrderManagement**](AutoOrderManagement.md) | | [optional] |
22
23
  | **next_attempt** | **String** | The next time that the auto order will be attempted for processing | [optional] |
23
24
  | **original_order** | [**Order**](Order.md) | | [optional] |
24
25
  | **original_order_id** | **String** | The original order id that this auto order is associated with. | [optional] |
@@ -48,6 +49,7 @@ instance = UltracartClient::AutoOrder.new(
48
49
  failure_reason: null,
49
50
  items: null,
50
51
  logs: null,
52
+ management: null,
51
53
  next_attempt: null,
52
54
  original_order: null,
53
55
  original_order_id: null,
@@ -11,7 +11,6 @@
11
11
  | **arbitrary_unit_cost** | **Float** | Arbitrary unit cost that rebills of this item should occur at | [optional] |
12
12
  | **arbitrary_unit_cost_remaining_orders** | **Integer** | The number of rebills to give the arbitrary unit cost on before reverting to normal pricing. | [optional] |
13
13
  | **auto_order_item_oid** | **Integer** | Primary key of AutoOrderItem | [optional] |
14
- | **first_order_dts** | **String** | Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet. | [optional] |
15
14
  | **frequency** | **String** | Frequency of the rebill if not a fixed schedule | [optional] |
16
15
  | **future_schedules** | [**Array<AutoOrderItemFutureSchedule>**](AutoOrderItemFutureSchedule.md) | The future rebill schedule for this item up to the next ten rebills | [optional] |
17
16
  | **last_order_dts** | **String** | Date/time of the last order of this item | [optional] |
@@ -23,7 +22,6 @@
23
22
  | **options** | [**Array<AutoOrderItemOption>**](AutoOrderItemOption.md) | Options associated with this item | [optional] |
24
23
  | **original_item_id** | **String** | The original item id purchased. This item controls scheduling. If you wish to modify a schedule, for example, from monthly to yearly, change this item from your monthly item to your yearly item, and then change the next_shipment_dts to your desired date. | [optional] |
25
24
  | **original_quantity** | **Float** | The original quantity purchased | [optional] |
26
- | **paused** | **Boolean** | True if paused. This field is an object instead of a primitive for backwards compatibility. | [optional] |
27
25
  | **paypal_payer_id** | **String** | The PayPal Payer ID tied to this item | [optional] |
28
26
  | **paypal_recurring_payment_profile_id** | **String** | The PayPal Profile ID tied to this item | [optional] |
29
27
  | **preshipment_notice_sent** | **Boolean** | True if the preshipment notice associated with the next rebill has been sent | [optional] |
@@ -44,7 +42,6 @@ instance = UltracartClient::AutoOrderItem.new(
44
42
  arbitrary_unit_cost: null,
45
43
  arbitrary_unit_cost_remaining_orders: null,
46
44
  auto_order_item_oid: null,
47
- first_order_dts: null,
48
45
  frequency: null,
49
46
  future_schedules: null,
50
47
  last_order_dts: null,
@@ -56,7 +53,6 @@ instance = UltracartClient::AutoOrderItem.new(
56
53
  options: null,
57
54
  original_item_id: null,
58
55
  original_quantity: null,
59
- paused: null,
60
56
  paypal_payer_id: null,
61
57
  paypal_recurring_payment_profile_id: null,
62
58
  preshipment_notice_sent: null,
@@ -0,0 +1,18 @@
1
+ # UltracartClient::AutoOrderManagement
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **update_billing_url** | **String** | URL where the customer can go to update their billing information. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::AutoOrderManagement.new(
15
+ update_billing_url: null
16
+ )
17
+ ```
18
+
data/docs/Conversation.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **closed** | **Boolean** | | [optional] |
7
8
  | **conversation_arn** | **String** | | [optional] |
8
9
  | **conversation_uuid** | **String** | | [optional] |
9
10
  | **merchant_id** | **String** | | [optional] |
@@ -16,6 +17,7 @@
16
17
  require 'ultracart_api'
17
18
 
18
19
  instance = UltracartClient::Conversation.new(
20
+ closed: null,
19
21
  conversation_arn: null,
20
22
  conversation_uuid: null,
21
23
  merchant_id: null,
@@ -0,0 +1,20 @@
1
+ # UltracartClient::ConversationEventQueuePosition
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **available** | **Boolean** | True if agents are logged into the queue | [optional] |
8
+ | **position** | **Integer** | Position in the queue. Value will be -1 if they cant be found in the queue. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::ConversationEventQueuePosition.new(
16
+ available: null,
17
+ position: null
18
+ )
19
+ ```
20
+
@@ -6,6 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **add_conversation_participant_arns** | **Array<String>** | | [optional] |
8
8
  | **conversation_arn** | **String** | | [optional] |
9
+ | **conversation_webchat_queue_uuid** | **String** | | [optional] |
9
10
 
10
11
  ## Example
11
12
 
@@ -14,7 +15,8 @@ require 'ultracart_api'
14
15
 
15
16
  instance = UltracartClient::ConversationStartRequest.new(
16
17
  add_conversation_participant_arns: null,
17
- conversation_arn: null
18
+ conversation_arn: null,
19
+ conversation_webchat_queue_uuid: null
18
20
  )
19
21
  ```
20
22
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **closed** | **Boolean** | | [optional] |
7
8
  | **conversation_arn** | **String** | | [optional] |
8
9
  | **conversation_uuid** | **String** | | [optional] |
9
10
  | **last_conversation_message_body** | **String** | | [optional] |
@@ -20,6 +21,7 @@
20
21
  require 'ultracart_api'
21
22
 
22
23
  instance = UltracartClient::ConversationSummary.new(
24
+ closed: null,
23
25
  conversation_arn: null,
24
26
  conversation_uuid: null,
25
27
  last_conversation_message_body: null,
@@ -0,0 +1,34 @@
1
+ # UltracartClient::ConversationWebsocketMessage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **conversation_uuid** | **String** | Conversation UUID if the websocket message is tied to a specific conversation | [optional] |
8
+ | **event_conversation_closed** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
9
+ | **event_new_conversation** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
10
+ | **event_new_message** | [**ConversationSummary**](ConversationSummary.md) | | [optional] |
11
+ | **event_queue_position** | [**ConversationEventQueuePosition**](ConversationEventQueuePosition.md) | | [optional] |
12
+ | **event_type** | **String** | Type of event | [optional] |
13
+ | **event_updated_message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
14
+ | **message** | [**ConversationMessage**](ConversationMessage.md) | | [optional] |
15
+ | **type** | **String** | Type of message | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::ConversationWebsocketMessage.new(
23
+ conversation_uuid: null,
24
+ event_conversation_closed: null,
25
+ event_new_conversation: null,
26
+ event_new_message: null,
27
+ event_queue_position: null,
28
+ event_type: null,
29
+ event_updated_message: null,
30
+ message: null,
31
+ type: null
32
+ )
33
+ ```
34
+
@@ -14,7 +14,7 @@
14
14
  | **postcard_container_cjson_last_modified_dts** | **String** | Timestamp the last time the container was modified. | [optional] |
15
15
  | **postcard_front_container_cjson** | **String** | Postcard front container cjson | [optional] |
16
16
  | **postcard_front_container_uuid** | **String** | Postcard front container uuid | [optional] |
17
- | **screenshot_back_url** | **String** | URL to screenshot of the front of the postcard | [optional] |
17
+ | **screenshot_back_url** | **String** | URL to screenshot of the back of the postcard | [optional] |
18
18
  | **screenshot_front_url** | **String** | URL to screenshot of the front of the postcard | [optional] |
19
19
  | **storefront_oid** | **Integer** | Storefront oid | [optional] |
20
20
 
@@ -60,6 +60,8 @@ module UltracartClient
60
60
  # Logs associated with this auto order
61
61
  attr_accessor :logs
62
62
 
63
+ attr_accessor :management
64
+
63
65
  # The next time that the auto order will be attempted for processing
64
66
  attr_accessor :next_attempt
65
67
 
@@ -120,6 +122,7 @@ module UltracartClient
120
122
  :'failure_reason' => :'failure_reason',
121
123
  :'items' => :'items',
122
124
  :'logs' => :'logs',
125
+ :'management' => :'management',
123
126
  :'next_attempt' => :'next_attempt',
124
127
  :'original_order' => :'original_order',
125
128
  :'original_order_id' => :'original_order_id',
@@ -153,6 +156,7 @@ module UltracartClient
153
156
  :'failure_reason' => :'String',
154
157
  :'items' => :'Array<AutoOrderItem>',
155
158
  :'logs' => :'Array<AutoOrderLog>',
159
+ :'management' => :'AutoOrderManagement',
156
160
  :'next_attempt' => :'String',
157
161
  :'original_order' => :'Order',
158
162
  :'original_order_id' => :'String',
@@ -248,6 +252,10 @@ module UltracartClient
248
252
  end
249
253
  end
250
254
 
255
+ if attributes.key?(:'management')
256
+ self.management = attributes[:'management']
257
+ end
258
+
251
259
  if attributes.key?(:'next_attempt')
252
260
  self.next_attempt = attributes[:'next_attempt']
253
261
  end
@@ -324,6 +332,7 @@ module UltracartClient
324
332
  failure_reason == o.failure_reason &&
325
333
  items == o.items &&
326
334
  logs == o.logs &&
335
+ management == o.management &&
327
336
  next_attempt == o.next_attempt &&
328
337
  original_order == o.original_order &&
329
338
  original_order_id == o.original_order_id &&
@@ -342,7 +351,7 @@ module UltracartClient
342
351
  # Calculates hash code according to all attributes.
343
352
  # @return [Integer] Hash code
344
353
  def hash
345
- [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
354
+ [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
346
355
  end
347
356
 
348
357
  # Builds the object from hash
@@ -36,9 +36,6 @@ module UltracartClient
36
36
  # Primary key of AutoOrderItem
37
37
  attr_accessor :auto_order_item_oid
38
38
 
39
- # Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet.
40
- attr_accessor :first_order_dts
41
-
42
39
  # Frequency of the rebill if not a fixed schedule
43
40
  attr_accessor :frequency
44
41
 
@@ -72,9 +69,6 @@ module UltracartClient
72
69
  # The original quantity purchased
73
70
  attr_accessor :original_quantity
74
71
 
75
- # True if paused. This field is an object instead of a primitive for backwards compatibility.
76
- attr_accessor :paused
77
-
78
72
  # The PayPal Payer ID tied to this item
79
73
  attr_accessor :paypal_payer_id
80
74
 
@@ -124,7 +118,6 @@ module UltracartClient
124
118
  :'arbitrary_unit_cost' => :'arbitrary_unit_cost',
125
119
  :'arbitrary_unit_cost_remaining_orders' => :'arbitrary_unit_cost_remaining_orders',
126
120
  :'auto_order_item_oid' => :'auto_order_item_oid',
127
- :'first_order_dts' => :'first_order_dts',
128
121
  :'frequency' => :'frequency',
129
122
  :'future_schedules' => :'future_schedules',
130
123
  :'last_order_dts' => :'last_order_dts',
@@ -136,7 +129,6 @@ module UltracartClient
136
129
  :'options' => :'options',
137
130
  :'original_item_id' => :'original_item_id',
138
131
  :'original_quantity' => :'original_quantity',
139
- :'paused' => :'paused',
140
132
  :'paypal_payer_id' => :'paypal_payer_id',
141
133
  :'paypal_recurring_payment_profile_id' => :'paypal_recurring_payment_profile_id',
142
134
  :'preshipment_notice_sent' => :'preshipment_notice_sent',
@@ -161,7 +153,6 @@ module UltracartClient
161
153
  :'arbitrary_unit_cost' => :'Float',
162
154
  :'arbitrary_unit_cost_remaining_orders' => :'Integer',
163
155
  :'auto_order_item_oid' => :'Integer',
164
- :'first_order_dts' => :'String',
165
156
  :'frequency' => :'String',
166
157
  :'future_schedules' => :'Array<AutoOrderItemFutureSchedule>',
167
158
  :'last_order_dts' => :'String',
@@ -173,7 +164,6 @@ module UltracartClient
173
164
  :'options' => :'Array<AutoOrderItemOption>',
174
165
  :'original_item_id' => :'String',
175
166
  :'original_quantity' => :'Float',
176
- :'paused' => :'Boolean',
177
167
  :'paypal_payer_id' => :'String',
178
168
  :'paypal_recurring_payment_profile_id' => :'String',
179
169
  :'preshipment_notice_sent' => :'Boolean',
@@ -232,10 +222,6 @@ module UltracartClient
232
222
  self.auto_order_item_oid = attributes[:'auto_order_item_oid']
233
223
  end
234
224
 
235
- if attributes.key?(:'first_order_dts')
236
- self.first_order_dts = attributes[:'first_order_dts']
237
- end
238
-
239
225
  if attributes.key?(:'frequency')
240
226
  self.frequency = attributes[:'frequency']
241
227
  end
@@ -284,10 +270,6 @@ module UltracartClient
284
270
  self.original_quantity = attributes[:'original_quantity']
285
271
  end
286
272
 
287
- if attributes.key?(:'paused')
288
- self.paused = attributes[:'paused']
289
- end
290
-
291
273
  if attributes.key?(:'paypal_payer_id')
292
274
  self.paypal_payer_id = attributes[:'paypal_payer_id']
293
275
  end
@@ -350,7 +332,6 @@ module UltracartClient
350
332
  arbitrary_unit_cost == o.arbitrary_unit_cost &&
351
333
  arbitrary_unit_cost_remaining_orders == o.arbitrary_unit_cost_remaining_orders &&
352
334
  auto_order_item_oid == o.auto_order_item_oid &&
353
- first_order_dts == o.first_order_dts &&
354
335
  frequency == o.frequency &&
355
336
  future_schedules == o.future_schedules &&
356
337
  last_order_dts == o.last_order_dts &&
@@ -362,7 +343,6 @@ module UltracartClient
362
343
  options == o.options &&
363
344
  original_item_id == o.original_item_id &&
364
345
  original_quantity == o.original_quantity &&
365
- paused == o.paused &&
366
346
  paypal_payer_id == o.paypal_payer_id &&
367
347
  paypal_recurring_payment_profile_id == o.paypal_recurring_payment_profile_id &&
368
348
  preshipment_notice_sent == o.preshipment_notice_sent &&
@@ -380,7 +360,7 @@ module UltracartClient
380
360
  # Calculates hash code according to all attributes.
381
361
  # @return [Integer] Hash code
382
362
  def hash
383
- [arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, first_order_dts, frequency, future_schedules, last_order_dts, life_time_value, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paused, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, rebill_value, remaining_repeat_count, simple_schedule].hash
363
+ [arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, frequency, future_schedules, last_order_dts, life_time_value, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, rebill_value, remaining_repeat_count, simple_schedule].hash
384
364
  end
385
365
 
386
366
  # Builds the object from hash
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class AutoOrderManagement
18
+ # URL where the customer can go to update their billing information.
19
+ attr_accessor :update_billing_url
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'update_billing_url' => :'update_billing_url'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'update_billing_url' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::AutoOrderManagement` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::AutoOrderManagement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'update_billing_url')
62
+ self.update_billing_url = attributes[:'update_billing_url']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ update_billing_url == o.update_billing_url
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [update_billing_url].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end