class Wallee::ShopifyIntegration

A Shopify Integration allows to connect a Shopify shop.

Attributes

additional_line_item_data[RW]
allow_invoice_download[RW]
allowed_payment_method_configurations[RW]
currency[RW]
id[RW]

The ID is the primary key of the entity. The ID identifies the entity uniquely.

integrated_payment_form_enabled[RW]

Enabling the integrated payment form will embed the payment form in the Shopify shop. The app needs to be installed for this to be possible.

language[RW]

The checkout language forces a specific language in the checkout. Without a checkout language the browser setting of the buyer is used to determine the language.

login_name[RW]

The login name is used to link a specific Shopify payment gateway to this integration.This login name is to be filled into the appropriate field in the shops payment gateway configuration.

name[RW]

The integration name is used internally to identify a specific integration.For example the name is used withinsearch fields and hence it should be distinct and descriptive.

payment_app_version[RW]
payment_installed[RW]
payment_proxy_path[RW]

Define the path of the proxy URL. This only needs to be changed if the apps proxy URL is overwritten in the Shopify store.

planned_purge_date[RW]

The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.

replace_payment_method_image[RW]
shop_name[RW]

The store address is used to link a specific Shopify shop to this integration. This is the name used in the Shopifys admin URL: [storeAddress].myshopify.com

show_payment_information[RW]
show_subscription_information[RW]
space_id[RW]
space_view_id[RW]
state[RW]
subscription_app_version[RW]
subscription_installed[RW]
subscription_proxy_path[RW]

Define the path of the proxy URL. This only needs to be changed if the apps proxy URL is overwritten in the Shopify store.

version[RW]

The version number indicates the version of the entity. The version is incremented whenever the entity is changed.

Public Class Methods

attribute_map() click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 96
def self.attribute_map
  {
    :'additional_line_item_data' => :'additionalLineItemData',
    :'allow_invoice_download' => :'allowInvoiceDownload',
    :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
    :'currency' => :'currency',
    :'id' => :'id',
    :'integrated_payment_form_enabled' => :'integratedPaymentFormEnabled',
    :'language' => :'language',
    :'login_name' => :'loginName',
    :'name' => :'name',
    :'payment_app_version' => :'paymentAppVersion',
    :'payment_installed' => :'paymentInstalled',
    :'payment_proxy_path' => :'paymentProxyPath',
    :'planned_purge_date' => :'plannedPurgeDate',
    :'replace_payment_method_image' => :'replacePaymentMethodImage',
    :'shop_name' => :'shopName',
    :'show_payment_information' => :'showPaymentInformation',
    :'show_subscription_information' => :'showSubscriptionInformation',
    :'space_id' => :'spaceId',
    :'space_view_id' => :'spaceViewId',
    :'state' => :'state',
    :'subscription_app_version' => :'subscriptionAppVersion',
    :'subscription_installed' => :'subscriptionInstalled',
    :'subscription_proxy_path' => :'subscriptionProxyPath',
    :'version' => :'version'
  }
end
new(attributes = {}) click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 157
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?(:'additionalLineItemData')
    if (value = attributes[:'additionalLineItemData']).is_a?(Array)
      self.additional_line_item_data = value
    end
  end

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Attribute type mapping.

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 126
def self.swagger_types
  {
    :'additional_line_item_data' => :'Array<ShopifyAdditionalLineItemData>',
    :'allow_invoice_download' => :'BOOLEAN',
    :'allowed_payment_method_configurations' => :'Array<PaymentMethodConfiguration>',
    :'currency' => :'String',
    :'id' => :'Integer',
    :'integrated_payment_form_enabled' => :'BOOLEAN',
    :'language' => :'String',
    :'login_name' => :'String',
    :'name' => :'String',
    :'payment_app_version' => :'ShopifyIntegrationPaymentAppVersion',
    :'payment_installed' => :'BOOLEAN',
    :'payment_proxy_path' => :'String',
    :'planned_purge_date' => :'DateTime',
    :'replace_payment_method_image' => :'BOOLEAN',
    :'shop_name' => :'String',
    :'show_payment_information' => :'BOOLEAN',
    :'show_subscription_information' => :'BOOLEAN',
    :'space_id' => :'Integer',
    :'space_view_id' => :'Integer',
    :'state' => :'CreationEntityState',
    :'subscription_app_version' => :'ShopifyIntegrationSubscriptionAppVersion',
    :'subscription_installed' => :'BOOLEAN',
    :'subscription_proxy_path' => :'String',
    :'version' => :'Integer'
  }
end

Public Instance Methods

==(o) click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 324
def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      additional_line_item_data == o.additional_line_item_data &&
      allow_invoice_download == o.allow_invoice_download &&
      allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
      currency == o.currency &&
      id == o.id &&
      integrated_payment_form_enabled == o.integrated_payment_form_enabled &&
      language == o.language &&
      login_name == o.login_name &&
      name == o.name &&
      payment_app_version == o.payment_app_version &&
      payment_installed == o.payment_installed &&
      payment_proxy_path == o.payment_proxy_path &&
      planned_purge_date == o.planned_purge_date &&
      replace_payment_method_image == o.replace_payment_method_image &&
      shop_name == o.shop_name &&
      show_payment_information == o.show_payment_information &&
      show_subscription_information == o.show_subscription_information &&
      space_id == o.space_id &&
      space_view_id == o.space_view_id &&
      state == o.state &&
      subscription_app_version == o.subscription_app_version &&
      subscription_installed == o.subscription_installed &&
      subscription_proxy_path == o.subscription_proxy_path &&
      version == o.version
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/wallee-ruby-sdk/models/shopify_integration.rb, line 389
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 = Wallee.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/wallee-ruby-sdk/models/shopify_integration.rb, line 455
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
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/wallee-ruby-sdk/models/shopify_integration.rb, line 368
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/wallee-ruby-sdk/models/shopify_integration.rb, line 355
def eql?(o)
  self == o
end
hash() click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 361
def hash
  [additional_line_item_data, allow_invoice_download, allowed_payment_method_configurations, currency, id, integrated_payment_form_enabled, language, login_name, name, payment_app_version, payment_installed, payment_proxy_path, planned_purge_date, replace_payment_method_image, shop_name, show_payment_information, show_subscription_information, space_id, space_view_id, state, subscription_app_version, subscription_installed, subscription_proxy_path, version].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/wallee-ruby-sdk/models/shopify_integration.rb, line 266
def list_invalid_properties
  invalid_properties = Array.new
  if !@login_name.nil? && @login_name.to_s.length > 100
    invalid_properties.push('invalid value for "login_name", the character length must be smaller than or equal to 100.')
  end

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

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

  invalid_properties
end
login_name=(login_name) click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 294
def login_name=(login_name)
  if !login_name.nil? && login_name.to_s.length > 100
    fail ArgumentError, 'invalid value for "login_name", the character length must be smaller than or equal to 100.'
  end

  @login_name = login_name
end
name=(name) click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 304
def name=(name)
  if !name.nil? && name.to_s.length > 100
    fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
  end

  @name = name
end
shop_name=(shop_name) click to toggle source

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

# File lib/wallee-ruby-sdk/models/shopify_integration.rb, line 314
def shop_name=(shop_name)
  if !shop_name.nil? && shop_name.to_s.length > 100
    fail ArgumentError, 'invalid value for "shop_name", the character length must be smaller than or equal to 100.'
  end

  @shop_name = shop_name
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/wallee-ruby-sdk/models/shopify_integration.rb, line 435
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/wallee-ruby-sdk/models/shopify_integration.rb, line 441
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/wallee-ruby-sdk/models/shopify_integration.rb, line 429
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/wallee-ruby-sdk/models/shopify_integration.rb, line 285
def valid?
  return false if !@login_name.nil? && @login_name.to_s.length > 100
  return false if !@name.nil? && @name.to_s.length > 100
  return false if !@shop_name.nil? && @shop_name.to_s.length > 100
  true
end