lib/inpost_uk_api/resources/base.rb
# _retailer is a internal class variable to make sure that all instances
# inherit from Base class share the same variable.
_retailer is a internal class variable to make sure that all instances
inherit from Base class share the same variable.
_retailer is a internal class variable to make sure that all instances inherit from Base class share the same variable .
def with_account(account_hash)
        cached_retailer = retailer
        cached_api_token = connection.bearer_token
        self.retailer = account_hash[:retailer]
        connection.bearer_token = account_hash[:api_token]
        yield
      ensure
        self.retailer = cached_retailer
        connection.bearer_token = cached_api_token
      end
def with_account ( account_hash ) cached_retailer = retailer cached_api_token = connection . bearer_token self . retailer = account_hash [ :retailer ] connection . bearer_token = account_hash [ :api_token ] yield ensure self . retailer = cached_retailer connection . bearer_token = cached_api_token end
_retailer is a internal class variable to make sure that all instances
inherit from Base class share the same variable.
_retailer is a internal class variable to make sure that all instances inherit from Base class share the same variable .
account_hash
<not_specific>