Class: Cetustek::CreateAllowance

Inherits:
Object
  • Object
show all
Defined in:
lib/cetustek/create_allowance.rb

Overview

2.9 CreateAllowance 開立折讓單. Returns the result code (A0 = success). check_allowance: 0 = confirmed allowance (default), 1 = unconfirmed.

Instance Method Summary collapse

Constructor Details

#initialize(allowance_data, check_allowance: 0) ⇒ CreateAllowance

Returns a new instance of CreateAllowance.



10
11
12
13
# File 'lib/cetustek/create_allowance.rb', line 10

def initialize(allowance_data, check_allowance: 0)
  @data = allowance_data
  @check_allowance = check_allowance
end

Instance Method Details

#executeObject



15
16
17
18
# File 'lib/cetustek/create_allowance.rb', line 15

def execute
  perform
  @response.body[:create_allowance_response][:return]
end