Class: Facturama::Models::ConnectionInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/facturama/models/connection_info.rb

Constant Summary collapse

URL_DEV =

API Endpoints

'https://apisandbox.facturama.mx'
URL_PROD =
'https://api.facturama.mx'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(facturama_user, facturama_password, is_development = true) ⇒ ConnectionInfo

Returns a new instance of ConnectionInfo.



10
11
12
13
14
15
16
# File 'lib/facturama/models/connection_info.rb', line 10

def initialize(facturama_user, facturama_password, is_development = true)
  @facturama_user = facturama_user
  @facturama_password = facturama_password
  @is_development = is_development

  @uri_base = is_development ? URL_DEV : URL_PROD
end

Instance Attribute Details

#facturama_passwordObject (readonly)

Returns the value of attribute facturama_password.



18
19
20
# File 'lib/facturama/models/connection_info.rb', line 18

def facturama_password
  @facturama_password
end

#facturama_userObject (readonly)

Returns the value of attribute facturama_user.



18
19
20
# File 'lib/facturama/models/connection_info.rb', line 18

def facturama_user
  @facturama_user
end

#is_developmentObject (readonly)

Returns the value of attribute is_development.



18
19
20
# File 'lib/facturama/models/connection_info.rb', line 18

def is_development
  @is_development
end

#uri_baseObject (readonly)

Returns the value of attribute uri_base.



18
19
20
# File 'lib/facturama/models/connection_info.rb', line 18

def uri_base
  @uri_base
end