lib/billfixers/partner/client.rb in billfixers-partner-0.1.3 vs lib/billfixers/partner/client.rb in billfixers-partner-0.1.4
- old
+ new
@@ -58,17 +58,39 @@
result = response.data.list_offers
[result.total_count, result.nodes]
end
+ def list_information_requests(limit: 25, offset: 0, customer_id: nil)
+ response = @gql.query(LIST_INFORMATION_REQUESTS_QUERY, {
+ limit: limit,
+ offset: offset,
+ customer_id: customer_id
+ })
+
+ result = response.data.list_information_requests
+
+ [result.total_count, result.nodes]
+ end
+
def find_customer(customer_id)
response = @gql.query(FIND_CUSTOMER_QUERY, { id: customer_id })
response.data.find_customer
end
def find_bill(bill_id)
response = @gql.query(FIND_BILL_QUERY, { id: bill_id })
response.data.find_bill
+ end
+
+ def find_offer(offer_id)
+ response = @gql.query(FIND_OFFER_QUERY, { id: offer_id })
+ response.data.find_offer
+ end
+
+ def find_information_request(information_request_id)
+ response = @gql.query(FIND_INFORMATION_REQUEST_QUERY, { id: information_request_id })
+ response.data.find_information_request
end
def create_customer(params)
response = @gql.query(CREATE_CUSTOMER_MUTATION, {
customer: camelize(params)