ultracart_api 3.2.12 → 3.3.0

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.
@@ -0,0 +1,195 @@
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 SingleSignOnTokenRequest
17
+ # The code received on the redirect URI after the customer approved the single sign on request.
18
+ attr_accessor :code
19
+
20
+ # Grant type. The value should be simple_key.
21
+ attr_accessor :grant_type
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'code' => :'code',
27
+ :'grant_type' => :'grant_type'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'code' => :'String',
35
+ :'grant_type' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'code')
48
+ self.code = attributes[:'code']
49
+ end
50
+
51
+ if attributes.has_key?(:'grant_type')
52
+ self.grant_type = attributes[:'grant_type']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ invalid_properties
61
+ end
62
+
63
+ # Check to see if the all the properties in the model are valid
64
+ # @return true if the model is valid
65
+ def valid?
66
+ true
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(o)
72
+ return true if self.equal?(o)
73
+ self.class == o.class &&
74
+ code == o.code &&
75
+ grant_type == o.grant_type
76
+ end
77
+
78
+ # @see the `==` method
79
+ # @param [Object] Object to be compared
80
+ def eql?(o)
81
+ self == o
82
+ end
83
+
84
+ # Calculates hash code according to all attributes.
85
+ # @return [Fixnum] Hash code
86
+ def hash
87
+ [code, grant_type].hash
88
+ end
89
+
90
+ # Builds the object from hash
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @return [Object] Returns the model itself
93
+ def build_from_hash(attributes)
94
+ return nil unless attributes.is_a?(Hash)
95
+ self.class.swagger_types.each_pair do |key, type|
96
+ if type =~ /\AArray<(.*)>/i
97
+ # check to ensure the input is an array given that the attribute
98
+ # is documented as an array but the input is not
99
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
100
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
104
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
105
+ end
106
+
107
+ self
108
+ end
109
+
110
+ # Deserializes the data based on type
111
+ # @param string type Data type
112
+ # @param string value Value to be deserialized
113
+ # @return [Object] Deserialized data
114
+ def _deserialize(type, value)
115
+ case type.to_sym
116
+ when :DateTime
117
+ DateTime.parse(value)
118
+ when :Date
119
+ Date.parse(value)
120
+ when :String
121
+ value.to_s
122
+ when :Integer
123
+ value.to_i
124
+ when :Float
125
+ value.to_f
126
+ when :BOOLEAN
127
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
128
+ true
129
+ else
130
+ false
131
+ end
132
+ when :Object
133
+ # generic object (usually a Hash), return directly
134
+ value
135
+ when /\AArray<(?<inner_type>.+)>\z/
136
+ inner_type = Regexp.last_match[:inner_type]
137
+ value.map { |v| _deserialize(inner_type, v) }
138
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
139
+ k_type = Regexp.last_match[:k_type]
140
+ v_type = Regexp.last_match[:v_type]
141
+ {}.tap do |hash|
142
+ value.each do |k, v|
143
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
144
+ end
145
+ end
146
+ else # model
147
+ temp_model = UltracartClient.const_get(type).new
148
+ temp_model.build_from_hash(value)
149
+ end
150
+ end
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # to_body is an alias to to_hash (backward compatibility)
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_body
161
+ to_hash
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ next if value.nil?
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ # Outputs non-array value in the form of hash
177
+ # For object, use to_hash. Otherwise, just return the value
178
+ # @param [Object] value Any valid value
179
+ # @return [Hash] Returns the value in the form of hash
180
+ def _to_hash(value)
181
+ if value.is_a?(Array)
182
+ value.compact.map { |v| _to_hash(v) }
183
+ elsif value.is_a?(Hash)
184
+ {}.tap do |hash|
185
+ value.each { |k, v| hash[k] = _to_hash(v) }
186
+ end
187
+ elsif value.respond_to? :to_hash
188
+ value.to_hash
189
+ else
190
+ value
191
+ end
192
+ end
193
+
194
+ end
195
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.2.12'
14
+ VERSION = '3.3.0'
15
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.12
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-09 00:00:00.000000000 Z
11
+ date: 2021-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -425,6 +425,8 @@ files:
425
425
  - docs/EmailCommseqStat.md
426
426
  - docs/EmailCommseqStatResponse.md
427
427
  - docs/EmailCommseqStep.md
428
+ - docs/EmailCommseqStepLog.md
429
+ - docs/EmailCommseqStepLogsResponse.md
428
430
  - docs/EmailCommseqsResponse.md
429
431
  - docs/EmailCustomer.md
430
432
  - docs/EmailCustomerEditorUrlResponse.md
@@ -738,7 +740,10 @@ files:
738
740
  - docs/ScreenshotsResponse.md
739
741
  - docs/SelfConfig.md
740
742
  - docs/SimpleValue.md
743
+ - docs/SingleSignOnAuthorizeRequest.md
744
+ - docs/SingleSignOnTokenRequest.md
741
745
  - docs/SovosConfig.md
746
+ - docs/SsoApi.md
742
747
  - docs/StateProvince.md
743
748
  - docs/StepWaiting.md
744
749
  - docs/StorefrontApi.md
@@ -810,6 +815,7 @@ files:
810
815
  - lib/ultracart_api/api/item_api.rb
811
816
  - lib/ultracart_api/api/oauth_api.rb
812
817
  - lib/ultracart_api/api/order_api.rb
818
+ - lib/ultracart_api/api/sso_api.rb
813
819
  - lib/ultracart_api/api/storefront_api.rb
814
820
  - lib/ultracart_api/api/tax_api.rb
815
821
  - lib/ultracart_api/api/user_api.rb
@@ -1035,6 +1041,8 @@ files:
1035
1041
  - lib/ultracart_api/models/email_commseq_stat.rb
1036
1042
  - lib/ultracart_api/models/email_commseq_stat_response.rb
1037
1043
  - lib/ultracart_api/models/email_commseq_step.rb
1044
+ - lib/ultracart_api/models/email_commseq_step_log.rb
1045
+ - lib/ultracart_api/models/email_commseq_step_logs_response.rb
1038
1046
  - lib/ultracart_api/models/email_commseqs_response.rb
1039
1047
  - lib/ultracart_api/models/email_customer.rb
1040
1048
  - lib/ultracart_api/models/email_customer_editor_url_response.rb
@@ -1343,6 +1351,8 @@ files:
1343
1351
  - lib/ultracart_api/models/screenshots_response.rb
1344
1352
  - lib/ultracart_api/models/self_config.rb
1345
1353
  - lib/ultracart_api/models/simple_value.rb
1354
+ - lib/ultracart_api/models/single_sign_on_authorize_request.rb
1355
+ - lib/ultracart_api/models/single_sign_on_token_request.rb
1346
1356
  - lib/ultracart_api/models/sovos_config.rb
1347
1357
  - lib/ultracart_api/models/state_province.rb
1348
1358
  - lib/ultracart_api/models/step_waiting.rb