Retrieve customer data by date - square-connect

Can I retrieve customer data by specifying date conditon in the sqaure conect api call like :
https://connect.squareup.com/v2/customers?begin_time=2016-01-15T00:00:00Z&end_time=2016-01-31T00:00:00
Same I need for orders and transactions

No, The customers endpoint does not have any date windowing query parameters like transactions does.
https://docs.connect.squareup.com/api/connect/v2#endpoint-listcustomers

Related

How to establish one to many relationship in Dynamo DB?

I have 2 different JSON Files. One with user details and other with order details. Order details table has a column user_id to match the user ordered for. I have to create a dynamo db table that has the order details nested inside the user details and insert the values from the Json files into this table using a spring-boot app. Can someone help me with this ? Do we have any example code ?
DynamoDB is NOT a relational DB so you can't have relations per se.
However, you have two ways (at least those come to my mind) to achieve what you want.
1) Have two tables: User and Order, the latter with userId field. When you load Order, get your userId and load also a User by the index id.
2) In your User.java you can have field List<Order> orders. Then you need to create Order.java and annotate this class with #DynamoDBDocument. This enables you to have custom objects in your #DynamoDBTable classes. Do not also forget about getters and setters since they are required.

Update Fields Supplier Invoice

I'm looking for an Odata service that can update values of supplier invoices. I know that I can do it using BAPI, but I would like to know if there is a way to do it using a update from OData service or something similar.
The fields that I want to change are:
Block a Payment
Change Assignment Number
Change Payee
Thanks in advance.
As of now it is not possible to change fields of a supplier invoice. Looking at the API Hub you just have the option to create and read supplier invoices as well as releasing/canceling them.
To request a change in the API you can submit a request in the Customer Influence Site.

Why are transactions missing data?

I am retrieving transactions via the Connect API v2, however, none of the returned records include order_id, customer_id, or cardholder_name.
All of this data is linked and viewable within the dashboard.
Am I missing something?
order_id - This field would only be filled if you used the CreateOrder endpoint and passed that order to the Charge endpoint for an itemized e-commerce transaction. It would not be there if you created an order in the Point of Sale.
customer_id - This is only filled in if the merchant (or app/site) explicitly attached a customer to the transaction. Some transactions get associated to automatically created customers that you don't have the data for, if you don't explicitly create the customer.
cardholder_name - You would only see this if the customer paid with Card on File. If you look at the data model in the documentation The cardholder name. This value is present only if this object represents a customer's card on file.

Best way to design microservice architecture when there is a dependency between databases?

We are planning to migrate our product to micro service architecture using spring boot.
I have few doubts/concerns for "each service should have separate database".
If I created separate database for each service, then how to handle the table dependency.
For example: I have 2 micro services.
1. Customer Service: it has "customer" table (fields: customerId, customerName, etc...)
2. Order Service: it has "order" table (fields: orderId, orderName, customerId, etc...)
Note: for simplicity I mentioned only 1 table in each service here.
When I tried to access the order details based on orderId, I may want to retrieve the details of customer also.
In this case, I have two options in my mind:
Using RestTemplate call the "customer service" GET of customerById API and fetch the required details and set it in the response of OrderDetails.
Create customer table also in Order Service and using database tool replicate the data from customer service to order service's customer table. i.e., any changes done to customer table in customer service database will reflect on order service's customer table.
So, I can easily fetch relevant data from order service itself.
Please suggest which one is preferable. If both doesn't make sense, please suggest best way to handle this.
Thanks.

Square API - Changing Charge Dates to CaptureTransaction Dates

We're using the Square v2 API.
We're setting the delay_capture field to true in our charge API calls. When we then call the CaptureTransaction for that charge, the date of the transaction is the date the original charge call was sent.
Is there a way to set the date of the transaction to the date the CaptureTransaction call was sent rather than the original charge date?
I don't see any support for this in the documentation but I figured I would ask.
Thank you.
No, you cannot change the recorded dates. I'd recommend using another database to store this additional data and just key on the transaction id.

Resources