class UltracartClient::CustomerQuery

Attributes

all_tags[RW]

All tags the customer must have

any_tags[RW]

Any of these tags the customer must have

billing_city[RW]

Billing city

billing_company[RW]

Billing company

billing_country_code[RW]

Billing country code

billing_day_phone[RW]

Billing day phone

billing_evening_phone[RW]

Billing evening phone

billing_first_name[RW]

Billing first name

billing_last_name[RW]

Billing last name

billing_postal_code[RW]

Billing postal code

billing_state[RW]

Billing state

email[RW]

Email address of this customer profile

last_modified_dts_end[RW]

Last modified date end

last_modified_dts_start[RW]

Last modified date start

pricing_tier_name[RW]

Pricing tier name

pricing_tier_oid[RW]

Pricing tier oid

qb_class[RW]

QuickBooks class to import this customer as

quickbooks_code[RW]

QuickBooks name to import this customer as

shipping_city[RW]

Billing city

shipping_company[RW]

Billing company

shipping_country_code[RW]

Billing country code

shipping_day_phone[RW]

Billing day phone

shipping_evening_phone[RW]

Billing evening phone

shipping_first_name[RW]

Billing first name

shipping_last_name[RW]

Billing last name

shipping_postal_code[RW]

Billing postal code

shipping_state[RW]

Billing state

signup_dts_end[RW]

Signup date end

signup_dts_start[RW]

Signup date start

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/ultracart_api/models/customer_query.rb, line 105
def self.attribute_map
  {
    :'all_tags' => :'all_tags',
    :'any_tags' => :'any_tags',
    :'billing_city' => :'billing_city',
    :'billing_company' => :'billing_company',
    :'billing_country_code' => :'billing_country_code',
    :'billing_day_phone' => :'billing_day_phone',
    :'billing_evening_phone' => :'billing_evening_phone',
    :'billing_first_name' => :'billing_first_name',
    :'billing_last_name' => :'billing_last_name',
    :'billing_postal_code' => :'billing_postal_code',
    :'billing_state' => :'billing_state',
    :'email' => :'email',
    :'last_modified_dts_end' => :'last_modified_dts_end',
    :'last_modified_dts_start' => :'last_modified_dts_start',
    :'pricing_tier_name' => :'pricing_tier_name',
    :'pricing_tier_oid' => :'pricing_tier_oid',
    :'qb_class' => :'qb_class',
    :'quickbooks_code' => :'quickbooks_code',
    :'shipping_city' => :'shipping_city',
    :'shipping_company' => :'shipping_company',
    :'shipping_country_code' => :'shipping_country_code',
    :'shipping_day_phone' => :'shipping_day_phone',
    :'shipping_evening_phone' => :'shipping_evening_phone',
    :'shipping_first_name' => :'shipping_first_name',
    :'shipping_last_name' => :'shipping_last_name',
    :'shipping_postal_code' => :'shipping_postal_code',
    :'shipping_state' => :'shipping_state',
    :'signup_dts_end' => :'signup_dts_end',
    :'signup_dts_start' => :'signup_dts_start'
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/ultracart_api/models/customer_query.rb, line 176
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'all_tags')
    if (value = attributes[:'all_tags']).is_a?(Array)
      self.all_tags = value
    end
  end

  if attributes.has_key?(:'any_tags')
    if (value = attributes[:'any_tags']).is_a?(Array)
      self.any_tags = value
    end
  end

  if attributes.has_key?(:'billing_city')
    self.billing_city = attributes[:'billing_city']
  end

  if attributes.has_key?(:'billing_company')
    self.billing_company = attributes[:'billing_company']
  end

  if attributes.has_key?(:'billing_country_code')
    self.billing_country_code = attributes[:'billing_country_code']
  end

  if attributes.has_key?(:'billing_day_phone')
    self.billing_day_phone = attributes[:'billing_day_phone']
  end

  if attributes.has_key?(:'billing_evening_phone')
    self.billing_evening_phone = attributes[:'billing_evening_phone']
  end

  if attributes.has_key?(:'billing_first_name')
    self.billing_first_name = attributes[:'billing_first_name']
  end

  if attributes.has_key?(:'billing_last_name')
    self.billing_last_name = attributes[:'billing_last_name']
  end

  if attributes.has_key?(:'billing_postal_code')
    self.billing_postal_code = attributes[:'billing_postal_code']
  end

  if attributes.has_key?(:'billing_state')
    self.billing_state = attributes[:'billing_state']
  end

  if attributes.has_key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.has_key?(:'last_modified_dts_end')
    self.last_modified_dts_end = attributes[:'last_modified_dts_end']
  end

  if attributes.has_key?(:'last_modified_dts_start')
    self.last_modified_dts_start = attributes[:'last_modified_dts_start']
  end

  if attributes.has_key?(:'pricing_tier_name')
    self.pricing_tier_name = attributes[:'pricing_tier_name']
  end

  if attributes.has_key?(:'pricing_tier_oid')
    self.pricing_tier_oid = attributes[:'pricing_tier_oid']
  end

  if attributes.has_key?(:'qb_class')
    self.qb_class = attributes[:'qb_class']
  end

  if attributes.has_key?(:'quickbooks_code')
    self.quickbooks_code = attributes[:'quickbooks_code']
  end

  if attributes.has_key?(:'shipping_city')
    self.shipping_city = attributes[:'shipping_city']
  end

  if attributes.has_key?(:'shipping_company')
    self.shipping_company = attributes[:'shipping_company']
  end

  if attributes.has_key?(:'shipping_country_code')
    self.shipping_country_code = attributes[:'shipping_country_code']
  end

  if attributes.has_key?(:'shipping_day_phone')
    self.shipping_day_phone = attributes[:'shipping_day_phone']
  end

  if attributes.has_key?(:'shipping_evening_phone')
    self.shipping_evening_phone = attributes[:'shipping_evening_phone']
  end

  if attributes.has_key?(:'shipping_first_name')
    self.shipping_first_name = attributes[:'shipping_first_name']
  end

  if attributes.has_key?(:'shipping_last_name')
    self.shipping_last_name = attributes[:'shipping_last_name']
  end

  if attributes.has_key?(:'shipping_postal_code')
    self.shipping_postal_code = attributes[:'shipping_postal_code']
  end

  if attributes.has_key?(:'shipping_state')
    self.shipping_state = attributes[:'shipping_state']
  end

  if attributes.has_key?(:'signup_dts_end')
    self.signup_dts_end = attributes[:'signup_dts_end']
  end

  if attributes.has_key?(:'signup_dts_start')
    self.signup_dts_start = attributes[:'signup_dts_start']
  end
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/ultracart_api/models/customer_query.rb, line 140
def self.swagger_types
  {
    :'all_tags' => :'Array<String>',
    :'any_tags' => :'Array<String>',
    :'billing_city' => :'String',
    :'billing_company' => :'String',
    :'billing_country_code' => :'String',
    :'billing_day_phone' => :'String',
    :'billing_evening_phone' => :'String',
    :'billing_first_name' => :'String',
    :'billing_last_name' => :'String',
    :'billing_postal_code' => :'String',
    :'billing_state' => :'String',
    :'email' => :'String',
    :'last_modified_dts_end' => :'String',
    :'last_modified_dts_start' => :'String',
    :'pricing_tier_name' => :'String',
    :'pricing_tier_oid' => :'Integer',
    :'qb_class' => :'String',
    :'quickbooks_code' => :'String',
    :'shipping_city' => :'String',
    :'shipping_company' => :'String',
    :'shipping_country_code' => :'String',
    :'shipping_day_phone' => :'String',
    :'shipping_evening_phone' => :'String',
    :'shipping_first_name' => :'String',
    :'shipping_last_name' => :'String',
    :'shipping_postal_code' => :'String',
    :'shipping_state' => :'String',
    :'signup_dts_end' => :'String',
    :'signup_dts_start' => :'String'
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/ultracart_api/models/customer_query.rb, line 603
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      all_tags == o.all_tags &&
      any_tags == o.any_tags &&
      billing_city == o.billing_city &&
      billing_company == o.billing_company &&
      billing_country_code == o.billing_country_code &&
      billing_day_phone == o.billing_day_phone &&
      billing_evening_phone == o.billing_evening_phone &&
      billing_first_name == o.billing_first_name &&
      billing_last_name == o.billing_last_name &&
      billing_postal_code == o.billing_postal_code &&
      billing_state == o.billing_state &&
      email == o.email &&
      last_modified_dts_end == o.last_modified_dts_end &&
      last_modified_dts_start == o.last_modified_dts_start &&
      pricing_tier_name == o.pricing_tier_name &&
      pricing_tier_oid == o.pricing_tier_oid &&
      qb_class == o.qb_class &&
      quickbooks_code == o.quickbooks_code &&
      shipping_city == o.shipping_city &&
      shipping_company == o.shipping_company &&
      shipping_country_code == o.shipping_country_code &&
      shipping_day_phone == o.shipping_day_phone &&
      shipping_evening_phone == o.shipping_evening_phone &&
      shipping_first_name == o.shipping_first_name &&
      shipping_last_name == o.shipping_last_name &&
      shipping_postal_code == o.shipping_postal_code &&
      shipping_state == o.shipping_state &&
      signup_dts_end == o.signup_dts_end &&
      signup_dts_start == o.signup_dts_start
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/ultracart_api/models/customer_query.rb, line 673
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = UltracartClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/ultracart_api/models/customer_query.rb, line 739
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
billing_city=(billing_city) click to toggle source

Custom attribute writer method with validation @param [Object] billing_city Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 413
def billing_city=(billing_city)
  if !billing_city.nil? && billing_city.to_s.length > 32
    fail ArgumentError, 'invalid value for "billing_city", the character length must be smaller than or equal to 32.'
  end

  @billing_city = billing_city
end
billing_company=(billing_company) click to toggle source

Custom attribute writer method with validation @param [Object] billing_company Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 423
def billing_company=(billing_company)
  if !billing_company.nil? && billing_company.to_s.length > 50
    fail ArgumentError, 'invalid value for "billing_company", the character length must be smaller than or equal to 50.'
  end

  @billing_company = billing_company
end
billing_country_code=(billing_country_code) click to toggle source

Custom attribute writer method with validation @param [Object] billing_country_code Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 433
def billing_country_code=(billing_country_code)
  if !billing_country_code.nil? && billing_country_code.to_s.length > 2
    fail ArgumentError, 'invalid value for "billing_country_code", the character length must be smaller than or equal to 2.'
  end

  @billing_country_code = billing_country_code
end
billing_day_phone=(billing_day_phone) click to toggle source

Custom attribute writer method with validation @param [Object] billing_day_phone Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 443
def billing_day_phone=(billing_day_phone)
  if !billing_day_phone.nil? && billing_day_phone.to_s.length > 25
    fail ArgumentError, 'invalid value for "billing_day_phone", the character length must be smaller than or equal to 25.'
  end

  @billing_day_phone = billing_day_phone
end
billing_evening_phone=(billing_evening_phone) click to toggle source

Custom attribute writer method with validation @param [Object] billing_evening_phone Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 453
def billing_evening_phone=(billing_evening_phone)
  if !billing_evening_phone.nil? && billing_evening_phone.to_s.length > 25
    fail ArgumentError, 'invalid value for "billing_evening_phone", the character length must be smaller than or equal to 25.'
  end

  @billing_evening_phone = billing_evening_phone
end
billing_first_name=(billing_first_name) click to toggle source

Custom attribute writer method with validation @param [Object] billing_first_name Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 463
def billing_first_name=(billing_first_name)
  if !billing_first_name.nil? && billing_first_name.to_s.length > 30
    fail ArgumentError, 'invalid value for "billing_first_name", the character length must be smaller than or equal to 30.'
  end

  @billing_first_name = billing_first_name
end
billing_last_name=(billing_last_name) click to toggle source

Custom attribute writer method with validation @param [Object] billing_last_name Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 473
def billing_last_name=(billing_last_name)
  if !billing_last_name.nil? && billing_last_name.to_s.length > 30
    fail ArgumentError, 'invalid value for "billing_last_name", the character length must be smaller than or equal to 30.'
  end

  @billing_last_name = billing_last_name
end
billing_postal_code=(billing_postal_code) click to toggle source

Custom attribute writer method with validation @param [Object] billing_postal_code Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 483
def billing_postal_code=(billing_postal_code)
  if !billing_postal_code.nil? && billing_postal_code.to_s.length > 20
    fail ArgumentError, 'invalid value for "billing_postal_code", the character length must be smaller than or equal to 20.'
  end

  @billing_postal_code = billing_postal_code
end
billing_state=(billing_state) click to toggle source

Custom attribute writer method with validation @param [Object] billing_state Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 493
def billing_state=(billing_state)
  if !billing_state.nil? && billing_state.to_s.length > 32
    fail ArgumentError, 'invalid value for "billing_state", the character length must be smaller than or equal to 32.'
  end

  @billing_state = billing_state
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/ultracart_api/models/customer_query.rb, line 652
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if 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[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/ultracart_api/models/customer_query.rb, line 639
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/ultracart_api/models/customer_query.rb, line 645
def hash
  [all_tags, any_tags, billing_city, billing_company, billing_country_code, billing_day_phone, billing_evening_phone, billing_first_name, billing_last_name, billing_postal_code, billing_state, email, last_modified_dts_end, last_modified_dts_start, pricing_tier_name, pricing_tier_oid, qb_class, quickbooks_code, shipping_city, shipping_company, shipping_country_code, shipping_day_phone, shipping_evening_phone, shipping_first_name, shipping_last_name, shipping_postal_code, shipping_state, signup_dts_end, signup_dts_start].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/ultracart_api/models/customer_query.rb, line 305
def list_invalid_properties
  invalid_properties = Array.new
  if !@billing_city.nil? && @billing_city.to_s.length > 32
    invalid_properties.push('invalid value for "billing_city", the character length must be smaller than or equal to 32.')
  end

  if !@billing_company.nil? && @billing_company.to_s.length > 50
    invalid_properties.push('invalid value for "billing_company", the character length must be smaller than or equal to 50.')
  end

  if !@billing_country_code.nil? && @billing_country_code.to_s.length > 2
    invalid_properties.push('invalid value for "billing_country_code", the character length must be smaller than or equal to 2.')
  end

  if !@billing_day_phone.nil? && @billing_day_phone.to_s.length > 25
    invalid_properties.push('invalid value for "billing_day_phone", the character length must be smaller than or equal to 25.')
  end

  if !@billing_evening_phone.nil? && @billing_evening_phone.to_s.length > 25
    invalid_properties.push('invalid value for "billing_evening_phone", the character length must be smaller than or equal to 25.')
  end

  if !@billing_first_name.nil? && @billing_first_name.to_s.length > 30
    invalid_properties.push('invalid value for "billing_first_name", the character length must be smaller than or equal to 30.')
  end

  if !@billing_last_name.nil? && @billing_last_name.to_s.length > 30
    invalid_properties.push('invalid value for "billing_last_name", the character length must be smaller than or equal to 30.')
  end

  if !@billing_postal_code.nil? && @billing_postal_code.to_s.length > 20
    invalid_properties.push('invalid value for "billing_postal_code", the character length must be smaller than or equal to 20.')
  end

  if !@billing_state.nil? && @billing_state.to_s.length > 32
    invalid_properties.push('invalid value for "billing_state", the character length must be smaller than or equal to 32.')
  end

  if !@pricing_tier_name.nil? && @pricing_tier_name.to_s.length > 50
    invalid_properties.push('invalid value for "pricing_tier_name", the character length must be smaller than or equal to 50.')
  end

  if !@shipping_city.nil? && @shipping_city.to_s.length > 32
    invalid_properties.push('invalid value for "shipping_city", the character length must be smaller than or equal to 32.')
  end

  if !@shipping_company.nil? && @shipping_company.to_s.length > 50
    invalid_properties.push('invalid value for "shipping_company", the character length must be smaller than or equal to 50.')
  end

  if !@shipping_country_code.nil? && @shipping_country_code.to_s.length > 2
    invalid_properties.push('invalid value for "shipping_country_code", the character length must be smaller than or equal to 2.')
  end

  if !@shipping_day_phone.nil? && @shipping_day_phone.to_s.length > 25
    invalid_properties.push('invalid value for "shipping_day_phone", the character length must be smaller than or equal to 25.')
  end

  if !@shipping_evening_phone.nil? && @shipping_evening_phone.to_s.length > 25
    invalid_properties.push('invalid value for "shipping_evening_phone", the character length must be smaller than or equal to 25.')
  end

  if !@shipping_first_name.nil? && @shipping_first_name.to_s.length > 30
    invalid_properties.push('invalid value for "shipping_first_name", the character length must be smaller than or equal to 30.')
  end

  if !@shipping_last_name.nil? && @shipping_last_name.to_s.length > 30
    invalid_properties.push('invalid value for "shipping_last_name", the character length must be smaller than or equal to 30.')
  end

  if !@shipping_postal_code.nil? && @shipping_postal_code.to_s.length > 20
    invalid_properties.push('invalid value for "shipping_postal_code", the character length must be smaller than or equal to 20.')
  end

  if !@shipping_state.nil? && @shipping_state.to_s.length > 32
    invalid_properties.push('invalid value for "shipping_state", the character length must be smaller than or equal to 32.')
  end

  invalid_properties
end
pricing_tier_name=(pricing_tier_name) click to toggle source

Custom attribute writer method with validation @param [Object] pricing_tier_name Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 503
def pricing_tier_name=(pricing_tier_name)
  if !pricing_tier_name.nil? && pricing_tier_name.to_s.length > 50
    fail ArgumentError, 'invalid value for "pricing_tier_name", the character length must be smaller than or equal to 50.'
  end

  @pricing_tier_name = pricing_tier_name
end
shipping_city=(shipping_city) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_city Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 513
def shipping_city=(shipping_city)
  if !shipping_city.nil? && shipping_city.to_s.length > 32
    fail ArgumentError, 'invalid value for "shipping_city", the character length must be smaller than or equal to 32.'
  end

  @shipping_city = shipping_city
end
shipping_company=(shipping_company) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_company Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 523
def shipping_company=(shipping_company)
  if !shipping_company.nil? && shipping_company.to_s.length > 50
    fail ArgumentError, 'invalid value for "shipping_company", the character length must be smaller than or equal to 50.'
  end

  @shipping_company = shipping_company
end
shipping_country_code=(shipping_country_code) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_country_code Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 533
def shipping_country_code=(shipping_country_code)
  if !shipping_country_code.nil? && shipping_country_code.to_s.length > 2
    fail ArgumentError, 'invalid value for "shipping_country_code", the character length must be smaller than or equal to 2.'
  end

  @shipping_country_code = shipping_country_code
end
shipping_day_phone=(shipping_day_phone) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_day_phone Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 543
def shipping_day_phone=(shipping_day_phone)
  if !shipping_day_phone.nil? && shipping_day_phone.to_s.length > 25
    fail ArgumentError, 'invalid value for "shipping_day_phone", the character length must be smaller than or equal to 25.'
  end

  @shipping_day_phone = shipping_day_phone
end
shipping_evening_phone=(shipping_evening_phone) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_evening_phone Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 553
def shipping_evening_phone=(shipping_evening_phone)
  if !shipping_evening_phone.nil? && shipping_evening_phone.to_s.length > 25
    fail ArgumentError, 'invalid value for "shipping_evening_phone", the character length must be smaller than or equal to 25.'
  end

  @shipping_evening_phone = shipping_evening_phone
end
shipping_first_name=(shipping_first_name) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_first_name Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 563
def shipping_first_name=(shipping_first_name)
  if !shipping_first_name.nil? && shipping_first_name.to_s.length > 30
    fail ArgumentError, 'invalid value for "shipping_first_name", the character length must be smaller than or equal to 30.'
  end

  @shipping_first_name = shipping_first_name
end
shipping_last_name=(shipping_last_name) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_last_name Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 573
def shipping_last_name=(shipping_last_name)
  if !shipping_last_name.nil? && shipping_last_name.to_s.length > 30
    fail ArgumentError, 'invalid value for "shipping_last_name", the character length must be smaller than or equal to 30.'
  end

  @shipping_last_name = shipping_last_name
end
shipping_postal_code=(shipping_postal_code) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_postal_code Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 583
def shipping_postal_code=(shipping_postal_code)
  if !shipping_postal_code.nil? && shipping_postal_code.to_s.length > 20
    fail ArgumentError, 'invalid value for "shipping_postal_code", the character length must be smaller than or equal to 20.'
  end

  @shipping_postal_code = shipping_postal_code
end
shipping_state=(shipping_state) click to toggle source

Custom attribute writer method with validation @param [Object] shipping_state Value to be assigned

# File lib/ultracart_api/models/customer_query.rb, line 593
def shipping_state=(shipping_state)
  if !shipping_state.nil? && shipping_state.to_s.length > 32
    fail ArgumentError, 'invalid value for "shipping_state", the character length must be smaller than or equal to 32.'
  end

  @shipping_state = shipping_state
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/ultracart_api/models/customer_query.rb, line 719
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/ultracart_api/models/customer_query.rb, line 725
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/ultracart_api/models/customer_query.rb, line 713
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/ultracart_api/models/customer_query.rb, line 388
def valid?
  return false if !@billing_city.nil? && @billing_city.to_s.length > 32
  return false if !@billing_company.nil? && @billing_company.to_s.length > 50
  return false if !@billing_country_code.nil? && @billing_country_code.to_s.length > 2
  return false if !@billing_day_phone.nil? && @billing_day_phone.to_s.length > 25
  return false if !@billing_evening_phone.nil? && @billing_evening_phone.to_s.length > 25
  return false if !@billing_first_name.nil? && @billing_first_name.to_s.length > 30
  return false if !@billing_last_name.nil? && @billing_last_name.to_s.length > 30
  return false if !@billing_postal_code.nil? && @billing_postal_code.to_s.length > 20
  return false if !@billing_state.nil? && @billing_state.to_s.length > 32
  return false if !@pricing_tier_name.nil? && @pricing_tier_name.to_s.length > 50
  return false if !@shipping_city.nil? && @shipping_city.to_s.length > 32
  return false if !@shipping_company.nil? && @shipping_company.to_s.length > 50
  return false if !@shipping_country_code.nil? && @shipping_country_code.to_s.length > 2
  return false if !@shipping_day_phone.nil? && @shipping_day_phone.to_s.length > 25
  return false if !@shipping_evening_phone.nil? && @shipping_evening_phone.to_s.length > 25
  return false if !@shipping_first_name.nil? && @shipping_first_name.to_s.length > 30
  return false if !@shipping_last_name.nil? && @shipping_last_name.to_s.length > 30
  return false if !@shipping_postal_code.nil? && @shipping_postal_code.to_s.length > 20
  return false if !@shipping_state.nil? && @shipping_state.to_s.length > 32
  true
end