Class: Boletoman::Services::Santander::Billing

Inherits:
Request show all
Defined in:
lib/boletoman/services/santander/billing.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Request

#extra_config_options

Methods inherited from Boletoman::Services::Soap::Request

#basic_config, #call, #client, #config_options, #extra_config_options, #operation, #response

Constructor Details

#initialize(**args) ⇒ Billing



11
12
13
14
15
# File 'lib/boletoman/services/santander/billing.rb', line 11

def initialize(**args)
  @ticket = args[:ticket]
  @nsu = args[:nsu]
  @nsu_date = args[:nsu_date]
end

Instance Attribute Details

#nsu=(value) ⇒ Object

Sets the attribute nsu



9
10
11
# File 'lib/boletoman/services/santander/billing.rb', line 9

def nsu=(value)
  @nsu = value
end

#nsu_date=(value) ⇒ Object

Sets the attribute nsu_date



9
10
11
# File 'lib/boletoman/services/santander/billing.rb', line 9

def nsu_date=(value)
  @nsu_date = value
end

#ticketObject (readonly)

Returns the value of attribute ticket.



8
9
10
# File 'lib/boletoman/services/santander/billing.rb', line 8

def ticket
  @ticket
end

Instance Method Details

#messageObject



25
26
27
28
29
30
31
32
33
34
35
# File 'lib/boletoman/services/santander/billing.rb', line 25

def message
  {
    dto: {
      dtNsu: nsu_date,
      estacao: station,
      nsu: nsu,
      ticket: ticket,
      tpAmbiente: env
    }
  }
end

#requires_certificate?Boolean



21
22
23
# File 'lib/boletoman/services/santander/billing.rb', line 21

def requires_certificate?
  ::Boletoman.configuration.santander.configuration.use_certificate
end

#response_classObject



37
38
39
# File 'lib/boletoman/services/santander/billing.rb', line 37

def response_class
  ::Boletoman::Services::Santander::BillingResponse
end

#wsdlObject



17
18
19
# File 'lib/boletoman/services/santander/billing.rb', line 17

def wsdl
  "https://ymbcash.santander.com.br/ymbsrv/CobrancaEndpointService/CobrancaEndpointService.wsdl".freeze
end