Class: Zippendo::ListShippingRules200ResponseDataInner
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Zippendo::ListShippingRules200ResponseDataInner
- Defined in:
- lib/zippendo/models/list_shipping_rules200_response_data_inner.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#additional_parameters ⇒ Object
Carrier-specific extra parameters.
-
#address ⇒ Object
Returns the value of attribute address.
-
#address_id ⇒ Object
Sender address ID.
-
#auto_create_return_shipment ⇒ Object
Automatically create and send a return shipment on dispatch.
-
#auto_print_documents ⇒ Object
Automatically print documents when shipment is sent.
-
#auto_print_labels ⇒ Object
Automatically print labels when shipment is sent.
-
#carrier ⇒ Object
Returns the value of attribute carrier.
-
#carrier_id ⇒ Object
Carrier ID.
-
#conditions ⇒ Object
Rule conditions (weight/price/quantity).
-
#created_at ⇒ Object
Creation timestamp (ISO 8601).
-
#description ⇒ Object
Optional description.
-
#direction ⇒ Object
Whether this rule is for outbound or inbound (return) shipments.
-
#document_printer ⇒ Object
Returns the value of attribute document_printer.
-
#document_printer_id ⇒ Object
ID of the document printer.
-
#email_notification ⇒ Object
Send email notification to recipient.
-
#generate_commercial_invoice ⇒ Object
Generate commercial invoice for international shipments.
-
#generate_packing_list ⇒ Object
Generate packing slip with package and item details.
-
#generate_proforma_invoice ⇒ Object
Generate proforma invoice for shipments.
-
#id ⇒ Object
Unique shipping rule identifier.
-
#label_printer ⇒ Object
Returns the value of attribute label_printer.
-
#label_printer_id ⇒ Object
ID of the label printer.
-
#max_order_value ⇒ Object
Maximum allowed order value in currency units.
-
#max_weight ⇒ Object
Maximum allowed weight in kg.
-
#min_order_value ⇒ Object
Minimum required order value in currency units.
-
#min_weight ⇒ Object
Minimum required weight in kg.
-
#name ⇒ Object
Shipping rule name.
-
#org_id ⇒ Object
Owning organization ID.
-
#phone_notification ⇒ Object
Send SMS notification to recipient.
-
#product_id ⇒ Object
Product ID from carrier.
-
#receiving_countries ⇒ Object
List of supported country codes.
-
#return_shipping_rule ⇒ Object
Returns the value of attribute return_shipping_rule.
-
#return_shipping_rule_id ⇒ Object
ID of the return shipping rule.
-
#services ⇒ Object
List of selected services.
-
#updated_at ⇒ Object
Last update timestamp (ISO 8601).
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ListShippingRules200ResponseDataInner
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ListShippingRules200ResponseDataInner
Initializes the object
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 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 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 352 353 354 355 356 357 358 359 360 361 362 363 364 365 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 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 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 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 246 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Zippendo::ListShippingRules200ResponseDataInner` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Zippendo::ListShippingRules200ResponseDataInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'description') self.description = attributes[:'description'] else self.description = nil end if attributes.key?(:'direction') self.direction = attributes[:'direction'] else self.direction = 'outbound' end if attributes.key?(:'carrier_id') self.carrier_id = attributes[:'carrier_id'] else self.carrier_id = nil end if attributes.key?(:'product_id') self.product_id = attributes[:'product_id'] else self.product_id = nil end if attributes.key?(:'services') if (value = attributes[:'services']).is_a?(Array) self.services = value end else self.services = nil end if attributes.key?(:'additional_parameters') if (value = attributes[:'additional_parameters']).is_a?(Array) self.additional_parameters = value end else self.additional_parameters = nil end if attributes.key?(:'address_id') self.address_id = attributes[:'address_id'] else self.address_id = nil end if attributes.key?(:'receiving_countries') if (value = attributes[:'receiving_countries']).is_a?(Array) self.receiving_countries = value end else self.receiving_countries = nil end if attributes.key?(:'email_notification') self.email_notification = attributes[:'email_notification'] else self.email_notification = false end if attributes.key?(:'phone_notification') self.phone_notification = attributes[:'phone_notification'] else self.phone_notification = false end if attributes.key?(:'min_weight') self.min_weight = attributes[:'min_weight'] else self.min_weight = nil end if attributes.key?(:'max_weight') self.max_weight = attributes[:'max_weight'] else self.max_weight = nil end if attributes.key?(:'min_order_value') self.min_order_value = attributes[:'min_order_value'] else self.min_order_value = nil end if attributes.key?(:'max_order_value') self.max_order_value = attributes[:'max_order_value'] else self.max_order_value = nil end if attributes.key?(:'conditions') if (value = attributes[:'conditions']).is_a?(Array) self.conditions = value end else self.conditions = nil end if attributes.key?(:'generate_proforma_invoice') self.generate_proforma_invoice = attributes[:'generate_proforma_invoice'] else self.generate_proforma_invoice = false end if attributes.key?(:'generate_commercial_invoice') self.generate_commercial_invoice = attributes[:'generate_commercial_invoice'] else self.generate_commercial_invoice = false end if attributes.key?(:'generate_packing_list') self.generate_packing_list = attributes[:'generate_packing_list'] else self.generate_packing_list = false end if attributes.key?(:'auto_print_labels') self.auto_print_labels = attributes[:'auto_print_labels'] else self.auto_print_labels = false end if attributes.key?(:'auto_print_documents') self.auto_print_documents = attributes[:'auto_print_documents'] else self.auto_print_documents = false end if attributes.key?(:'label_printer_id') self.label_printer_id = attributes[:'label_printer_id'] else self.label_printer_id = nil end if attributes.key?(:'document_printer_id') self.document_printer_id = attributes[:'document_printer_id'] else self.document_printer_id = nil end if attributes.key?(:'return_shipping_rule_id') self.return_shipping_rule_id = attributes[:'return_shipping_rule_id'] else self.return_shipping_rule_id = nil end if attributes.key?(:'auto_create_return_shipment') self.auto_create_return_shipment = attributes[:'auto_create_return_shipment'] else self.auto_create_return_shipment = false end if attributes.key?(:'org_id') self.org_id = attributes[:'org_id'] else self.org_id = nil end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] else self.created_at = nil end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] else self.updated_at = nil end if attributes.key?(:'carrier') self.carrier = attributes[:'carrier'] else self.carrier = nil end if attributes.key?(:'address') self.address = attributes[:'address'] else self.address = nil end if attributes.key?(:'label_printer') self.label_printer = attributes[:'label_printer'] end if attributes.key?(:'document_printer') self.document_printer = attributes[:'document_printer'] end if attributes.key?(:'return_shipping_rule') self.return_shipping_rule = attributes[:'return_shipping_rule'] end end |
Instance Attribute Details
#additional_parameters ⇒ Object
Carrier-specific extra parameters. DEPRECATED array form [{ name, val }] where name is the carrier parameter key (from the product's additionalParameters[].key, e.g. returnFunctionality) and val is the stringified value. This will change to a { key: value } object in a future version — writes already accept either shape.
40 41 42 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 40 def additional_parameters @additional_parameters end |
#address ⇒ Object
Returns the value of attribute address.
107 108 109 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 107 def address @address end |
#address_id ⇒ Object
Sender address ID
43 44 45 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 43 def address_id @address_id end |
#auto_create_return_shipment ⇒ Object
Automatically create and send a return shipment on dispatch
94 95 96 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 94 def auto_create_return_shipment @auto_create_return_shipment end |
#auto_print_documents ⇒ Object
Automatically print documents when shipment is sent
82 83 84 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 82 def auto_print_documents @auto_print_documents end |
#auto_print_labels ⇒ Object
Automatically print labels when shipment is sent
79 80 81 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 79 def auto_print_labels @auto_print_labels end |
#carrier ⇒ Object
Returns the value of attribute carrier.
105 106 107 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 105 def carrier @carrier end |
#carrier_id ⇒ Object
Carrier ID
31 32 33 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 31 def carrier_id @carrier_id end |
#conditions ⇒ Object
Rule conditions (weight/price/quantity)
67 68 69 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 67 def conditions @conditions end |
#created_at ⇒ Object
Creation timestamp (ISO 8601)
100 101 102 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 100 def created_at @created_at end |
#description ⇒ Object
Optional description
25 26 27 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 25 def description @description end |
#direction ⇒ Object
Whether this rule is for outbound or inbound (return) shipments
28 29 30 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 28 def direction @direction end |
#document_printer ⇒ Object
Returns the value of attribute document_printer.
111 112 113 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 111 def document_printer @document_printer end |
#document_printer_id ⇒ Object
ID of the document printer
88 89 90 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 88 def document_printer_id @document_printer_id end |
#email_notification ⇒ Object
Send email notification to recipient
49 50 51 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 49 def email_notification @email_notification end |
#generate_commercial_invoice ⇒ Object
Generate commercial invoice for international shipments
73 74 75 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 73 def generate_commercial_invoice @generate_commercial_invoice end |
#generate_packing_list ⇒ Object
Generate packing slip with package and item details
76 77 78 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 76 def generate_packing_list @generate_packing_list end |
#generate_proforma_invoice ⇒ Object
Generate proforma invoice for shipments
70 71 72 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 70 def generate_proforma_invoice @generate_proforma_invoice end |
#id ⇒ Object
Unique shipping rule identifier
19 20 21 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 19 def id @id end |
#label_printer ⇒ Object
Returns the value of attribute label_printer.
109 110 111 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 109 def label_printer @label_printer end |
#label_printer_id ⇒ Object
ID of the label printer
85 86 87 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 85 def label_printer_id @label_printer_id end |
#max_order_value ⇒ Object
Maximum allowed order value in currency units. Orders exceeding this are excluded from the rule.
64 65 66 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 64 def max_order_value @max_order_value end |
#max_weight ⇒ Object
Maximum allowed weight in kg. Orders exceeding this are excluded from the rule.
58 59 60 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 58 def max_weight @max_weight end |
#min_order_value ⇒ Object
Minimum required order value in currency units. Orders below this are excluded from the rule.
61 62 63 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 61 def min_order_value @min_order_value end |
#min_weight ⇒ Object
Minimum required weight in kg. Orders below this are excluded from the rule.
55 56 57 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 55 def min_weight @min_weight end |
#name ⇒ Object
Shipping rule name
22 23 24 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 22 def name @name end |
#org_id ⇒ Object
Owning organization ID
97 98 99 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 97 def org_id @org_id end |
#phone_notification ⇒ Object
Send SMS notification to recipient
52 53 54 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 52 def phone_notification @phone_notification end |
#product_id ⇒ Object
Product ID from carrier
34 35 36 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 34 def product_id @product_id end |
#receiving_countries ⇒ Object
List of supported country codes
46 47 48 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 46 def receiving_countries @receiving_countries end |
#return_shipping_rule ⇒ Object
Returns the value of attribute return_shipping_rule.
113 114 115 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 113 def return_shipping_rule @return_shipping_rule end |
#return_shipping_rule_id ⇒ Object
ID of the return shipping rule
91 92 93 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 91 def return_shipping_rule_id @return_shipping_rule_id end |
#services ⇒ Object
List of selected services
37 38 39 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 37 def services @services end |
#updated_at ⇒ Object
Last update timestamp (ISO 8601)
103 104 105 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 103 def updated_at @updated_at end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
178 179 180 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 178 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
183 184 185 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 183 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 138 def self.attribute_map { :'id' => :'id', :'name' => :'name', :'description' => :'description', :'direction' => :'direction', :'carrier_id' => :'carrierId', :'product_id' => :'productId', :'services' => :'services', :'additional_parameters' => :'additionalParameters', :'address_id' => :'addressId', :'receiving_countries' => :'receivingCountries', :'email_notification' => :'emailNotification', :'phone_notification' => :'phoneNotification', :'min_weight' => :'minWeight', :'max_weight' => :'maxWeight', :'min_order_value' => :'minOrderValue', :'max_order_value' => :'maxOrderValue', :'conditions' => :'conditions', :'generate_proforma_invoice' => :'generateProformaInvoice', :'generate_commercial_invoice' => :'generateCommercialInvoice', :'generate_packing_list' => :'generatePackingList', :'auto_print_labels' => :'autoPrintLabels', :'auto_print_documents' => :'autoPrintDocuments', :'label_printer_id' => :'labelPrinterId', :'document_printer_id' => :'documentPrinterId', :'return_shipping_rule_id' => :'returnShippingRuleId', :'auto_create_return_shipment' => :'autoCreateReturnShipment', :'org_id' => :'orgId', :'created_at' => :'createdAt', :'updated_at' => :'updatedAt', :'carrier' => :'carrier', :'address' => :'address', :'label_printer' => :'labelPrinter', :'document_printer' => :'documentPrinter', :'return_shipping_rule' => :'returnShippingRule' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 954 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 228 def self.openapi_nullable Set.new([ :'description', :'min_weight', :'max_weight', :'min_order_value', :'max_order_value', :'label_printer_id', :'document_printer_id', :'return_shipping_rule_id', :'label_printer', :'document_printer', :'return_shipping_rule' ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 221 222 223 224 225 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 188 def self.openapi_types { :'id' => :'String', :'name' => :'String', :'description' => :'String', :'direction' => :'String', :'carrier_id' => :'String', :'product_id' => :'String', :'services' => :'Array<String>', :'additional_parameters' => :'Array<ListShippingRules200ResponseDataInnerAdditionalParametersInner>', :'address_id' => :'String', :'receiving_countries' => :'Array<String>', :'email_notification' => :'Boolean', :'phone_notification' => :'Boolean', :'min_weight' => :'Float', :'max_weight' => :'Float', :'min_order_value' => :'Float', :'max_order_value' => :'Float', :'conditions' => :'Array<ListShippingRules200ResponseDataInnerConditionsInner>', :'generate_proforma_invoice' => :'Boolean', :'generate_commercial_invoice' => :'Boolean', :'generate_packing_list' => :'Boolean', :'auto_print_labels' => :'Boolean', :'auto_print_documents' => :'Boolean', :'label_printer_id' => :'String', :'document_printer_id' => :'String', :'return_shipping_rule_id' => :'String', :'auto_create_return_shipment' => :'Boolean', :'org_id' => :'String', :'created_at' => :'String', :'updated_at' => :'String', :'carrier' => :'ListShippingRules200ResponseDataInnerCarrier', :'address' => :'ListAddresses200ResponseDataInner', :'label_printer' => :'ListShippingRules200ResponseDataInnerLabelPrinter', :'document_printer' => :'ListShippingRules200ResponseDataInnerLabelPrinter', :'return_shipping_rule' => :'ListShippingRules200ResponseDataInnerReturnShippingRule' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 900 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && name == o.name && description == o.description && direction == o.direction && carrier_id == o.carrier_id && product_id == o.product_id && services == o.services && additional_parameters == o.additional_parameters && address_id == o.address_id && receiving_countries == o.receiving_countries && email_notification == o.email_notification && phone_notification == o.phone_notification && min_weight == o.min_weight && max_weight == o.max_weight && min_order_value == o.min_order_value && max_order_value == o.max_order_value && conditions == o.conditions && generate_proforma_invoice == o.generate_proforma_invoice && generate_commercial_invoice == o.generate_commercial_invoice && generate_packing_list == o.generate_packing_list && auto_print_labels == o.auto_print_labels && auto_print_documents == o.auto_print_documents && label_printer_id == o.label_printer_id && document_printer_id == o.document_printer_id && return_shipping_rule_id == o.return_shipping_rule_id && auto_create_return_shipment == o.auto_create_return_shipment && org_id == o.org_id && created_at == o.created_at && updated_at == o.updated_at && carrier == o.carrier && address == o.address && label_printer == o.label_printer && document_printer == o.document_printer && return_shipping_rule == o.return_shipping_rule end |
#eql?(o) ⇒ Boolean
941 942 943 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 941 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
947 948 949 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 947 def hash [id, name, description, direction, carrier_id, product_id, services, additional_parameters, address_id, receiving_countries, email_notification, phone_notification, min_weight, max_weight, min_order_value, max_order_value, conditions, generate_proforma_invoice, generate_commercial_invoice, generate_packing_list, auto_print_labels, auto_print_documents, label_printer_id, document_printer_id, return_shipping_rule_id, auto_create_return_shipment, org_id, created_at, updated_at, carrier, address, label_printer, document_printer, return_shipping_rule].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 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 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 469 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @name.to_s.length < 1 invalid_properties.push('invalid value for "name", the character length must be greater than or equal to 1.') end if @direction.nil? invalid_properties.push('invalid value for "direction", direction cannot be nil.') end if @carrier_id.nil? invalid_properties.push('invalid value for "carrier_id", carrier_id cannot be nil.') end if @product_id.nil? invalid_properties.push('invalid value for "product_id", product_id cannot be nil.') end if @services.nil? invalid_properties.push('invalid value for "services", services cannot be nil.') end if @additional_parameters.nil? invalid_properties.push('invalid value for "additional_parameters", additional_parameters cannot be nil.') end if @address_id.nil? invalid_properties.push('invalid value for "address_id", address_id cannot be nil.') end if @receiving_countries.nil? invalid_properties.push('invalid value for "receiving_countries", receiving_countries cannot be nil.') end if @email_notification.nil? invalid_properties.push('invalid value for "email_notification", email_notification cannot be nil.') end if @phone_notification.nil? invalid_properties.push('invalid value for "phone_notification", phone_notification cannot be nil.') end if @min_weight < 0 invalid_properties.push('invalid value for "min_weight", must be greater than or equal to 0.') end if @max_weight < 0 invalid_properties.push('invalid value for "max_weight", must be greater than or equal to 0.') end if @min_order_value < 0 invalid_properties.push('invalid value for "min_order_value", must be greater than or equal to 0.') end if @max_order_value < 0 invalid_properties.push('invalid value for "max_order_value", must be greater than or equal to 0.') end if @conditions.nil? invalid_properties.push('invalid value for "conditions", conditions cannot be nil.') end if @generate_proforma_invoice.nil? invalid_properties.push('invalid value for "generate_proforma_invoice", generate_proforma_invoice cannot be nil.') end if @generate_commercial_invoice.nil? invalid_properties.push('invalid value for "generate_commercial_invoice", generate_commercial_invoice cannot be nil.') end if @generate_packing_list.nil? invalid_properties.push('invalid value for "generate_packing_list", generate_packing_list cannot be nil.') end if @auto_print_labels.nil? invalid_properties.push('invalid value for "auto_print_labels", auto_print_labels cannot be nil.') end if @auto_print_documents.nil? invalid_properties.push('invalid value for "auto_print_documents", auto_print_documents cannot be nil.') end if @auto_create_return_shipment.nil? invalid_properties.push('invalid value for "auto_create_return_shipment", auto_create_return_shipment cannot be nil.') end if @org_id.nil? invalid_properties.push('invalid value for "org_id", org_id cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end if @carrier.nil? invalid_properties.push('invalid value for "carrier", carrier cannot be nil.') end if @address.nil? invalid_properties.push('invalid value for "address", address cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
976 977 978 979 980 981 982 983 984 985 986 987 988 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 976 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
# File 'lib/zippendo/models/list_shipping_rules200_response_data_inner.rb', line 589 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @name.nil? return false if @name.to_s.length < 1 return false if @direction.nil? direction_validator = EnumAttributeValidator.new('String', ["outbound", "inbound"]) return false unless direction_validator.valid?(@direction) return false if @carrier_id.nil? return false if @product_id.nil? return false if @services.nil? return false if @additional_parameters.nil? return false if @address_id.nil? return false if @receiving_countries.nil? return false if @email_notification.nil? return false if @phone_notification.nil? return false if @min_weight < 0 return false if @max_weight < 0 return false if @min_order_value < 0 return false if @max_order_value < 0 return false if @conditions.nil? return false if @generate_proforma_invoice.nil? return false if @generate_commercial_invoice.nil? return false if @generate_packing_list.nil? return false if @auto_print_labels.nil? return false if @auto_print_documents.nil? return false if @auto_create_return_shipment.nil? return false if @org_id.nil? return false if @created_at.nil? return false if @updated_at.nil? return false if @carrier.nil? return false if @address.nil? true end |