Module: Unit::CashDeposit

Defined in:
lib/unit/models/cash_deposit/cash_deposit.rb,
lib/unit/models/cash_deposit/generate_barcode_request.rb,
lib/unit/models/cash_deposit/list_by_coordinates_params.rb,
lib/unit/models/cash_deposit/list_by_postal_code_params.rb

Defined Under Namespace

Classes: GenerateBarcodeRequest, ListByCoordinatesParams, ListByPostalCodeParams

Constant Summary collapse

CASH_DEPOSIT_LIMIT =
100
CASH_DEPOSIT_OFFSET =
0

Class Method Summary collapse

Class Method Details

.generate_barcode(store_id:, account_id:, customer_id:) ⇒ Object

Generate a barcode for cash deposit

Parameters:

  • store_id (String)
  • account_id (String)
  • customer_id (String)

See Also:



18
19
20
21
# File 'lib/unit/models/cash_deposit/cash_deposit.rb', line 18

def generate_barcode(store_id:, account_id:, customer_id:)
  request = GenerateBarcodeRequest.new(store_id, , customer_id)
  Unit::Resource::CashDepositResource.generate_barcode(request)
end

.get_image_by_barcode_number(barcode_number:) ⇒ Object

Get image by barcode number



48
49
50
# File 'lib/unit/models/cash_deposit/cash_deposit.rb', line 48

def get_image_by_barcode_number(barcode_number:)
  Unit::Resource::CashDepositResource.get_image_by_barcode_number(barcode_number)
end

.list_by_coordinates(coordinates:, limit: CASH_DEPOSIT_LIMIT, offset: CASH_DEPOSIT_OFFSET, service_type: nil) ⇒ Object

List cash deposit store locations by coordinates

Parameters:

  • coordinates (Coordinates)
  • limit (Integer) (defaults to: CASH_DEPOSIT_LIMIT)
    • optional

  • offset (Integer) (defaults to: CASH_DEPOSIT_OFFSET)
    • optional

  • service_type (String) (defaults to: nil)
    • optional

See Also:



29
30
31
32
# File 'lib/unit/models/cash_deposit/cash_deposit.rb', line 29

def list_by_coordinates(coordinates:, limit: CASH_DEPOSIT_LIMIT, offset: CASH_DEPOSIT_OFFSET, service_type: nil)
  request = ListByCoordinatesParams.new(coordinates, limit, offset, service_type)
  Unit::Resource::CashDepositResource.list_by_coordinates(request)
end

.list_by_postal_code(postal_code:, limit: CASH_DEPOSIT_LIMIT, offset: CASH_DEPOSIT_OFFSET, service_type: nil) ⇒ Object

List cash deposit store locations by postal code

Parameters:

  • postal_code (String)
  • limit (Integer) (defaults to: CASH_DEPOSIT_LIMIT)
    • optional

  • offset (Integer) (defaults to: CASH_DEPOSIT_OFFSET)
    • optional

  • service_type (String) (defaults to: nil)
    • optional

See Also:



40
41
42
43
# File 'lib/unit/models/cash_deposit/cash_deposit.rb', line 40

def list_by_postal_code(postal_code:, limit: CASH_DEPOSIT_LIMIT, offset: CASH_DEPOSIT_OFFSET, service_type: nil)
  request = ListByPostalCodeParams.new(postal_code, limit, offset, service_type)
  Unit::Resource::CashDepositResource.list_by_postal_code(request)
end