Class: NoyoFulfillment::MemberRequest

Inherits:
ApiResource show all
Defined in:
lib/noyo_fulfillment/models/member_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ApiResource

all, authenticate, #create, find, get_body, handle_unauthenticated, headers, #initialize, perform_request_authenticated, resource_path_name, resource_url, #resource_url, single_resource_url, #single_resource_url

Methods included from NoyoApi::Client::UserAgent

included

Methods inherited from BaseModel

#==, #attributes, class_name, #excluded_attributes, #initialize, #inspect, #synced_attributes, #to_h, #update_attrs

Constructor Details

This class inherits a constructor from NoyoFulfillment::ApiResource

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/noyo_fulfillment/models/member_request.rb', line 3

def body
  @body
end

#employee_idObject

Returns the value of attribute employee_id.



3
4
5
# File 'lib/noyo_fulfillment/models/member_request.rb', line 3

def employee_id
  @employee_id
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/noyo_fulfillment/models/member_request.rb', line 3

def id
  @id
end

#request_typeObject

Returns the value of attribute request_type.



3
4
5
# File 'lib/noyo_fulfillment/models/member_request.rb', line 3

def request_type
  @request_type
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/noyo_fulfillment/models/member_request.rb', line 3

def status
  @status
end

Instance Method Details

#create_hashObject



31
32
33
# File 'lib/noyo_fulfillment/models/member_request.rb', line 31

def create_hash
  body
end

#create_urlObject



26
27
28
29
# File 'lib/noyo_fulfillment/models/member_request.rb', line 26

def create_url
  nested_resource = self.class.resource_path_name
  File.join(NoyoFulfillment::Employee.resource_url, employee_id, nested_resource, request_type)
end

#member_transactionsObject Also known as: transactions



35
36
37
# File 'lib/noyo_fulfillment/models/member_request.rb', line 35

def member_transactions
  MemberTransaction.all(member_request_id: id)
end